Sine waves demonstrations

Remove["Global`*"]

Define the simple sine wave

wavekω=A Sin[k x-ω t];

Make the version in terms of wavelength and frequency

waveλν=wavekω/.{k->2Pi/λ,ω->2 Pi ν};

Choose substitutions for amplitude, wavelength, and frequency

subs={A->3,λ->2,ν->1};

Plot the wave for t=0 and t=0.25

wavePlot=waveλν/.subs;
Plot[{(wavePlot/.t->0),(wavePlot/.t->0.25)},{x,0,6},
PlotStyle->{{Thick,Black},{Thick,Red}},
PlotLegends->{"t=0","t=0.25"}]

Animate the wave

Animate[
Plot[wavePlot/.t->time,{x,0,6},PlotStyle->{Thick,Black}],
{time,0,4},AnimationRunning->False]

Now animate a leftward moving sine wave, but first save the rightward moving wave

waveRight=wavePlot;

wavekω=A Sin[k x+ω t];
waveλν=wavekω/.{k->2Pi/λ,ω->2 Pi ν};
waveLeft=waveλν/.subs;
Animate[
Plot[waveLeft/.t->time,{x,0,6},PlotStyle->{Thick,Black}],
{time,0,4},AnimationRunning->False]

Now animate the sum of the leftward wave and the rightward wave

Animate[
Plot[(waveLeft+waveRight)/.t->time,{x,0,6},PlotStyle->{Thick,Black},
PlotRange->{-6,6}],
{time,0,4},AnimationRunning->False]