260 Chapter 4
v
51520
20.3
20.2
20.1
0
0.1
0.2
0.3
0.4
0.5
10
Figure 4.9
> lambda[2]:=(1/b)*fsolve(BesselJ(1,v)=0,v=4..8);
λ
2
:= 7.015586670 (4.114)
> lambda[3]:=(1/b)*fsolve(BesselJ(1,v)=0,v=8..12);
λ
3
:= 10.17346814 (4.115)
First few terms in sum
> u(r,t):=u[0](r,t)+eval(sum(u[n](r,t),n=1..1)):
ANIMATION
> animate(u(r,t),r=a..b,t=0..5,thickness=3);
The preceding animation command illustrates the spatial-time-dependent solution for u(r, t).
The following animation sequence in Figure 4.10 shows snapshots of the animation at times
t = 0, 1, 2, 3, 4, and 5.
ANIMATION SEQUENCE
> u(r,0):=subs(t=0,u(r,t)):u(r,1):=subs(t=1,u(r,t)):
> u(r,2):=subs(t=2,u(r,t)):u(r,3):=subs(t=3,u(r,t)):
> u(r,4):=subs(t=4,u(r,t)):u(r,5):=subs(t=5,u(r,t)):
> plot({u(r,0),u(r,1),u(r,2),u(r,3),u(r,4),u(r,5)},r=a..b,thickness=10);
THREE-DIMENSIONAL ANIMATION
> u(x,y,t):=eval(subs(r=sqrt(xˆ2+yˆ2),u(r,t))):
> u(x,y,t):=u(x,y,t)*Heaviside(1−sqrt(xˆ2+yˆ2)):
> animate3d(u(x,y,t),x=−b..b,y=−b..b,t=0..10,axes=framed,thickness=1);