
Nonhomogeneous Partial Differential Equations 495
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..a,thickness=10);
26
24
22
20
18
16
14
12
10
0.2 0.4
x
0.6 0.8 10
Figure 8.1
EXAMPLE 8.4.2: We seek the temperature distribution u(x, t) in a thin rod whose lateral
surface is insulated over the interval I ={x |0 <x<1}. The left end of the rod is up against a
temperature bath with an oscillatory temperature variation, and the right end is held at the fixed
temperature of zero. There is no internal heat source. The thermal diffusivity of the rod is
k = 1/4, and the rod has an initial temperature distribution u(x, 0) = f(x) given as follows.
SOLUTION: The nonhomogeneous diffusion equation is
∂
∂t
u(x, t) = k
∂
2
∂x
2
u(x, t)
+h(x, t)
The boundary conditions are nonhomogeneous type 1 at the left and homogeneous type 1 at the
right:
u(0,t)= sin(t) and u(1,t)= 0
The initial condition is
u(x, 0) = x(1 −x)
The internal heat source term is
h(x, t) = 0