Partial Differential Equations in Two or More Dimensions

advertisement
Chapter 3
Example 3.9-2. ---------------------------------------------------------------------------------Solve the heat equation that models heat transfer in a uniform bar of length L with insulated
lateral surface. The heat generation within the bar is given by q(x, t) and the ends of the bar
are kept at 0o temperature. The initial temperature distribution is u(x,0) = f(x) for 0 < x < L.
2
u
2 u
=c
+ q(x, t)
t
x 2
Solution ------------------------------------------------------------------------------------------
To apply the eigenfunction expansions method, let

u(x,t) =
 B (t ) sin
n 1
n
n
x
L
(E-1)
The functions Bn(t) can be determined by substituting the above expression into the PDE
dBn
n
 n 
sin
x =  c2 


L
 L 
n 1 dt

2

 B (t ) sin
n 1
n
n
x + q(x, t)
L
(E-2)

n
 n 
qn (t ) sin
Let n = 
and
q(x,
t)
=
x. Since qn(t) are the coefficient for the sine


L
 L 
n 1
series expansion of q(x, t), we have
2
qn(t) =
2 L
nx
q( x, t ) sin(
)dx

L 0
L
(E-3)
Substituting the sine series expansion of q(x, t) into equation (E-2) and rearranging yields
n
 dBn

 c 2 n Bn  qn (t ) sin
x=0
L
dt

n 1

 
In order for equation (E-1) to be the solution of the PDE, we must have
dBn
 c 2 n Bn  qn (t ) = 0
dt
(E-4)
The above equation is a first order linear differential equation with integrating factor I(t)
given by


I(t) = exp  c 2 n dt = e c nt
2
3-63
The solution for equation (E-4) is then
t
2
2
Bn(t) = e  c nt bn   qn (t )e c nt dt 


0
The unknown constants bn can be determined from the initial condition
Bn(0) = bn
n
u(x,0) = f(x) =  Bn (0) sin
x=
L
n 1


b
n 1
n
sin
n
x
L
Therefore bn are the coefficients of the sine series expansions of f(x)
bn =
2 L
nx
f ( x ) sin(
)dx

L 0
L
For the specific case when c = 1, L = , q(x, t) = xe-t, and f(x) = 0 we have
bn =
2 L
nx
f ( x ) sin(
)dx = 0

0
L
L
t
Bn(t) = e  n t  qn (t )e n t dt
2
2
0
qn(t) =
Integration by part:
2 L
nx
2 t 
q
(
x
,
t
)
sin(
)
dx
e  x sin( nx )dx
=
0
L 0
L

 udv = uv   vdu
Let u = x  du = dx
dv = sin(nx) dx  v = 


0


0


0
1
cos(nx)
n

x sin( nx)dx = 
x

cos(nx ) 0 +
n
x sin( nx)dx = 
1


cos(n)  2 sin( nx ) 0
n
n
x sin( nx)dx = 

( 1)n
n

0
3-64
1
cos( nx )dx
n
2
qn(t) = =


e t  x sin( nx )dx = 
0
2

2
( 1)n e-t =  ( 1)n e-t
n
n

The unknown functions Bn(t) are then
t
Bn(t) = e  n t  qn (t )e n t dt = 
2
2
0
Bn(t) = 
Bn(t) =
t
2
2
2
( 1)n e  n t  e t e n t dt
0
n
2
2
2
2
1
2( 1) n  n 2t
( 1)n e  n t 2
e ( n 1) t |t0 =
e [1  e ( n 1) t ]
2
n
n 1
n(n  1)
2
2( 1) n
[ en t  e t ]
2
n(n  1)
The solution for this specific case is finally

u(x,t) =
 B (t ) sin nx
n 1
n
2
2( 1) n
[ e  n t  e  t ]sin nx

2
n 1 n( n  1)

u(x,t) =
The first term when n = 1 is undefined with the present form. L’Hospital rule may be used to
find the correct value for the first term with n = 1. Numerically, n = 1.01 can be substituted
for 1 to avoid division by zero. This simple substitution is used in the Matlab program to plot
the solutions at various times.
__________ Table 3.9-2 Matlab program to plot u(x,
% Eigenfunction expansions for example 3.9-2
clf;n=2:10;n=[1.01 n];
dx=pi/30; x=0:dx:pi;
in=1:10;
cn=(2.0./(n.*(n.*n-1))).*(-1).^in;
sinnx=sin(n'*x);
tv=[0 1 2 5];hold on
for i=1:4
t=tv(i);
Bmt=cn.*(exp(-n.*n*t)-exp(-t));
ux=Bmt*sinnx;
plot(x,ux)
end
grid on;xlabel('x');ylabel('u(x,t)')
3-65
t) ___________
0.8
0.7
0.6
0.5
u(x,t)
0.4
0.3
0.2
0.1
0
-0.1
0
0.5
1
1.5
2
2.5
x
Figure 3.9-5 Plot of u(x,t) at various times.
3-66
3
3.5
Download