Nonhomogeneous Partial Differential Equations 545
Final solution (particular plus linear portion) demonstrating resonance
> u(x,t):=eval(v(x,t))+s(x,t);
u(x, t) :=
∞
n=1
⎛
⎝
2
5
√
2 sin
1
2
nπ
cos(nπt)
n
2
π
2
−
20
√
2(−1 +(−1)
n
)
(
−cos(nπt) +cos(3πt)
)
n
3
π
3
n
2
π
2
−9π
2
√
2 sin(nπx) (8.182)
First few terms of sum
> u(x,t):=s(x,t)+sum(eval(v[n](x,t)),n=1..2)+v[3](x,t):
ANIMATION
> animate(u(x,t),x=0..a,t=0..50,frames=50,thickness=3);
The preceding animation command displays the spatial-time-dependent solution of u(x, t) for
the given boundary conditions and initial conditions. The animation sequence here and in
Figure 8.11 shows snapshots of the animation at times t = 0, 10/4, 20/4, 30/4, 40/4, 50/4. As
time increases, the n = 3 term dominates the solution to the problem, and this is why we see
three antinodes in the display of the wave amplitude.
ANIMATION SEQUENCE
> u(x,0):=subs(t=0,u(x,t)):u(x,10/4):=subs(t=10/4,u(x,t)):
> u(x,20/4):=subs(t=20/4,u(x,t)):u(x,30/4):=subs(t=30/4,u(x,t)):
> u(x,40/4):=subs(t=40/4,u(x,t)):u(x,50/4):=subs(t=50/4,u(x,t)):
> plot({u(x,0),u(x,10/4),u(x,20/4),u(x,30/4),u(x,40/4),u(x,50/4)},x=0..a,thickness=10);
0.2
0.08
0.06
0.04
0.02
20.02
20.04
20.06
20.08
0
0.4 0.6
0.8
1
x
Figure 8.11