692 Chapter 10
Transformed solution for U(x, s)
> U(x,s):=eval(U(x,s));
U(x∼,s):= −
e
−sx∼
−1 −2 s +2s
3
+s
4
+
e
−x∼
(1 +s)
3
(−1 +s)
(10.178)
Solution is the inverse Laplace of U(x, s)
> u(x,t):=invlaplace(U(x,s),s,t);
u(x∼,t):=
1
8
Heaviside(−t +x∼) e
t−x∼
+
1
8
e
−t+x∼
Heaviside(t −x∼)(2t
2
−4tx∼
+ 2x∼
2
+2t −2x∼+1) −
1
8
e
−x∼−t
(2t
2
+2t +1) (10.179)
ANIMATION
> animate(u(x,t),x=0..12,t=0..5,thickness=3);
The preceding animation command shows the spatial-time wave amplitude distribution u(x, t)
on the string. The animation sequence here and in Figure 10.13 shows snapshots of the
animation at times t = 0, 1, 2, 3, 4, 5.
ANIMATION SEQUENCE
> u(x,0):=subs(t=0,u(x,t)):u(x,1):=subs(t=1,u(x,t)):
> u(x,2):=subs(t=2,u(x,t)):u(x,3):=subs(t=3,u(x,t)):
> u(x,4):=subs(t=4,u(x,t)):u(x,5):=subs(t=5,u(x,t)):
> plot({u(x,0),u(x,1),u(x,2),u(x,3),u(x,4),u(x,5)},x=0..10,thickness=10);
0
0.20
0.15
0.10
0.05
0
246810
x~
Figure 10.13