Differential Equations › Section I · Partial differential equations › Topic I.4
Separation of variables
A partial differential equation is hard; two ordinary ones are familiar. Separation of variables guesses a solution that is a product of one-variable functions, and that guess splits the heat, wave and Laplace equations into ODEs you already know how to handle.
The idea: guess a product
Separation of variables looks for solutions of the form
a function of \(x\) alone times a function of \(t\) alone, called a product solution. The honest justification for this guess is that it works, turning one PDE into two ODEs. The method needs a linear homogeneous PDE with linear homogeneous boundary conditions, in the sense of PDE terminology. The initial condition is set aside for now: a single product rarely matches it, but by superposition a sum of products can, as the next topics show.
Separating the heat equation
Substitute \(u = X(x)T(t)\) into \(u_t = k\,u_{xx}\). Since \(X\) does not depend on \(t\), \(u_t = X\,T'\); since \(T\) does not depend on \(x\), \(u_{xx} = X''\,T\). The equation becomes \(X\,T' = k\,X''\,T\). Now divide both sides by \(k\,X\,T\) to gather each variable on its own side:
The left side involves only \(t\) and the right side only \(x\). That is the moment the variables separate, and it is what the method is named after. Putting \(k\) with \(T\) is a choice that keeps the \(x\)-equation simple.
Why both sides equal a constant
Hold \(t\) fixed and let \(x\) vary. The left side cannot change, because it does not involve \(x\), so the right side must stay the same for every \(x\). By the same argument with \(t\) varying, the left side is constant too. So both sides equal one constant, written \(-\lambda\):
The minus sign is only a convention. It makes the \(x\)-equation read \(X'' + \lambda X = 0\), exactly the form studied in Eigenvalues and eigenfunctions. The two ODEs are
Boundary conditions carry over
Suppose the ends are held at zero, \(u(0, t) = 0\). Then \(X(0)\,T(t) = 0\) for every \(t\). Either \(T(t)\) is zero for all \(t\), which gives only the trivial solution \(u = 0\), or \(X(0) = 0\). So a homogeneous condition on \(u\) becomes a condition on \(X\). In the same way, an insulated end, \(u_x(L, t) = 0\), becomes \(X'(L) = 0\), and periodic conditions become \(X(-L) = X(L)\) and \(X'(-L) = X'(L)\). The initial condition does not carry over: \(X(x)\,T(0) = f(x)\) would force \(f\) to be a multiple of \(X\), which is rarely true.
Worked example: a bar with both ends at zero
Separate \(u_t = k\,u_{xx}\) on \(0 \le x \le L\) with \(u(0, t) = u(L, t) = 0\). 1. Product: \(u = X(x)T(t)\) gives \(T'/(kT) = X''/X = -\lambda\). 2. Time equation: \(T' = -k\lambda T\), so \(T = Ce^{-k\lambda t}\). 3. Space problem: \(X'' + \lambda X = 0\), \(X(0) = 0\), \(X(L) = 0\). 4. From Eigenvalues and eigenfunctions, it has nonzero solutions only for \(\lambda_n = (n\pi/L)^2\), with \(X_n = \sin(n\pi x/L)\), \(n = 1, 2, 3, \ldots\) 5. Check one product:
Both sides of the PDE equal \(-k(n\pi/L)^2 u_n\), and \(u_n\) is zero at both ends.
Separating the wave equation
For \(u_{tt} = c^2 u_{xx}\), the product \(u = X(x)T(t)\) gives \(X\,T'' = c^2 X''\,T\). Dividing by \(c^2 X\,T\) and introducing the constant as before:
so \(X'' + \lambda X = 0\) and \(T'' + c^2\lambda\,T = 0\). The space equation is the same as for heat, so fixed ends give the same eigenvalues. Only the time equation differs, and it is second order, which matches the two initial conditions the wave equation needs. Like the heat problem's initial temperature, the starting shape and velocity are set aside for now.
Worked example: a string with fixed ends
Separate \(u_{tt} = c^2 u_{xx}\) with \(u(0, t) = u(L, t) = 0\), and find the product solutions. 1. The space problem is \(X'' + \lambda X = 0\), \(X(0) = X(L) = 0\), so again \(\lambda_n = (n\pi/L)^2\) and \(X_n = \sin(n\pi x/L)\). 2. The time equation is \(T'' + (n\pi c/L)^2 T = 0\), whose characteristic roots are \(\pm i\,n\pi c/L\). 3. So
4. Product: \(u_n = \sin(n\pi x/L)\,T_n(t)\). 5. Contrast: heat products decay, while string products oscillate forever.
Separating Laplace's equation
On a rectangle \(0 \le x \le L\), \(0 \le y \le H\), take \(u_{xx} + u_{yy} = 0\) with \(u = 0\) on three sides and \(u(x, H) = f(x)\) on the top. Both variables are spatial, so there is no initial condition. The product \(u = X(x)Y(y)\) gives \(X''Y + XY'' = 0\), so
The rule of thumb is to give the eigenvalue problem to the variable with two homogeneous conditions. Here that is \(x\): \(X'' + \lambda X = 0\), \(X(0) = X(L) = 0\). The other equation is \(Y'' - \lambda Y = 0\) with \(Y(0) = 0\), and the nonzero top edge is handled later.
Worked example: a bar losing heat through its sides
A bar whose sides lose heat in proportion to its temperature obeys \(u_t = k\,u_{xx} - \alpha u\), with \(\alpha > 0\) and both ends at zero. 1. The equation is linear and homogeneous, since \(u = 0\) satisfies it. 2. Substitute: \(XT' = kX''T - \alpha XT\). 3. Divide by \(kXT\):
4. ODEs: \(X'' + \lambda X = 0\) with \(X(0) = X(L) = 0\), and \(T' = -(k\lambda + \alpha)T\). 5. Check: \(X = \sin(\sqrt{\lambda}\,x)\) times \(T = e^{-(k\lambda + \alpha)t}\) satisfies the PDE. Every mode decays faster than in a bar with insulated sides.
When separation fails
The method breaks down if its conditions are not met. A nonhomogeneous boundary condition, such as an end held at 50 °C, gives \(X(0)\,T(t) = 50\) for all \(t\), which yields no condition on \(X\) alone; Heat equation with nonzero boundaries shows how to remove it first. A nonhomogeneous PDE, such as one with a source term \(xt\), cannot be divided into a pure \(x\) side and a pure \(t\) side. Nor can an equation such as \(u_t = (x + t)\,u_{xx}\), whose coefficient mixes the variables: dividing gives \(T'/T = (x + t)X''/X\), and the right side still contains \(t\).
Common mistakes to avoid
First, setting the two sides equal to different constants, or to a function; one constant links them. Second, forgetting to move the constant \(k\) or \(c^2\) to the time side, which makes the space problem messier. Third, applying the initial condition to a single product; it is matched later by a sum. Fourth, dividing by \(X\,T\) and then dropping the case \(T \equiv 0\) without saying it gives only the trivial solution. Fifth, choosing the wrong variable for the eigenvalue problem in Laplace's equation; it must be the one with two homogeneous conditions.
Key takeaways
For a linear homogeneous PDE with linear homogeneous boundary conditions, try \(u = X(x)T(t)\). Divide to put each variable on its own side; both sides then equal a constant \(-\lambda\). The heat equation gives \(X'' + \lambda X = 0\) and \(T' = -k\lambda T\); the wave equation gives the same space problem and \(T'' + c^2\lambda T = 0\). Boundary conditions on \(u\) become conditions on \(X\), unless \(u\) is trivial. For Laplace's equation, give the eigenvalue problem to the variable with two homogeneous conditions. Initial conditions wait for superposition.
Flashcards
Flashcard
u(x, t) = X(x) T(t)
Test your understanding
Question 1 of 5
Substituting u = X(x)T(t) into uₜ = 4uₓₓ and separating with constant −λ gives which pair of ODEs?
Question 2 of 5
Why must T′/(kT) and X″/X equal the same constant?
Question 3 of 5
A product solution u = X(x)T(t) satisfies uₓ(0, t) = 0 for all t, and u is not identically zero. What condition does this give?
Question 4 of 5
Separating uₜₜ = 9uₓₓ with constant −λ gives which time equation?
Question 5 of 5
Which problem can be separated directly into ODEs with homogeneous conditions on X?
