Problem 15.11

Given:

At positions x0 and x1, we are given simple harmonic motion with a period of T.  However, the oscillation at x1 doesn’t reach its peak until 0.035 s.

(a) and (b).  Compute various constants related to the wave.

x0 = 0; x1 = 0.09; T = 0.04; A = 4; (* x's in meters, y's in mm *)

tmin = 0; tmax = 0.08;

ω = 2 π / T

Clear[ϕ]
y0[t_] := A Sin[ω t]
y1[t_] := A Sin[ω t + ϕ]

Here is one way to find the phase ϕ such that the peak for wave 1 occurs at 0.035s, as in the figure.   (This is not necessary;  I am only doing it to reproduce the picture already in the text.)  You could also do this analytically with the inverse sine function.

FindRoot[y1[0.035] == A, {ϕ, 0}]

ϕ = ϕ /. %

Plot[{y0[t],y1[t]}, {t, tmin, tmax}, 
PlotStyle -> {Magenta, Blue}, LabelStyle -> Larger, PlotLegends -> {"x = 0", "x = 0.09"}, Frame -> True, FrameLabel-> {"t (s)", "y (mm)"}, ImageSize -> Large]

(c) Wave moves to the right.

If the wave moves to the right, and the wavelength is greater than x1-x0, then we can find the wave speed by asking how long it takes the peak to travel from x0 to x1.  The peak at x0 (the magenta curve) occurred at t = 0.01.  The peak at x=0.09 (the blue curve) occurred at t=0.035.  Thus the speed is:

v = (x1 - x0)/(0.035 - 0.01) (* m/s *)

λ = v T

xmax = 3 λ; (* Convenient size for plots *)

y[x_, t_] :=A Sin[((2 π)/λ) x - ((2 π)/T) t + π]

The ‘+ π’ at the end is to ensure the magenta curve goes up rather than down.

Here are snapshots of the wave at times t = 0 and t = 0.005 seconds.

Plot[{y[x, 0], y[x, 0.005]}, {x, 0, xmax}, PlotLegends -> {"t = 0s", "t = 0.005 s"},LabelStyle -> Larger, Frame -> True, FrameLabel -> {"x", "y"}, ImageSize -> Large]

Animate[Plot[y[x, t], {x, 0, xmax}, PlotRange->{-A, A}, PlotLabel->t,LabelStyle -> Larger, Frame -> True, FrameLabel -> {"x", "y"}, ImageSize -> Large], {t, tmin, tmax, 0.001}]

Plot[{y0[t],y1[t]}, {t, tmin, tmax}, 
PlotStyle -> {Magenta, Blue}, LabelStyle -> Larger, PlotLegends -> {"x = 0", "x = 0.09"}, Frame -> True, FrameLabel-> {"t (s)", "y (mm)"}, ImageSize -> Large]

Look at x = x0 and x = x1

dot[color_, x_, t_] := Graphics[{color, Disk[{x, y[x, t]},{λ/24, A/24}]}]

Manipulate[Show[{Plot[y[x, t], {x, 0, 3λ}, PlotRange->{-A, A}, PlotLabel -> t], 
dot[Magenta, x0, t],
dot[Blue, x1, t]}, LabelStyle -> Larger, AxesLabel -> {"x (m)", "y (mm)"}, ImageSize -> Large
],
{t, tmin, tmax, 0.0001, Appearance -> "Open", DisplayAllSteps-> True, DefaultDuration -> 30}]

We can show how the original graph resulted by tracing out the two dots.

tc = tmax;
Manipulate[GraphicsRow[{
Show[Plot[y[x, t], {x, 0, xmax}, PlotRange->{-A, A}, PlotLabel -> t, AxesLabel->{"x (m)", "y(x,t)"}], 
dot[Magenta, x0, t],dot[Blue, x1, t], ImageSize -> 350],
Show[
Plot[{y[x0, tp],y[x1, tp]}, {tp,  tmin-0.001, t}, 
PlotStyle -> {Magenta, Blue}, PlotRange -> {{tmin-0.001, tmax}, {-A, A}},
AxesLabel->{"t(s)","y(x,t)"}, ImageSize->350]
]}
], {t, tmin, tmax, 0.0002, Appearance -> "Open", DisplayAllSteps-> True, DefaultDuration -> 30}]

Shorter Wavelenghts?

If the wave moves to the right, and the wavelength is less than,x1-x0, then we may need to look two (or more) peaks away.

ΔT = 0.025 + T (* Add in one period *)

v = (x1 - x0)/ΔT

λ = v T

tc = tmax;
Manipulate[GraphicsRow[{
Show[Plot[y[x, t], {x, 0, xmax}, PlotRange->{-A, A}, PlotLabel -> t], 
dot[Magenta, x0, t],dot[Blue, x1, t], ImageSize -> 350],
Show[
Plot[{y[x0, tp],y[x1, tp]}, {tp,  tmin-0.001, t}, 
PlotStyle -> {Magenta, Blue}, PlotRange -> {{tmin-0.001, tmax}, {-A, A}}, ImageSize->350]
]}
], {t, tmin, tmax, 0.001, Appearance -> "Open"}]