680 CHAPTER 34. SOME PARTIAL DIFFERENTIAL EQUATIONS

You must have λ strictly positive. The eigenvalues are λ =( nπ

2

)2, and the eigenfunctions

are sin( nπx

2

). Also, there is a Fourier series expansion for f (x, t) as follows.

f (x, t) =∞

∑n=1

fn (t)sin(nπx

2

)where

fn (t) =22

∫ 2

0f (x, t)sin

(nπx2

)dx

Thus

fn (t) =∫ 2

0(xt)sin

(nπx2

)dx =

1π2n2

(4πnt (−1)n+1

)Now the solution is

u(x, t) =∞

∑n=0

 e−(nπ2 )

2t(∫ L

0 usin( nπu

2

)du)+∫ t

0 e−(nπ2 )

2(t−s)

(1

π2n2

(4πns(−1)n+1

))ds

sin(nπx

2

)Once you know how to solve this kind of problem, it becomes routine, if long, to find

solutions to problems like this.

Example 34.3.2 Find the solution to the initial-boundary value problem

ut (x, t) = uxx (x, t)+ f (x, t)u(0, t) = 0,u(L, t) = g(t)

u(x,0) = h(x)

In this case, you massage the problem to get one which is like one you do know how todo which involves zero boundary conditions. Let

w(x, t) = u(x, t)− xL

g(t)

then

wt = ut −xL

g′ (t) = uxx + f − xL

g′ (t) = wxx + f (x, t)− xL

g′ (t)

w(0, t) = u(0, t) = 0, w(L, t) = u(L, t)−g(t) = 0

w(x,0) = u(x,0)− xL

g(0) = h(x)− xL

g(0)

and now you solve for w using the above procedure. There are seemingly endless variationsof this but all amount to the following.

PROCEDURE 34.3.3 To solve

ut = Au+ f

nonzero boundary conditions

initial condition u(x,0) = l (x)

680 CHAPTER 34. SOME PARTIAL DIFFERENTIAL EQUATIONS. ws . 2 . .You must have A strictly positive. The eigenvalues are 1 = (3) , and the eigenfunctionsare sin (25%). Also, there is a Fourier series expansion for f (x,t) as follows.NTNXflat) = Yh (t) sin (>)whereThus_y oF) (Ji wsin ("4) due) + pnmxn=0 \ fy o-CE) (ts) (ao (42ns(—1)"*") ) ds sm (>)Once you know how to solve this kind of problem, it becomes routine, if long, to findsolutions to problems like this.Example 34.3.2 Find the solution to the initial-boundary value problemut (x,t) = Uxx (x,t) + f (x,0)u(0,t) =0,u(L,t) = g(t)u(x,0) =h(x)In this case, you massage the problem to get one which is like one you do know how todo which involves zero boundary conditions. Letw(x.t) =ula,t) = F(t)thenw= mF 8'() ut f—F8 (t) = Wat Fe) —F8' )w(0,t) = u(0,t)=0, w(L,t) =u(L,t)—g(t) =0w(x,0) = u(x,0)—Fg(0) =A(x)—F8(0)and now you solve for w using the above procedure. There are seemingly endless variationsof this but all amount to the following.PROCEDURE 34.3.3 % solveu, = Au+ fnonzero boundary conditionsinitial condition u(x,0) = 1 (x)