3 Method of separation of variables - specific solutions

We shall now study some specific problems which can be fully solved by the separation of variables method.

Example

3 Solve the heat conduction equation

2 u x 2 = 1 2 u t

over     0 < x < 3 , t > 0    for the boundary conditions

u ( 0 , t ) = u ( 3 , t ) = 0

and the initial condition

u ( x , 0 ) = 5 sin 4 π x .

Solution

Assuming u ( x , t ) = X ( x ) T ( t ) gives rise to the differential equations (4) and (5) with the parameter k = 2 :

d T d t = 2 K T d 2 X d x 2 = K X The T equation has general solution

T = A e 2 K t

which will increase exponentially with increasing t if K is positive and decrease with t if K is negative. In any physical problem the latter is the meaningful situation. To emphasise that K is being taken as negative we put

K = λ 2

so

T = A e 2 λ 2 t .

The X equation then becomes

d 2 X d x 2 = λ 2 X

which has solution

X ( x ) = B cos λ x + C sin λ x .

Hence

u ( x , t ) = X ( x ) T ( t ) = ( D cos λ x + E sin λ x ) e 2 λ 2 t (11)

where D = A B and E = A C .

(You should always try to keep the number of arbitrary constants down to an absolute minimum by multiplying them together in this way.)

We now insert the initial and boundary conditions to obtain the constant D and E and also the separation constant λ .

The initial condition u ( 0 , t ) = 0 gives

( D cos 0 + E sin 0 ) e 2 λ 2 t = 0 for all t .

Since sin 0 = 0 and cos 0 = 1 this must imply that D = 0 .

The other initial condition u ( 3 , t ) = 0 then gives

E sin ( 3 λ ) e 2 λ 2 t = 0 for all t .

We cannot deduce that the constant E has to be zero because then the solution (11) would be the trivial solution u 0 . The only sensible deduction is that

sin 3 λ = 0 i.e. 3 λ = n π (where n is some integer).

Hence solutions of the form (11) satisfying the 2 boundary conditions have the form

u ( x , t ) = E n sin n π x 3 e 2 n 2 π 2 t 9

where we have written E n for E to allow for the possibility of a different value for the constant for each different value of n .

We obtain the value of n by using the initial condition u ( x , 0 ) = 5 sin 4 π x and forcing this solution to agree with it. That is,

u ( x , 0 ) = E n sin n π x 3 = 5 sin 4 π x

so we must choose n = 12 with E 12 = 5 .

Hence, finally,

u ( x , t ) = 5 sin 12 π x 3 e 2 9 ( 12 ) 2 π 2 t = 5 sin ( 4 π x ) e 32 π 2 t .

Task!

Solve the 1 -dimensional wave equation 2 u x 2 = 1 16 2 u t 2   for  0 < x < 2 , t > 0

The boundary conditions are

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

The initial conditions are

(i)   u ( x , 0 ) = 6 sin π x 3 sin 4 π x (ii)   u t ( x , 0 ) = 0

Firstly, either using (7) and (8) or by working from first principles assuming the product solution

u ( x , t ) = X ( x ) T ( t ) ,

write down the ODEs satisfied by X ( x ) and T ( t ) :

X X = K T 16 T = K

Now decide on the appropriate sign for K and then write down the solution to these equations:

Choosing K as negative (say K = λ 2 ) will produce Sinusoidal solutions for X and T which are appropriate in the context of the wave equation where oscillatory solutions can be expected.

Then X = λ 2 X gives

X = A cos λ x + B sin λ x

Similarly T = 16 λ 2 T gives

T = C cos 4 λ t + D sin 4 λ t

Now obtain the general solution u ( x , t ) by multiplying X ( x ) by T ( t ) and insert the two boundary conditions to obtain information about two of the constants:

u ( x , t ) = ( A cos λ x + B sin λ x ) ( C cos 4 λ t + D sin 4 λ t )

u ( 0 , t ) = 0 for all t gives

A ( C cos 4 λ t + D sin 4 λ t ) = 0

which implies that A = 0 .

u ( 2 , t ) = 0 for all t gives

B sin 2 λ ( C cos 4 λ t + D sin 4 λ t ) = 0

so, for a non-trivial solution,

sin 2 λ = 0 i.e. λ = n π 2 for some integer n .

At this stage we write the solution as

u ( x , t ) = sin n π x 2 ( E cos 2 n π t + F sin 2 n π t )

where we have multiplied constants and put E = B C and F = B D . Now insert the initial condition

u t ( x , 0 ) = 0 for all x 0 < x < 2.

and deduce the value of F :

Differentiating partially with respect to t

u t = sin n π x 2 2 n π E sin 2 n π t + 2 n π F cos 2 n π t

so at t = 0

u t ( x , 0 ) = sin n π x 2 2 n π F = 0

from which we must have that F = 0 . Finally using the other the initial condition   u ( x , 0 ) = 6 sin ( π x ) 3 sin ( 4 π x )  deduce the form of u ( x , t ) :

At this stage the solution reads

u ( x , t ) = E sin n π x 2 cos ( 2 n π t ) (12)

We now have to insert the last condition i.e. the initial condition

u ( x , 0 ) = 6 sin π x 3 sin 4 π x (13)

This seems strange because, putting t = 0 in our solution (12) suggests

u ( x , 0 ) = E sin n π x 2

At this point we seem to have incompatability because no single value of n will enable us to satisfy (13). However, in the solution (12), any positive integer value of n is acceptable and we can in fact, superpose solutions of the form (12) and still have a valid solution to the PDE Hence we first write, instead of (12)

u ( x , t ) = n = 1 E n sin n π x 2 cos ( 2 n π t ) (14)

from which

u ( x , 0 ) = n = 1 E n sin n π x 2 (15)

(which looks very much like, and indeed is, a Fourier series.)

To make the solution (15) fit the initial condition (13) we do not require all the terms in the infinite Fourier series. We need only the terms with n = 2 with coefficient E 2 = 6 and the term for which n = 8 with E 8 = 3 . All the other coefficients E n have to be chosen as zero.

Using these results in (14) we obtain the solution

u ( x , t ) = 6 sin π x cos 4 π t 3 sin 4 π x cos 16 π t

The above solution perhaps seems rather involved but there is a definite sequence of logical steps which can be readily applied to other similar problems.