1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Plot relative intensity?

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

    [itex]I_\theta = I_m (cos (\beta))^2 \left( \frac{sin(\alpha)}{\alpha} \right)^2[/itex]

    2. Relevant equations
    Range = -20 degrees to 20 degrees
    [itex]\beta = \frac{\pi d}{\lambda} \sin(\theta)[/itex]
    [itex]\alpha = \frac{\pi a}{\lambda} \sin(\theta)[/itex]
    [itex]d = 0,2[/itex]
    [itex]a = 0,1[/itex]
    [itex]\lambda = 632,8[/itex]
    3. The attempt at a solution
    This is the maple code:
    plot((cos((Pi*.2)*sin(theta)/(632.8))^2)(sin((Pi*.1)*sin(theta)/(632.8))*(632.8)/((Pi*.1)*sin(theta)))^2, theta = convert(-20*degrees, radians) .. convert(20*degrees, radians), axes = boxed);

    And in latex:

    [itex]\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)[/itex]


    Yields this:

    upload_2015-12-14_16-28-55.png

    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. jcsd
  3. Dec 14, 2015 #2

    Mark44

    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}##.

     
  4. Dec 14, 2015 #3
    I cleaned up the code, as you suggested
    upload_2015-12-14_17-54-30.png
    upload_2015-12-14_17-54-43.png

    I can't see where the error is
     

    Attached Files:

  5. Dec 14, 2015 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  6. Dec 14, 2015 #5
    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
  7. Dec 14, 2015 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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
    [tex] I_{\theta} = \cos^2 (u \sin(\theta)) \, \left( \frac{\sin(v \sin(\theta))}{v \sin(\theta)} \right)^2 [/tex]
    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
    [tex] I_{\theta} = 1 + p_2 S^2 + p_4 S^4+ p_6 S^6 + \cdots, \; \text{with } \; S = \sin(\theta)[/tex]
    where
    [tex] \begin{array}{lcr}
    p_2 &=&-0.10680434033590471660 \, 10^{-5} \\
    p_4& =&0.40768810279355082790 \, 10^{-12} \\
    p_6& =&-0.71916540449698892880 \, 10^{-19}
    \end{array} [/tex]
    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##.

    The results in your first post are correct, so your supposition about "spikes" is incorrect.
     
    Last edited: Dec 14, 2015
  8. Dec 15, 2015 #7
    I see that, but I am still at a total loss though
     
  9. Dec 15, 2015 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  10. Dec 20, 2015 #9

    ehild

    User Avatar
    Homework Helper
    Gold Member

    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!
     
  11. Dec 21, 2015 #10
    d = 0.2 mm = 200000 nm
    a = 0.1 mm = 100000 nm

    The plot still isn't right
     
  12. Dec 21, 2015 #11

    ehild

    User Avatar
    Homework Helper
    Gold Member

    Was not it a=0.01 mm and d=0.02 mm?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Plot relative intensity?
  1. Plotting a function (Replies: 5)

  2. Bode Plot (Replies: 1)

  3. Plotting Derivatives (Replies: 4)

  4. Distribution Plot (Replies: 0)

Loading...