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) .