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

(−α

2

)sin(

αnπ

2t)+bn

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

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

4t)+bn sin

4t))

sin(nπx

4

)

34.2. HEAT AND WAVE EQUATIONS 677Now you need to find a, and b,, to get the initial conditions. Letting t = 0, you need to have— . (NM1—(1-x) = 2 ansin (>)n=and this is something which was done earlier. You need16 ;an = 7 | _ (1) )Next, what about b,,? Differentiate both sides. Thusuy (x,t) = y (a (-a%*) sin (ar) +bp (a) cos (ar)) sin ()1Of 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- nt mmx0O= by (a) sin ()Ldn las )sin (5Clearly you should take b, = 0. Therefore, the desired solution iswn=E (ae em (0.20598) ) in (")Let’s let @* = .09. Then the specific solution isw= (ae pem (222)) a B)Note that from calculus, the series makes perfect sense because in fact, it convergesabsolutely.Example 34.2.5 Solve the initial boundary value problemUr = Cu, u(O,t)=u (4,1) =0,u(x,0) = f(x)u,(x,0) = 0where2rey=4 1 —(x—2)? on [1,3]0 on the rest of (0,4|By similar reasoning to the above example,= y (a cos (Ca) + by, sin (a) sin (=)a 4 " 4 4