In mathematics, separation of variables (also known as the Fourier method) is any of several methods for solving ordinary and partial differential equations, in which algebra allows one to rewrite an equation so that each of two variables occurs on a different side of the equation.
Ordinary differential equations (ODE) A differential equation for the unknown f(x) is separable if it can be written in the form
ddxf(x)=g(x)h(f(x)) where g and h are given functions. This is perhaps more transparent when written using y=f(x) as:
dydx=g(x)h(y). So now as long as h(y) ≠ 0, we can rearrange terms to obtain:
dyh(y)=g(x)dx, where the two variables x and y have been separated. Note dx (and dy) can be viewed, at a simple level, as just a convenient notation, which provides a handy mnemonic aid for assisting with manipulations. A formal definition of dx as a differential (infinitesimal) is somewhat advanced.
Alternative notation Those who dislike differentials as separate entities may prefer to write this as
1h(y)dydx=g(x), but that fails to make it quite as obvious why this is called "separation of variables". Integrating both sides of the equation with respect to x, we have
or equivalently,
∫1h(y)dy=∫g(x)dx because of the substitution rule for integrals. If one can evaluate the two integrals, one can find a solution to the differential equation. Observe that this process effectively allows us to treat the derivative dydx as a fraction which can be separated. This allows us to solve separable differential equations more conveniently, as demonstrated in the example below. (Note that we do not need to use two constants of integration, in equation (A1) as in
∫1h(y)dy+C1=∫g(x)dx+C2, because a single constant C=C2−C1 is equivalent.)
Example Population growth is often modeled by the "logistic" differential equation
dPdt=kP(1−PK) where P is the population with respect to time t, k is the rate of growth, and K is the carrying capacity of the environment. Separation of variables now leads to
∫dPP(1−P/K)=∫kdt which is readily integrated using partial fractions on the left side yielding
P(t)=K1+Ae−kt where A is the constant of integration. We can find A in terms of P(0)=P0 at t=0. Noting e0=1 we get
A=K−P0P0.
Generalization of separable ODEs to the nth order Much like one can speak of a separable first-order ODE, one can speak of a separable second-order, third-order or nth-order ODE. Consider the separable first-order ODE:
dydx=f(y)g(x) The derivative can alternatively be written the following way to underscore that it is an operator working on the unknown function, y:
dydx=ddx(y) Thus, when one separates variables for first-order equations, one in fact moves the dx denominator of the operator to the side with the x variable, and the d(y) is left on the side with the y variable. The second-derivative operator, by analogy, breaks down as follows:
d2ydx2=ddx(dydx)=ddx(ddx(y)) The third-, fourth- and nth-derivative operators break down in the same way. Thus, much like a first-order separable ODE is reducible to the form
dydx=f(y)g(x) a separable second-order ODE is reducible to the form
d2ydx2=f(y′)g(x) and an nth-order separable ODE is reducible to
dnydxn=f(y(n−1))g(x)
Example Consider the simple nonlinear second-order differential equation:y″=(y′)2.This equation is an equation only of y'' and y', meaning it is reducible to the general form described above and is, therefore, separable. Since it is a second-order separable equation, collect all x variables on one side and all y' variables on the other to get:d(y′)(y′)2=dx.Now, integrate the right side with respect to x and the left with respect to y':∫d(y′)(y′)2=∫dx.This gives−1y′=x+C1,which simplifies to:y′=−1x+C1 .This is now a simple integral problem that gives the final answer:y=C2−ln|x+C1|.
Partial differential equations
The method of separation of variables is also used to solve a wide range of linear partial differential equations with boundary and initial conditions, such as the heat equation, wave equation, Laplace equation, Helmholtz equation and biharmonic equation. The analytical method of separation of variables for solving partial differential equations has also been generalized into a computational method of decomposition in invariant structures that can be used to solve systems of partial differential equations.
Example: homogeneous case Consider the one-dimensional heat equation. The equation is
The variable u denotes temperature. The boundary condition is homogeneous, that is
Let us attempt to find a nontrivial solution satisfying the boundary conditions but with the following property: u is a product in which the dependence of u on x, t is separated, that is:
Substituting u back into equation (1) and using the product rule,
where λ must be constant since the right hand side depends only on x and the left hand side only on t. Thus:
and
−λ here is the eigenvalue for both differential operators, and T(t) and X(x) are corresponding eigenfunctions. We will now show that solutions for X(x) for values of λ ≤ 0 cannot occur: Suppose that λ < 0. Then there exist real numbers B, C such that
X(x)=Be−λx+Ce−−λx. From (2) we get
and therefore B = 0 = C which implies u is identically 0. Suppose that λ = 0. Then there exist real numbers B, C such that
X(x)=Bx+C. From (7) we conclude in the same manner as in 1 that u is identically 0. Therefore, it must be the case that λ > 0. Then there exist real numbers A, B, C such that
T(t)=Ae−λαt, and
X(x)=Bsin(λx)+Ccos(λx). From (7) we get C = 0 and that for some positive integer n,
λ=nπL. This solves the heat equation in the special case that the dependence of u has the special form of (3). In general, the sum of solutions to (1) which satisfy the boundary conditions (2) also satisfies (1) and (3). Hence a complete solution can be given as
u(x,t)=∑n=1∞DnsinnπxLexp(−n2π2αtL2), where Dn are coefficients determined by initial condition. Given the initial condition
we can get
f(x)=∑n=1∞DnsinnπxL. This is the Fourier sine series expansion of f(x) which is amenable to Fourier analysis. Multiplying both sides with sinnπxL and integrating over [0, L] results in
Dn=2L∫0Lf(x)sinnπxLdx. This method requires that the eigenfunctions X, here {sinnπxL}n=1∞, are orthogonal and complete. In general this is guaranteed by Sturm–Liouville theory.
Example: nonhomogeneous case Suppose the equation is nonhomogeneous,
with the boundary condition the same as (2) and initial condition same as (8). Expand h(x,t), u(x,t) and f(x) into
… excerpt ends here. Continue reading the full article.