34.3. NONHOMOGENEOUS PROBLEMS 679

and it is assumed that one can obtain a valid Fourier series expansion in terms of theseeigenfunctions of all the functions of interest. Note how, for the sake of simplicity, it isassumed that ∫ L

0y2

n (x)dx = 1

You multiply by an appropriate constant to make it this way. Thus, if the eigenfunctionsare multiples of sin

( nπ

L x), you choose the multiple to satisfy the above equation. Let

f (x, t) =∞

∑n=0

fn (t)yn (x)

Thus it is desired to have

∑n=0

b′n (t)yn (x) =−a∞

∑n=0

λ nbn (t)yn (x)+∞

∑n=0

fn (t)yn (x)

and this is achieved ifb′n (t) =−aλ nbn (t)+ fn (t)

which is a familiar equation, the solution being

bn (t) = e−aλ ntbn (0)+∫ t

0e−aλ n(t−s) fn (s)ds

Then the solution is

u(x, t) =∞

∑n=0

(e−aλ ntbn (0)+

∫ t

0e−aλ n(t−s) fn (s)ds

)yn (x)

where bn (0) needs to be chosen to satisfy the initial condition. Thus it is required that

bn (0) =∫ L

0g(u)yn (u)du

In what was done earlier, yn was typically something like (2/L)1/2 sin( nπx

L

). Then the

solution is

u(x, t) =∞

∑n=0

(e−aλ nt

(∫ L

0g(u)yn (u)du

)+∫ t

0e−aλ n(t−s) fn (s)ds

)yn (x)

Example 34.3.1 Find the solution to

ut (x, t) = uxx (x, t)+ f (x, t)

u(0, t) = 0 = u(2, t)u(x,0) = x

where f (x, t) = xt.

First find the eigenfunctions and eigenvalues for the equation

y′′+λy = 0,y(0) = 0 = y(2)

34.3. NONHOMOGENEOUS PROBLEMS 679and it is assumed that one can obtain a valid Fourier series expansion in terms of theseeigenfunctions of all the functions of interest. Note how, for the sake of simplicity, it isassumed that 1[ y, (x)dx =1You multiply by an appropriate constant to make it this way. Thus, if the eigenfunctionsare multiples of sin (4 x), you choose the multiple to satisfy the above equation. Letxf) = Y fh (1) yn (0)Thus it is desired to haveEH, (vn (8) =a Ab (Oy) + fan=0n=0and this is achieved ifbi (t) = —aA nbn (t) + fn (0)which is a familiar equation, the solution beingb(t) = eto (0) + [e-Anl— fy (9)Then the solution isu(x,t) = y. (<0, (0 )+ [e ~aanlts) fn(s)ds) n (x)n=0where D,, (0) needs to be chosen to satisfy the initial condition. Thus it is required that0)= [ gwynluauIn what was done earlier, y, was typically something like (2/L)'/ * sin (4%). Then thesolution iswont = (eo ( [a tudyn (udu) + [ee f(a) yn(aExample 34.3.1 Find the solution toUr (x,t) = Uxx (x,t) + f (x,0)u(0,t) = O=u(2,r)u(x,0) = xwhere f (x,t) =xt.First find the eigenfunctions and eigenvalues for the equationy" +Ay =0,y(0) =0=y(2)