# Di

erential Equations

# Lecture 40: Separation of Variables and Heat Equation IVPs

our eigenvalues have to be positive. Letting λ = X(x) = B cos(

2

for

>

0, our general solution is

x) + C sin(

x).

The first boundary condition says B = 0. The second condition says that X(l) = C sin( l) = 0. To avoid only having the trivial solution, we must have l = nπ. In other words,

λ_{n }=

nπ l

2

and

X n ( x ) = s i n

nπx l

for n = 1, 2, 3, . . . So we end up having found an infinite number of solutions to our boundary value problem (40.1a) and (40.1b), one for each positive integer n (and no other values of n, since our eigenvalues

are all positive). They are

u_{n}(x, t) = A_{n}e

(

n l

) kt

sin

nπx l

.

The heat equation is linear and homogeneous. As such, the Principle of Superposition still holds: a linear combination of solutions is again a solution. So any function of the form

## N

u(x, t) =

X

A_{n}e

(

n l

) kt

sin

nπx l

(40.3)

n=

is also a solution to (40.1a) and (40.1b).

Notice that we haven’t used our initial condition (40.1c) yet, which is why we referred to (39.6) as a solutions to just the boundary value problem. How does our initial data come into play? We have

## N

f(x) = u(x, 0) =

X

A_{n }sin

nπx l

.

n=

So if our initial condition has this form, (40.3) works perfectly for us, with the coefficients A_{n }just being the associated coefficients from f(x).

Example 40.1 Find the solution to the following heat equation problem on a rod of length 2.

u_{t }= u_{xx }u(0, t) = u(2, t) = 0

u(x, 0) = sin

3πx 2

5 sin(3πx)

In this problem, we have k = 1. Now, we know that our solution will have the form of something like (40.3), since our initial condition is just the di erence of two sine functions. We just need to figure out which terms are represented and what the coefficients A_{n }are.

This isn’t too hard to do: our initial condition is

f(x) = sin

3πx 2

5 sin(3πx).

Looking at (40.3) with l = 2, we can see that the first term corresponds to n = 3 and the second

n = 6, and there are no other terms.

# Thus we have A_{3 }= 1, A_{6 }=

5, and all other A_{n }= 0.

Our

solution is then

u(x, t) = e

“_{9 }

4

”

^{t }sin

3πx

2

5e

(9π )t

sin (3πx) .

3