Part 2: Separation of Variables

Solutions to many (but not all) partial differential equations can be obtained using the technique known as separation of variables. In separation of variables, we first assume that the solution is of the separated form
u( x,t) = f( x) T( t)
We then substitute the separated form into the equation, move the x-terms to one side, the t-terms to the other, and solve the resulting ordinary differential equations. A table of solutions to common differential equations is given below:
Equation
General Solution
y'' + w2y = 0
       
y( x) = Acos( wx) +Bsin( wx)
y'  = ky
y( t) = Pekt
y'' - w2y = 0
y( x) = Acosh(wx) +Bsinh( wx)
The resulting f( x) and T( t) are then recombined to produce a separated solution of the partial differential equation.

EXAMPLE 3    For k constant, find the separated solution to the Heat Equation
 u
t
= k  2u
x2
Solution: To do so, we substitute u( x,t) = f(x) T( t) into the equation to obtain
 
t
( f( x) T( t)) = k  2
x2
( f( x)T( t) )
Since f( x) does not depend on t, and since T(t) does not depend on x, we obtain
f( x)  
t
T( t) = kT(t)  2
x2
f( x)
which after evaluating the derivatives simplifies to
f( x) T ' (t) = kT(t) f'' (x)

        To separate the variables, we then divide throughout by kf( x) T( t) :
 f( x) T' ( t)
kf(x) T( t)
=  kT( t) f'' (x)
kf( x) T( t)
This in turn simplifies to
 T ' (t)
kT( t)
=  f'' (x)
f( x)
Notice now that
 
t
æ
è
 T' (t)
kT( t)
ö
ø
=  
t
æ
è
 f'' (x)
f( x)
ö
ø
   Þ      d
dt
æ
è
 T' (t)
kT( t)
ö
ø
= 0
Thus, T' (t) /T( t) must be constant. Likewise,
 
x
æ
è
 f'' (x)
f( x)
ö
ø
=  
x
æ
è
 T ' ( t)
kT( t)
ö
ø
   Þ      d
dx
æ
è
 f'' (x)
f( x)
ö
ø
= 0
Thus, f'' ( x) /f( x) must also be constant. That is, there is a constant l such that
 T  
kT
= l        and         f''
f
= l
These in turn reduce to the differential equations
T ' = lkT        and        f''  = lf
The solution to the first is an exponential function of the form
T( t) = Pelkt
If l > 0, however, then temperature would grow to ¥, which is not physically possible. Thus, we assume that l is negative, which is to say that l = -w2 for some number w. As a result, we have
f''   = -w2f        or        f''  + w2f = 0
The equation f'' + w2f = 0 is a harmonic oscillator and thus has a solution
f( x) = Acos( wx) +Bsin( wx)
Consequently, the separated solution for the heat equation is
u( x,t) = f( x) T( t) = Pelkt( Acos( wx) +Bsin( wx) )

       

It is important to note that in general a separated solution to a partial differential equation is not the only solution or form of a solution. Indeed, in the exercises, we will show that

 

 1
kt
e
-x2/(4kt)
 
u( x,t) = 
 
is also a solution to the heat equation in example 3.

As a simpler example, consider that F( x,y) = y-x2 is a solution to the partial differential equation
Fx+2xFy = 0
This is because substituting Fx = -2x and Fy = 1 into the equation yields
Fx+2xFy = -2x+2x·1 = 0
Now let's obtain a different solution by assuming a separated solution of the form F( x,y) = f( x) Y( y) .      

EXAMPLE 4    Find the separated solution to Fx+2xFy = 0.       

Solution: The separated form F( x,y) = f(x) Y( y) results in
 
x
( f( x) Y( y)) +2x  
y
( f( x) Y(y) ) = 0
which in turn leads to
f' ( x) Y( y) = -2xf( x)Y' ( y)
Dividing both sides by f( x) Y( y) leads to
 f' ( x)
-2xf( x)
=  Y ' ( y)
Y( y)
However, a function of x can be equal to a function of y for all x and y only if both functions are constant. Thus, there is a constant l such that
 f¢( x)
-2xf( x)
= l        and         Y ¢( y)
Y(y)
= l
It follows that Y' ( y) = lY( y) , which implies that Y( y) = C1ely. However, f' ( x) = lxf( x) , so that separation of variables yields
 df
dx
= -2lxf        Þ          df
f
= lxdx
Thus, òdf/f = lòxdx, which yields

ln| f|   =  

-lx2+C2

| f|    =  

e

-lx2+C2
  
f( x)   =  
±e
C2
 
 e
-lx2
 
If we let C3 = ±exp(C2), then f( x) = C3exp( x2/2) and the separated solution is
F( x,y) = 
Ce
-lx2
 
ely  = Ce
l(y-x2)
 
where C = C1C3 is an arbitrary constant.        
Notice that there are similarities between the separated solution
F( x,y) = Ce
l(y-x2)
   
and the other solution we stated earlier, F( x,y) = y-x2. However, the two solutions are clearly not the same.

Check your Reading: Why is this method called separation of variables?