# Optics Diffraction Grating Plot

I was unsure whether to post this in physics stackexchange or mathematica stackexchange, so I posted it in both. I'm trying make an intensity plot for a diffraction grating that contains 100 lines/mm. Using the equation as a function of theta:

$$I=I_{o}\Bigg[\frac{Sin(\frac{N\pi d Sin\theta}{\lambda})} {Sin(\frac{\pi dSin\theta}{\lambda})}\Bigg]^2 \Bigg[\frac{Sin(\frac{\pi a Sin\theta}{\lambda})} {\frac{\pi a Sin\theta}{\lambda}}\Bigg]^2$$

Where $N$ is the number of slits that is hit by the laser, $d$ is the distance between the slits (.009mm), $a$ is the slit width (.001mm), and $\lambda$ of the laser is 632.8 nm. The laser diameter is roughly 1mm so I can assume that the laser will be incident upon roughly 100 lines in the grating (N=100). I tried to plot the peak intensities to match my experimental results, but my results do not seem correct. However, I did successfully make intensity plots from single slit to 5-slit, so I think my Mathematica code is correct.

\[Lambda] = 632.8; (*in nm*) a100 = 1000;(*in nm*) d100 = 9000; (*in nm*) Plot[((Sin[100*(\[Pi]*d100)/\[Lambda] Sin[\[Theta]]]/Sin[(\[Pi]*d100)/\[Lambda] Sin[\[Theta]]])^2) ((Sin[(\[Pi]*a100)/\[Lambda] Sin[\[Theta]]]/((\[Pi]*a100)/\[Lambda] Sin[\[Theta]]))^2), {\[Theta], -.5, .5}, PlotRange -> All] (*100 lines/mm, function of theta*)

This is the result of my plot However, my experimental results are Can anyone find a solution to the discrepancy? I also tried using the equivalent expression as a function of Y $$I=I_{o}\Bigg[\frac{Sin(\frac{N\pi d* Y}{\lambda*L})} {Sin(\frac{\pi d*Y}{\lambda*L})}\Bigg]^2 \Bigg[\frac{Sin(\frac{\pi a *Y}{\lambda*L})} {\frac{\pi a *Y}{\lambda*L}}\Bigg]^2$$ and converted the x-axis in my experimental plot from time to position. Y is the distance spanned by the interference patterns and L is the distance from the slits to the aperture, which I measured to be 20.5mm, or 20500000nm, since all my length measurements are in nanometers.

• "The laser diameter is roughly 1mm so I can assume that the laser will be incident upon roughly 100 lines in the grating (N=100)." But it won't illuminate each of them over the same length, so they will contribute differently to the sum. – dmckee --- ex-moderator kitten Dec 3 '15 at 2:54

Many practical diffraction gratings are "blazed" to enhance the diffraction on one side. https://en.wikipedia.org/wiki/Blazed_grating That is probably why your experimental result is asymmetric and enhanced for $m=0$ and $m=1$.