Separation of Variables

The method of separation of variables works for linear problems, as is illustrated here for the diffusion equation

with boundary and initial conditions

We try a solution of the form

and substitute this form into the equation, separating terms to give

One side of this equation is a function of x alone while the other side is a function of t alone. Thus, both sides must be a constant. Otherwise, if x is changed one side changes, but the other cannot because it depends only on t. Call the constant ­l and write the separate equations

The first equation is easily solved

and the second equation is written in the form

Next consider the boundary conditions. If we write them as

we find it difficult to satisfy the boundary conditions. This is because the boundary conditions are not homogeneous, with a zero right-hand side. Thus we need to transform the problem to make the boundary conditions homogeneous. Let us write the solution as the sum of two functions, one of which

satisfies the non-homogeneous boundary conditions and the other of which satisfies the homogeneous boundary conditions.

Now the combined function satisfied the boundary conditions. In this case the function f(x) can be taken as

The equation for u is found by substituting for c in the original equation and noting that the f(x) drops out for this case; it need not disappear in the general case.

The boundary conditions for u are

The initial conditions are found from the initial condition

We now apply separation of variables to this equation by writing

We arrive at the same equation for T(t) and X(x), but with X(0) = X(1) = 0.

Next we solve for X(x). The equation is an eigenvalue problem. The general solution is obtained by trying emx and finding that m2 + l = 0, thus m = ±i l. The exponential term

is written in terms of sines and cosines, so that the general solution is

The boundary conditions are

Now if B = 0 we need E 0 to have any solution at all. Thus we need to have l that satisfies

This is true for certain values of l, called eigenvalues or characteristic values. Here they are

For each eigenvalue we have a corresponding eigenfunction

The composite solution is then

This function satisfies the boundary conditions and differential equation but not the initial condition. To make the function satisfy the initial condition we add up several of these solutions, each with a different eigenfunction, and replace EA by An.

The constants An are chosen by making u(x,t) satisfy the initial condition.

We define the residual as the error in the initial condition.

Next apply the Galerkin method and make the residual orthogonal to a complete set of functions, which are the eigenfunctions.

The Galerkin criterion for finding An is the same as the least squares criterion [Finlayson, 1980, p. 183]. The final solution is then

This is an 'exact' solution to the linear problem. It can be evaluated to any desired accuracy by taking more and more terms, but if a finite number of terms are used there is always some error. For large times a single term is adequate, whereas for small times a great many terms are needed. For small times the Laplace transform method is also useful, since it leads to solutions which converge with fewer terms. For small times, the method of combination of variable may be used as well. For nonlinear problems the method of separation of variables fails and one of the other methods in the section must be used.

Take Home Lesson: Separation of Variables can be applied to linear partial differential equations, and works best for solutions past an initial transient (when many terms are needed). It cannot be applied to nonlinear problems.