682 CHAPTER 34. SOME PARTIAL DIFFERENTIAL EQUATIONS

The eigenfunctions are sin( nπ

L x). Then the expansion for (x/L)sin(t) is

∑n=1

(2L

∫ L

0

( xL

sin t)

sin(nπ

Lx)

dx)

sin(nπ

Lx)

=∞

∑n=1

(2(−1)n+1

πnsin(t)

)sin(nπ

Lx)

then the solution is

w(x, t) =∞

∑n=1

bn (t)sin(nπ

Lx)

where

b′′n (t) =−n2π2

L2 bn (t)+2(−1)n+1

πnsin(t) (*)

The Fourier series expansion for wt (x, t) =− xL cos(t) in terms of these eigenfunctions is

∑n=1

(2L

∫ L

0

(− x

Lcos(t)

)sin(nπx

L

)dx)

sin(nπx

L

)=

∑n=1

(2(−1)n

πncos t

)sin(nπx

L

)Now the solution to ∗ is bn (t) =(

cos(

π

Lnt))

bn (0)+1π

Ln

(sin(

π

Lnt))

b′n (0)+2(−1)n+1 L2 sin tπ3n3−πL2n

Clearly the initial condition for w gives bn (0) = 0. It remains to find b′n (0) . The solu-tion is

w(x, t) =∞

∑n=1

(1π

Ln

(sin(

π

Lnt))

b′n (0)+2(−1)n+1 L2 sin tπ3n3−πL2n

)sin(nπ

Lx)

Now

wt (x, t) =∞

∑n=1

((cos

π

Lnt)

b′n (0)+2(−1)n+1 L2(

cos tπ3n3−πL2n

))sin(nπ

Lx)

and so the initial condition for wt requires

∑n=1

(b′n (0)+

2(−1)n+1 L2

π3n3−πL2n

)sin(nπ

Lx)=

∑n=1

(2(−1)n

πn

)sin(nπx

L

)and so

b′n (0) = 2(−1)n

πn− 2(−1)n+1 L2

π3n3−πL2n= 2(−1)n

πn

π2n2−L2

Thus

w(x, t) =∞

∑n=1

(2(−1)n L sin π

L ntπ2n2−L2

+2(−1)n+1 L2 sin tπ3n3−πL2n

)sin(nπ

Lx)

Therefore, u(x, t) = w(x, t)+ xL sin(t) .

682 CHAPTER 34. SOME PARTIAL DIFFERENTIAL EQUATIONS(47xThe eigenfunctions are sin . Then the expansion for (x/L) sin (t) is(7x)al nt _ (nt= = = sin?) ) sin (“ x) dx ) sin a)Ff ( L L(—1) ml _ (nt- £0 sin ) sin (x)Mee ims ©2nthen the solution is— ntw (xt) = YY ba (t)sin Gan=1where 5 7nen (-1)"™ .The Fourier series expansion for w; (x,t) = —7 cos (t) in terms of these eigenfunctions isEi Cin) se) 4) 0")n=1= y (2 cos) sin (=)n=1Now the solution to * is b, (t) =(cos (=nr)) bn (0) + IL (sin (Fnr)) bi, (0) +2(-1)""! pintL " Tn L ” ™n3 —2L2nClearly the initial condition for w gives b, (0) = 0. It remains to find b/, (0). The solu-tion is1L/. /% ' ntl 72 sint (nt(45 (sin (Zar) of (0)-+2(—1) Pann) (T*)w (x,t) = yn=1Now_ - un ! _4yntl 72 cost : nnwz (x,t) > ( (cos Zn) b, (0) +2(-1)""L (a “om )) sin ( L x)and so the initial condition for w; requiresE (ui0y Jin (Es) = (25S) inn=1 n=1and so an npb! (0) =2(-2 _ 2(=1) L? _ (—1)"2 n” mn mn — nL2n mn? — L?Thus _aE ( oe) sin_ a 12 sint st L *n=l mni—nl?nTherefore, u(x,t) = w(x,t) +7 sin a .