Message Boards Message Boards

Using Manipulate and Sin functions to visualize traverse & standing waves

Posted 1 year ago

After reviewing the Mathematica documentation and completing the Signal Processing course, I am having difficulty in visualizing both transverse waves and standing waves using the Mathematica functions Manipulate[] and Sin[]. Please review the attached notebook and advise me as to what I am missing either in the coding or my understanding.
Thanks,
Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin
4 Replies

Hi Henrik;

How are things in Weilheim and I love your country?

Whenever I use your snippet of a standing wave as you supplied Manipulating the "t" slider seems to superimpose the two wavelengths as expected. However, when Lambda (wavelength), f(frequency) and b (phase angle are added in as sliders, only Lambda and b seem to have any effect on the wavelength. See below.

Manipulate[
 Plot[Sin[(2 \[Pi])/\[Lambda] x - 2 \[Pi] f t] + 
   Sin[(2 \[Pi])/\[Lambda] x + 2 \[Pi] f t], {x, 0, 10}, 
  PlotRange -> {-2, 2}], {t, 0, 10}, {\[Lambda], 1, 4}, {f, 1, 4}]

This is exactly what happened to the transverse wave, that I initially supplied, except with the f (frequency) and t (time) sliders not working correctly. The examples that I listed in my inquiry are the standard mathematical representations of: simple harmonic motion, the transverse wave and a standing wave so it seems the formulas should work in Mathematica. Currently, I am still trying to understand how to plot the transverse wave and standing wave and having all the sliders work correctly.

Have a great day,

Mitch Sandlin

POSTED BY: Mitchell Sandlin

Hi Mitchell,

I am glad you like the southern part of Germany! But unfortunately we do not have any snow yet! For this very reason I am right now in South Tyrol (Italy) to satisfy my addiction to XC-skating.

Regarding your question: To be honest - I cannot see that anything is not working correctly, everything shows and sums up as expected:

SetOptions[Plot, AspectRatio -> .3, GridLines -> Automatic, ImageSize -> Large];
Manipulate[
 GraphicsColumn[{Plot[Sin[(2 \[Pi])/\[Lambda] x - 2 \[Pi] f t], {x, 0, 10}, PlotRange -> {-1, 1}, 
    PlotLabel -> "Sin[(2 \[Pi])/\[Lambda] x-2 \[Pi] f t]"], 
   Plot[Sin[(2 \[Pi])/\[Lambda] x + 2 \[Pi] f t], {x, 0, 10}, PlotRange -> {-1, 1}, PlotLabel -> "Sin[(2 \[Pi])/\[Lambda] x+2 \[Pi] f t]"],
   Plot[Sin[(2 \[Pi])/\[Lambda] x - 2 \[Pi] f t] + Sin[(2 \[Pi])/\[Lambda] x + 2 \[Pi] f t], {x, 0, 10}, PlotRange -> {-2, 2}, 
    PlotLabel -> "Sin[(2 \[Pi])/\[Lambda] x-2 \[Pi] f t]+Sin[(2 \[Pi])/\[Lambda] x+2 \[Pi] f t]"]}], {t, 0, 3}, {\[Lambda], 1, 4}, {f, 1, 4}]

Regards -- Henrik

ADDENDUM:

I guess I now see your problem: When you move the frequency slider you see just a phase shift. But frequency has to do with time: depending your frequency adjustment if you move the time slider you will notice the difference.

POSTED BY: Henrik Schachner

Mitchell,

I hope I do not misunderstand your question.

With the problems plotting a Traverse wave, how would one ever plot a standing wave???

A standing wave is a superposition of two waves running in opposite direction! E.g.:

Manipulate[Plot[Sin[x - t] + Sin[x + t], {x, 0, 10}, PlotRange -> {-2, 2}], {t, 0, 10}]
POSTED BY: Henrik Schachner

Hi Henrik;

Attached you will find a copy of my updated notebook. Using the sliders of the attached notebook can probably do a better job explaining which sliders work and which don't.

Thanks,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract