34.2. HEAT AND WAVE EQUATIONS 677
Now you need to find an and bn to get the initial conditions. Letting t = 0, you need to have
1− (1− x)2 =∞
∑n=1
an sin(nπx
2
)and this is something which was done earlier. You need
an =16
π3n3 (1− (−1)n)
Next, what about bn? Differentiate both sides. Thus
ut (x, t) =∞
∑n=1
(an
(−α
nπ
2
)sin(
αnπ
2t)+bn
(α
nπ
2
)cos(
αnπ
2t))
sin(nπx
2
)Of course this operation is complete garbage because it involves the interchange of limitoperations without any justification. However, we do it anyway. In fact it is all right. Youcan do the formal manipulations and then you can rigorously verify that what you end upwith really is a solution to the problem in some sense. Now plug in t = 0. Then you need
0 =∞
∑n=0
bn
(α
nπ
2
)sin(mπx
2
)Clearly you should take bn = 0. Therefore, the desired solution is
u(x, t) =∞
∑n=1
(32
π3 (2n−1)3 cos(
α(2n−1)π
2t))
sin(nπx
2
)Let’s let α2 = .09. Then the specific solution is
u(x, t) =∞
∑n=1
(32
π3 (2n−1)3 cos(.3(2n−1)π
2t))
sin(nπx
2
)Note that from calculus, the series makes perfect sense because in fact, it converges
absolutely.
Example 34.2.5 Solve the initial boundary value problem
utt = α2uxx, u(0, t) = u(4, t) = 0,
u(x,0) = f (x)
ut (x,0) = 0
where
f (x) =
{1− (x−2)2 on [1,3]0 on the rest of [0,4]
By similar reasoning to the above example,
u(x, t) =∞
∑n=1
(an cos
(α
nπ
4t)+bn sin
(α
nπ
4t))
sin(nπx
4
)