The Diffusion Equation in Two Spatial Dimensions 359
Generalized series terms for n = 1, 2, 3,...,m= 1, 2, 3,...,
> u[m,n](x,y,t):=eval(T[m,n](t)*X[m](x)*Y[n](y));
u
m,n
(x,y,t):= −
8(−1 +(−1)
n
)(−1 +(−1)
m
)e
−
1
50
(m
2
π
2
+n
2
π
2
)t
sin(mπx) cos(nπy)
m
3
π
5
n
2
(6.38)
Series solution
> u(x,y,t):=Sum(u[m,0](x,y,t),m=1..infinity)+Sum(Sum(u[m,n](x,y,t),m=1..infinity),
n=1..infinity);
u(x, y, t) :=
∞
m=1
⎛
⎝
−
2 (−1 +(−1)
m
)e
−
1
50
m
2
π
2
t
sin(mπx)
m
3
π
3
⎞
⎠
(6.39)
+
∞
n=1
⎛
⎝
∞
m=1
⎛
⎝
−
8(−1 +(−1)
n
)(−1 +(−1)
m
)e
−
1
50
(m
2
π
2
+n
2
π
2
)t
sin(mπx) cos(nπy)
m
3
π
5
n
2
⎞
⎠
⎞
⎠
First few terms of sum
> u(x,y,t):=sum(u[m,0](x,y,t),m=1..3)+sum(sum(u[m,n](x,y,t),m=1..3),n=1..3):
ANIMATION
> animate3d(u(x,y,t),x=0..a,y=0..b,t=0..5,axes=framed,thickness=1);
The preceding animation command illustrates the spatial-time-dependent solution for u(x, y, t).
The animation sequence in Figures 6.4 and 6.5 shows snapshots of the animation at two
different times t = 0 and t = 5.
ANIMATION SEQUENCE
> u(x,y,0):=subs(t=0,u(x,y,t)):plot3d(u(x,y,0),x=0..a,y=0..b,axes=framed,thickness=1);
x
y
1.0
0.8
0.6
0.4
0.2
0
1
0.8
0.6
0.4
0.2
0
0
0.05
0.15
0.1
0.2
Figure 6.4