Example 24.2
A wave free to move along the string is called a traveling wave. Suppose the initial disturbance in the string has the shape shown in figure 24.5, below.
>
g := x -> piecewise(x<3*Pi/8,0, x<Pi/2,x-3*Pi/8, x<5*Pi/8,Pi/8, x<3*Pi/4,3*Pi/4-x,0):
plot(g,0..Pi, scaling=constrained, labels=[x,u], labelfont=[TIMES,ITALIC,12], xtickmarks=3, ytickmarks=[0,.4]);
>
Under the action of the wave equation, that initial disturbance would travel along the string, reflecting at the endpoints, and bouncing back and forth between between them. Figure 24.6 (consisting of Figures 24.6a and 24.6b) shows the traveling wave at two successive times after .
Figure 24.6a is
>
g1 := piecewise(x<0,-g(-x), x<Pi,g(x)):
G := PX(g1,x=-Pi..Pi):
U1 := (G(x-t)+G(x+t))/2:
pp1:=plot(subs(t=.7,U1),x=0..Pi,color=red,xtickmarks=3, ytickmarks=[-.4,0,.4], scaling=constrained, view=[0..Pi,-.4.. .4]):
pp2 := textplot([2.9,.3,`t = .7`]):
display([pp1,pp2], labels=[x,u], labelfont=[TIMES,ITALIC,12]);
>
while Figure 24.6b is
>
pp3 := plot(subs(t=1.47,U1),x=0..Pi, color=red, xtickmarks=3, ytickmarks=[-.4,0,.4], scaling=constrained, view=[0..Pi,-.4.. .4]):
pp4:=textplot([2.9,.3,`t = 1.47`]):
display([pp3,pp4], labels=[x,u], labelfont=[TIMES,ITALIC,12]);
>
The complete animation showing how the initial energy in the string is distributed under the action of the wave equation is given by
>
g1 := piecewise(x<0,-g(-x), x<Pi,g(x)):
G := PX(g1,x=-Pi..Pi):
U1 := (G(x-t)+G(x+t))/2:
animate(U1,x=0..Pi,t=0..2*Pi, frames=63, color=red, scaling=constrained, labels=[x,u], labelfont=[TIMES,ITALIC,12], xtickmarks=3, ytickmarks=[-.4,0,.4]);
>
The initial energy splits into two equal parts, with each new wave traveling in opposite directions. When the wave reaches the boundary, it is absorbed, and then re-transmitted, only now, with a reflection. Figure 24.7 shows the solutoin surface for the traveling wave.
> plot3d(U1,x=0..Pi,t=0..2*Pi,axes=boxed, labels=[x,t,u], labelfont=[TIMES,ITALIC,12], color=black, style=hidden, shading=zgrayscale, tickmarks=[[0,1,2,3],5,[0]], grid=[25,50], scaling=constrained, orientation=[50,60]);
>
>
The initial disturbance splits into two waves of half the initial height, one traveling left, and one traveling right. Without changing shape, these waves move in the -plane along characteristics , the lines + = constant, which are therefore said to "carry the initial information."
A more dynamic view of the propagation of the initial shape is given by the following animation.
>
ff := z -> spacecurve([x,z,subs(t=z,U1),x=0..Pi], color=black, thickness=3, tickmarks=[2,2,[0]]):
display3d([seq(ff(2*Pi/50*k),k=0..50)], insequence=true, axes=boxed, labels=[x,t,u], labelfont=[TIMES,ITALIC,14], scaling=constrained, orientation=[55,65]);
>