The Diffusion Equation in Two Spatial Dimensions 357
> w(y):=1:Int(Y[n](y)*Y[s](y)*w(y),y=0...b)=delta(n,s);
1
0
2 cos(nπy) cos(sπy)dy = δ(n, s) (6.24)
Time-dependent solution
For n = 1, 2, 3,...,m= 1, 2, 3,...,
> T[m,n](t):=C(m,n)*exp(−k*lambda[m,n]*t);
T
m,n
(t) := C(m, n)e
−
1
50
(m
2
π
2
+n
2
π
2
)t
(6.25)
Generalized series terms
> u[m,n](x,y,t):=T[m,n](t)*X[m](x)*Y[n](y);
u
m,n
(x,y,t):= 2C(m, n)e
−
1
50
(m
2
π
2
+n
2
π
2
)t
sin(mπx) cos(nπy) (6.26)
For n = 0,m= 1, 2, 3,...,
> T[m,0](t):=C(m,0)*exp(−k*lambda[m,0]*t);u[m,0](x,y,t):=T[m,0](t)*X[m](x)*Y[0](y):
T
m,0
(t) := C(m, 0)e
−
1
50
m
2
π
2
t
(6.27)
Eigenfunction expansion
> 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
C(m, 0)e
−
1
50
m
2
π
2
t
√
2 sin(mπx)
+
∞
n=1
∞
m=1
2C(m, n)e
−
1
50
(m
2
π
2
+n
2
π
2
)t
sin(mπx) cos(nπy)
(6.28)
The Fourier coefficients C(m, n) are to be determined from the initial condition function
u(x, y, 0) = f(x, y). We consider the special case where
> f(x,y):=x*(1−x)*y;
f(x, y) := x(1 −x)y (6.29)
At time t = 0 we have
> f(x,y)=eval(subs(t=0,u(x,y,t)));
x(1 −x)y =
∞
m=1
C(m, 0)
√
2 sin(mπx) +
∞
n=1
∞
m=1
2C(m, n) sin(mπx) cos(nπy)
(6.30)