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.
A differential equation for the unknown
f(x)
d | |
dx |
f(x)=g(x)h(f(x))
where
g
h
y=f(x)
dy | |
dx |
=g(x)h(y).
So now as long as h(y) ≠ 0, we can rearrange terms to obtain:
{dy\overh(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.
Those who dislike Leibniz's notation may prefer to write this as
1 | |
h(y) |
dy | |
dx |
=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
or equivalently,
\int
1 | |
h(y) |
dy=\intg(x)dx
because of the substitution rule for integrals.
dy | |
dx |
(Note that we do not need to use two constants of integration, in equation as in
\int
1 | |
h(y) |
dy+C1=\intg(x)dx+C2,
C=C2-C1
Population growth is often modeled by the "logistic" differential equation
dP | =kP\left(1- | |
dt |
P | |
K |
\right)
where
P
t
k
K
\begin{align} &\int
dP | |
P\left(1-P/K\right) |
=\intkdt \end{align}
P(t)= | K |
1+Ae-kt |
where A is the constant of integration. We can find
A
P\left(0\right)=P0
e0=1
A= | K-P0 |
P0 |
.
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:
dy | |
dx |
=f(y)g(x)
dy | = | |
dx |
d | |
dx |
(y)
d2y | |
dx2 |
=
d | \left( | |
dx |
dy | |
dx |
\right)=
d | \left( | |
dx |
d | |
dx |
(y)\right)
dy | |
dx |
=f(y)g(x)
d2y | |
dx2 |
=f\left(y'\right)g(x)
dny | |
dxn |
=f\left(y(n-1)\right)g(x)
Consider the simple nonlinear second-order differential equation:This equation is an equation only of y'' and y'
See also: Separable partial differential equation.
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.[1]
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 solution which is not identically zero 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 and using the product rule,
Since the right hand side depends only on x and the left hand side only on t, both sides are equal to some constant value −λ. 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\sqrt{-λx}+Ce-\sqrt{-λx}.
From 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 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-λ,
X(x)=B\sin(\sqrt{λ}x)+C\cos(\sqrt{λ}x).
From we get C = 0 and that for some positive integer n,
\sqrt{λ}=n
\pi | |
L |
.
This solves the heat equation in the special case that the dependence of u has the special form of .
In general, the sum of solutions to which satisfy the boundary conditions also satisfies and . Hence a complete solution can be given as
u(x,t)=
infty | |
\sum | |
n=1 |
Dn\sin
n\pix | \exp\left(- | |
L |
n2\pi2\alphat | |
L2 |
\right),
where Dn are coefficients determined by initial condition.
Given the initial condition
u|t=0=f(x),
we can get
f(x)=
infty | |
\sum | |
n=1 |
Dn\sin
n\pix | |
L |
.
This is the sine series expansion of f(x) which is amenable to Fourier analysis. Multiplying both sides with and integrating over results in
Dn=
2 | |
L |
L | |
\int | |
0 |
f(x)\sin
n\pix | |
L |
dx.
This method requires that the eigenfunctions X, here , are orthogonal and complete. In general this is guaranteed by Sturm–Liouville theory.
Suppose the equation is nonhomogeneous,
with the boundary condition the same as .
Expand h(x,t), u(x,t) and f(x) into
where hn(t) and bn can be calculated by integration, while un(t) is to be determined.
Substitute and back to and considering the orthogonality of sine functions we get
u'n(t)+\alpha
n2\pi2 | |
L2 |
un(t)=hn(t),
which are a sequence of linear differential equations that can be readily solved with, for instance, Laplace transform, or Integrating factor. Finally, we can get
un
| |||||
(t)=e |
\left(bn
t | |
+\int | |
0 |
hn
| |||||
(s)e |
ds\right).
If the boundary condition is nonhomogeneous, then the expansion of and is no longer valid. One has to find a function v that satisfies the boundary condition only, and subtract it from u. The function u-v then satisfies homogeneous boundary condition, and can be solved with the above method.
For some equations involving mixed derivatives, the equation does not separate as easily as the heat equation did in the first example above, but nonetheless separation of variables may still be applied. Consider the two-dimensional biharmonic equation
\partial4u | |
\partialx4 |
+2
\partial4u | |
\partialx2\partialy2 |
+
\partial4u | |
\partialy4 |
=0.
Proceeding in the usual manner, we look for solutions of the form
u(x,y)=X(x)Y(y)
and we obtain the equation
X(4)(x) | |
X(x) |
+2
X''(x) | |
X(x) |
Y''(y) | |
Y(y) |
+
Y(4)(y) | |
Y(y) |
=0.
Writing this equation in the form
E(x)+F(x)G(y)+H(y)=0,
Taking the derivative of this expression with respect to
x
E'(x)+F'(x)G(y)=0
G(y)=const.
F'(x)=0
y
F(x)G'(y)+H'(y)=0
F(x)=const.
G'(y)=0
-E(x)=F(x)G(y)+H(y)
-H(y)=E(x)+F(x)G(y)
\begin{align} X''(x)&=-λ1X(x)\\ X(4)(x)&=\mu1X(x)\\ Y(4)(y)-2λ1Y''(y)&=-\mu1Y(y) \end{align}
and
\begin{align} Y''(y)&=-λ2Y(y)\\ Y(4)(y)&=\mu2Y(y)\\ X(4)(x)-2λ2X''(x)&=-\mu2X(x) \end{align}
which can each be solved by considering the separate cases for
λi<0,λi=0,λi>0
\mui=λ
2 | |
i |
In orthogonal curvilinear coordinates, separation of variables can still be used, but in some details different from that in Cartesian coordinates. For instance, regularity or periodic condition may determine the eigenvalues in place of boundary conditions. See spherical harmonics for example.
For many PDEs, such as the wave equation, Helmholtz equation and Schrödinger equation, the applicability of separation of variables is a result of the spectral theorem. In some cases, separation of variables may not be possible. Separation of variables may be possible in some coordinate systems but not others,[2] and which coordinate systems allow for separation depends on the symmetry properties of the equation.[3] Below is an outline of an argument demonstrating the applicability of the method to certain linear equations, although the precise method may differ in individual cases (for instance in the biharmonic equation above).
Consider an initial boundary value problem for a function
u(x,t)
D=\{(x,t):x\in[0,l],t\geq0\}
(Tu)(x,t)=(Su)(x,t)
where
T
x
S
t
(Tu)(0,t)=(Tu)(l,t)=0
t\geq0
(Su)(x,0)=h(x)
0\leqx\leql
where
h
We look for solutions of the form
u(x,t)=f(x)g(t)
f(x)g(t)
Tf | |
f |
=
Sg | |
g |
The right hand side depends only on
x
t
K
Tf=Kf,Sg=Kg
which we can recognize as eigenvalue problems for the operators for
T
S
T
L2[0,l]
L2[0,l]
T
T
E
fλ
λ\inE
t
x
fλ
u
u(x,t)=\sumλcλ(t)fλ(x)
For some functions
cλ(t)
Sg=Kg
Hence, the spectral theorem ensures that the separation of variables will (when it is possible) find all the solutions.
For many differential operators, such as
d2 | |
dx2 |
The matrix form of the separation of variables is the Kronecker sum.
As an example we consider the 2D discrete Laplacian on a regular grid:
L=
Dxx ⊕ Dyy=Dxx ⊗ I+I ⊗ Dyy, |
where
Dxx |
Dyy |
I
Some mathematical programs are able to do separation of variables: Xcas[5] among others.