# Plot relative intensity?

1. Dec 14, 2015

### Schwarzschild90

1. The problem statement, all variables and given/known data
Plot the following function in maple (any graphics software):

$I_\theta = I_m (cos (\beta))^2 \left( \frac{sin(\alpha)}{\alpha} \right)^2$

2. Relevant equations
Range = -20 degrees to 20 degrees
$\beta = \frac{\pi d}{\lambda} \sin(\theta)$
$\alpha = \frac{\pi a}{\lambda} \sin(\theta)$
$d = 0,2$
$a = 0,1$
$\lambda = 632,8$
3. The attempt at a solution
This is the maple code:

And in latex:

$\displaystyle {\it plot} \left( \left( \left( \left( \cos \left( 0.0009929180323\\ \mbox{}\,\sin \left( \theta \right) \right) \right) ^{2} \right) \left( 2014.264960\,{\frac {\sin \left( 0.0004964590161\\ \mbox{}\,\sin \left( \theta \right) \right) }{\sin \left( \theta \right) }} \right) \right) ^{2},\theta={{\it convert} \left( -20\\ \mbox{}\,{\it degrees},{\it radians} \right) \ldots {\it convert} \left( 20\,{\it degrees},{\it radians} \right) }\\ \mbox{},{\it axes}={\it boxed} \right)$

Yields this:

It should have a spike at (-17.5 degrees in radians) and at 0 degrees in radians and another at 17.5 degrees in radians. Mine has a single spike at 0 degrees in radians.

Last edited: Dec 14, 2015
2. Dec 14, 2015

### Staff: Mentor

Your Maple code is wrong, I believe. Simplifying greatly, $\cos(\beta) = \cos(\sin(\theta))$ (with several factors removed), and similarly for $\sin(\alpha)$. Your Maple code above appears to be multiplying these functions instead of using function composition.

Also, instead of working with the very long plot expression that you have above, it would be worthwhile to assign some variables above the plot statement. For example, create a variable and assign the value $\pi/2$ to it. And another for the 632.8 constant -- where does this one come from? Is that $\frac{\pi \lambda}{d}$? It looks like you might have missed the other constant, $\frac{\pi \lambda}{a}$.

3. Dec 14, 2015

### Schwarzschild90

I cleaned up the code, as you suggested

I can't see where the error is

#### Attached Files:

File size:
593 bytes
Views:
26
4. Dec 14, 2015

### Ray Vickson

I want to test the plot myself, but I do not know what your $I_m$ means. It looks like a notation for a Bessel function of the second kind, but I do not see any Bessel functions in your plotting expressions.

5. Dec 14, 2015

### Schwarzschild90

I've taken I_m = 1 and since I know only a little about bessel functions, I cannot tell you if this is one.

(I know that Bessel functions can be used to model the waves coming off of a bass)

Last edited: Dec 14, 2015
6. Dec 14, 2015

### Ray Vickson

With the parameters you gave, the intensity $I_{\theta}$ is smooth, has no "spikes" (if I understand that to mean a very sharp, pointed peak), and is so close to 1 for $-20^o < \theta < 20^o$ that it will plot as a straight line (unless you restrict the y-axis to values between about 0.999995 to 1.0, as you did in your first post).

You can see this easily. Let $\beta = u \sin(\theta)$ and $\alpha = v \sin(\theta)$, where $u = \pi d/ \lambda \doteq 0 .9929180323 \, 10^{-3}$ and $v = \pi a / \lambda \doteq 0.4964590161\, 10^{-3}$. Then, with $\theta$ in radians we have
$$I_{\theta} = \cos^2 (u \sin(\theta)) \, \left( \frac{\sin(v \sin(\theta))}{v \sin(\theta)} \right)^2$$
Note that $I_{\theta}$ is an even function of $\theta$, so to know its behavior on $\theta \in (-\pi,\pi)$ it is sufficient to restrict attention to the positive half $\theta \in [0, \pi)$. You can find its local minimal on $-\pi < \theta < \pi$ by solving $(d/d \, \theta) I_{\theta} = 0$ numerically; the solution is at $\theta = \theta_m = 1.5707963267948966192$, at which point we have $I_{\theta} = .99999893185601793245$. In other words, on the interval $-\pi < \theta < \pi$ the function $I_{\theta}$ lies between a minimum of $0.9999989$ (at $\theta = \pm 1.5707$) and a maximum of $1.0$ at $\theta = 0$.

You can also see this using an expansion of $I_{\theta}$ around $\theta = 0$. Its Maclaurin expansion is
$$I_{\theta} = 1 + p_2 S^2 + p_4 S^4+ p_6 S^6 + \cdots, \; \text{with } \; S = \sin(\theta)$$
where
$$\begin{array}{lcr} p_2 &=&-0.10680434033590471660 \, 10^{-5} \\ p_4& =&0.40768810279355082790 \, 10^{-12} \\ p_6& =&-0.71916540449698892880 \, 10^{-19} \end{array}$$
In other words, $I_{\theta} \doteq 1 - 0.0000011 \, S^2 + 0.00000000000076 \, S^4 - 0.000000000000000000072 \, S^6 + \cdots$, for $-1 < S = \sin(\theta) < 1$.

Last edited: Dec 14, 2015
7. Dec 15, 2015

### Schwarzschild90

I see that, but I am still at a total loss though

8. Dec 15, 2015

### Ray Vickson

At a total loss about what? You have a correct plot, so if somebody told you there should be a spike at 17.5 degrees they were telling you something that is NOT TRUE.

9. Dec 20, 2015

### ehild

Include the units of the data.
The formula might be that of double-slit diffraction in terms of the deflection angle theta. 632.8 nm must be the wavelength of the incident light (from a He-Ne laser) 'a' is the slit width and 'b' is the distance between the slits. They are of micrometer size, comparable with the wavelength, cannot be 0.1 and 0.2 nm!

10. Dec 21, 2015

### Schwarzschild90

d = 0.2 mm = 200000 nm
a = 0.1 mm = 100000 nm

The plot still isn't right

11. Dec 21, 2015

### ehild

Was not it a=0.01 mm and d=0.02 mm?