Separation of variables

From HandWiki
Short description: Technique for solving differential equations

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.

Solve proportional first order differential equation[1] by separation of variables.[2]
Solve linear first order differential equation[3] by separation of variables.[2]

Ordinary differential equations (ODE)

A differential equation for the unknown [math]\displaystyle{ f(x) }[/math] will be separable if it can be written in the form

[math]\displaystyle{ \frac{d}{dx} f(x) = g(x)h(f(x)) }[/math]

where [math]\displaystyle{ g }[/math] and [math]\displaystyle{ h }[/math] are given functions. This is perhaps more transparent when written using [math]\displaystyle{ y = f(x) }[/math] as:

[math]\displaystyle{ \frac{dy}{dx}=g(x)h(y). }[/math]

So now as long as h(y) ≠ 0, we can rearrange terms to obtain:

[math]\displaystyle{ {dy \over h(y)} = g(x) \, dx, }[/math]

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 Leibniz's notation may prefer to write this as

[math]\displaystyle{ \frac{1}{h(y)} \frac{dy}{dx} = g(x), }[/math]

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 [math]\displaystyle{ x }[/math], we have

[math]\displaystyle{ \int \frac{1}{h(y)} \frac{dy}{dx} \, dx = \int g(x) \, dx, }[/math]

 

 

 

 

(A1)

or equivalently,

[math]\displaystyle{ \int \frac{1}{h(y)} \, dy = \int g(x) \, dx }[/math]

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 [math]\displaystyle{ \frac{dy}{dx} }[/math] 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

[math]\displaystyle{ \int \frac{1}{h(y)} \, dy + C_1 = \int g(x) \, dx + C_2, }[/math]

because a single constant [math]\displaystyle{ C = C_2 - C_1 }[/math] is equivalent.)

Example

Population growth is often modeled by the "logistic" differential equation

[math]\displaystyle{ \frac{dP}{dt}=kP\left(1-\frac{P}{K}\right) }[/math]

where [math]\displaystyle{ P }[/math] is the population with respect to time [math]\displaystyle{ t }[/math], [math]\displaystyle{ k }[/math] is the rate of growth, and [math]\displaystyle{ K }[/math] is the carrying capacity of the environment. Separation of variables now leads to

[math]\displaystyle{ \begin{align} & \int\frac{dP}{P\left(1-P/K \right)}=\int k\,dt \end{align} }[/math]

which is readily integrated using partial fractions on the left side yielding

[math]\displaystyle{ P(t)=\frac{K}{1+Ae^{-kt}} }[/math]

where A is the constant of integration. We can find [math]\displaystyle{ A }[/math] in terms of [math]\displaystyle{ P\left(0\right)=P_0 }[/math] at t=0. Noting [math]\displaystyle{ e^0=1 }[/math] we get

[math]\displaystyle{ A=\frac{K-P_0}{P_0}. }[/math]

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:

[math]\displaystyle{ \frac{dy}{dx}=f(y)g(x) }[/math]

The derivative can alternatively be written the following way to underscore that it is an operator working on the unknown function, y:

[math]\displaystyle{ \frac{dy}{dx}=\frac{d}{dx}(y) }[/math]

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:

[math]\displaystyle{ \frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right) = \frac{d}{dx}\left(\frac{d}{dx}(y)\right) }[/math]

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

[math]\displaystyle{ \frac{dy}{dx}=f(y)g(x) }[/math]

a separable second-order ODE is reducible to the form

[math]\displaystyle{ \frac{d^2y}{dx^2}=f\left(y'\right)g(x) }[/math]

and an nth-order separable ODE is reducible to

[math]\displaystyle{ \frac{d^ny}{dx^n}=f\!\left(y^{(n-1)}\right)g(x) }[/math]

Example

Consider the simple nonlinear second-order differential equation:[math]\displaystyle{ y''=(y')^2. }[/math]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:[math]\displaystyle{ \frac{d(y')}{(y')^2}=dx. }[/math]Now, integrate the right side with respect to x and the left with respect to y':[math]\displaystyle{ \int \frac{d(y')}{(y')^2}=\int dx. }[/math]This gives[math]\displaystyle{ -\frac{1}{y'}=x+C_1, }[/math]which simplifies to:[math]\displaystyle{ y'=-\frac{1}{x+C_1}~. }[/math]This is now a simple integral problem that gives the final answer:[math]\displaystyle{ y=C_2-\ln|x+C_1|. }[/math]

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.[4]

Example: homogeneous case

Consider the one-dimensional heat equation. The equation is

[math]\displaystyle{ \frac{\partial u}{\partial t} - \alpha\frac{\partial^{2}u}{\partial x^{2}} = 0 }[/math]

 

 

 

 

(1)

The variable u denotes temperature. The boundary condition is homogeneous, that is

[math]\displaystyle{ u\big|_{x=0}=u\big|_{x=L}=0 }[/math]

 

 

 

 

(2)

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:

[math]\displaystyle{ u(x,t) = X(x) T(t). }[/math]

 

 

 

 

(3)

Substituting u back into equation (1) and using the product rule,

[math]\displaystyle{ \frac{T'(t)}{\alpha T(t)} = \frac{X''(x)}{X(x)}. }[/math]

 

 

 

 

(4)

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:

[math]\displaystyle{ T'(t) = - \lambda \alpha T(t), }[/math]

 

 

 

 

(5)

and

[math]\displaystyle{ X''(x) = - \lambda X(x). }[/math]

 

 

 

 

(6)

λ 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

[math]\displaystyle{ X(x) = B e^{\sqrt{-\lambda} \, x} + C e^{-\sqrt{-\lambda} \, x}. }[/math]

From (2) we get

[math]\displaystyle{ X(0) = 0 = X(L), }[/math]

 

 

 

 

(7)

and therefore B = 0 = C which implies u is identically 0.

Suppose that λ = 0. Then there exist real numbers B, C such that

[math]\displaystyle{ X(x) = Bx + C. }[/math]

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

[math]\displaystyle{ T(t) = A e^{-\lambda \alpha t}, }[/math]

and

[math]\displaystyle{ X(x) = B \sin(\sqrt{\lambda} \, x) + C \cos(\sqrt{\lambda} \, x). }[/math]

From (7) we get C = 0 and that for some positive integer n,

[math]\displaystyle{ \sqrt{\lambda} = n \frac{\pi}{L}. }[/math]

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

[math]\displaystyle{ u(x,t) = \sum_{n = 1}^{\infty} D_n \sin \frac{n\pi x}{L} \exp\left(-\frac{n^2 \pi^2 \alpha t}{L^2}\right), }[/math]

where Dn are coefficients determined by initial condition.

Given the initial condition

[math]\displaystyle{ u\big|_{t=0}=f(x), }[/math]

we can get

[math]\displaystyle{ f(x) = \sum_{n = 1}^{\infty} D_n \sin \frac{n\pi x}{L}. }[/math]

This is the sine series expansion of f(x) which is amenable to Fourier analysis. Multiplying both sides with [math]\displaystyle{ \sin \frac{n\pi x}{L} }[/math] and integrating over [0, L] results in

[math]\displaystyle{ D_n = \frac{2}{L} \int_0^L f(x) \sin \frac{n\pi x}{L} \, dx. }[/math]

This method requires that the eigenfunctions X, here [math]\displaystyle{ \left\{\sin \frac{n\pi x}{L}\right\}_{n=1}^{\infty} }[/math], are orthogonal and complete. In general this is guaranteed by Sturm–Liouville theory.

Example: nonhomogeneous case

Suppose the equation is nonhomogeneous,

[math]\displaystyle{ \frac{\partial u}{\partial t}-\alpha\frac{\partial^{2}u}{\partial x^{2}}=h(x,t) }[/math]

 

 

 

 

(8)

with the boundary condition the same as (2).

Expand h(x,t), u(x,t) and f(x) into

[math]\displaystyle{ h(x,t)=\sum_{n=1}^{\infty}h_{n}(t)\sin\frac{n\pi x}{L}, }[/math]

 

 

 

 

(9)

[math]\displaystyle{ u(x,t)=\sum_{n=1}^{\infty}u_{n}(t)\sin\frac{n\pi x}{L}, }[/math]

 

 

 

 

(10)

[math]\displaystyle{ f(x)=\sum_{n=1}^{\infty}b_{n}\sin\frac{n\pi x}{L}, }[/math]

 

 

 

 

(11)

where hn(t) and bn can be calculated by integration, while un(t) is to be determined.

Substitute (9) and (10) back to (8) and considering the orthogonality of sine functions we get

[math]\displaystyle{ u'_{n}(t)+\alpha\frac{n^{2}\pi^{2}}{L^{2}}u_{n}(t)=h_{n}(t), }[/math]

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

[math]\displaystyle{ u_{n}(t)=e^{-\alpha\frac{n^{2}\pi^{2}}{L^{2}} t} \left (b_{n}+\int_{0}^{t}h_{n}(s)e^{\alpha\frac{n^{2}\pi^{2}}{L^{2}} s} \, ds \right). }[/math]

If the boundary condition is nonhomogeneous, then the expansion of (9) and (10) 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.

Example: mixed derivatives

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

[math]\displaystyle{ \frac{\partial^4 u}{\partial x^4} + 2\frac{\partial^4 u}{\partial x^2\partial y^2} + \frac{\partial^4 u}{\partial y^4} = 0. }[/math]

Proceeding in the usual manner, we look for solutions of the form

[math]\displaystyle{ u(x,y) = X(x)Y(y) }[/math]

and we obtain the equation

[math]\displaystyle{ \frac{X^{(4)}(x)}{X(x)} + 2\frac{X''(x)}{X(x)}\frac{Y''(y)}{Y(y)} + \frac{Y^{(4)}(y)}{Y(y)} = 0. }[/math]

Writing this equation in the form

[math]\displaystyle{ E(x) + F(x)G(y) + H(y) = 0, }[/math]

Taking the derivative of this expression with respect to [math]\displaystyle{ x }[/math] gives [math]\displaystyle{ E'(x)+F'(x)G(y)=0 }[/math] which means [math]\displaystyle{ G(y)=const. }[/math] or [math]\displaystyle{ F'(x)=0 }[/math] and likewise, taking derivative with respect to [math]\displaystyle{ y }[/math] leads to [math]\displaystyle{ F(x)G'(y)+H'(y)=0 }[/math] and thus [math]\displaystyle{ F(x)=const. }[/math] or [math]\displaystyle{ G'(y)=0 }[/math], hence either F(x) or G(y) must be a constant, say −λ. This further implies that either [math]\displaystyle{ -E(x)=F(x)G(y)+H(y) }[/math] or [math]\displaystyle{ -H(y)=E(x)+F(x)G(y) }[/math] are constant. Returning to the equation for X and Y, we have two cases

[math]\displaystyle{ \begin{align} X''(x) &= -\lambda_1X(x) \\ X^{(4)}(x) &= \mu_1X(x) \\ Y^{(4)}(y) - 2\lambda_1Y''(y) &= -\mu_1Y(y) \end{align} }[/math]

and

[math]\displaystyle{ \begin{align} Y''(y) &= -\lambda_2Y(y) \\ Y^{(4)}(y) &= \mu_2Y(y) \\ X^{(4)}(x) - 2\lambda_2X''(x) &= -\mu_2X(x) \end{align} }[/math]

which can each be solved by considering the separate cases for [math]\displaystyle{ \lambda_i\lt 0, \lambda_i=0, \lambda_i\gt 0 }[/math] and noting that [math]\displaystyle{ \mu_i=\lambda_i^2 }[/math].

Curvilinear coordinates

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.

Applicability

Partial differential equations

For many PDEs, such as the wave equation, Helmholtz equation and Schrodinger 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,[5] and which coordinate systems allow for separation depends on the symmetry properties of the equation.[6] 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 [math]\displaystyle{ u(x,t) }[/math] on [math]\displaystyle{ D = \{(x,t): x \in [0,l], t \geq 0 \} }[/math] in two variables:

[math]\displaystyle{ (Tu)(x,t) = (Su)(x,t) }[/math]

where [math]\displaystyle{ T }[/math] is a differential operator with respect to [math]\displaystyle{ x }[/math] and [math]\displaystyle{ S }[/math] is a differential operator with respect to [math]\displaystyle{ t }[/math] with boundary data:

[math]\displaystyle{ (Tu)(0,t) = (Tu)(l,t) = 0 }[/math] for [math]\displaystyle{ t \geq 0 }[/math]
[math]\displaystyle{ (Su)(x,0)=h(x) }[/math] for [math]\displaystyle{ 0 \leq x \leq l }[/math]

where [math]\displaystyle{ h }[/math] is a known function.

We look for solutions of the form [math]\displaystyle{ u(x,t) = f(x) g(t) }[/math]. Dividing the PDE through by [math]\displaystyle{ f(x)g(t) }[/math] gives

[math]\displaystyle{ \frac{Tf}{f} = \frac{Sg}{g} }[/math]

The right hand side depends only on [math]\displaystyle{ x }[/math] and the left hand side only on [math]\displaystyle{ t }[/math] so both must be equal to a constant [math]\displaystyle{ K }[/math], which gives two ordinary differential equations

[math]\displaystyle{ Tf = Kf, Sg = Kg }[/math]

which we can recognize as eigenvalue problems for the operators for [math]\displaystyle{ T }[/math] and [math]\displaystyle{ S }[/math]. If [math]\displaystyle{ T }[/math] is a compact, self-adjoint operator on the space [math]\displaystyle{ L^2[0,l] }[/math] along with the relevant boundary conditions, then by the Spectral theorem there exists a basis for [math]\displaystyle{ L^2[0,l] }[/math] consisting of eigenfunctions for [math]\displaystyle{ T }[/math]. Let the spectrum of [math]\displaystyle{ T }[/math] be [math]\displaystyle{ E }[/math] and let [math]\displaystyle{ f_{\lambda} }[/math] be an eigenfunction with eigenvalue [math]\displaystyle{ \lambda \in E }[/math]. Then for any function which at each time [math]\displaystyle{ t }[/math] is square-integrable with respect to [math]\displaystyle{ x }[/math], we can write this function as a linear combination of the [math]\displaystyle{ f_{\lambda} }[/math]. In particular, we know the solution [math]\displaystyle{ u }[/math] can be written as

[math]\displaystyle{ u(x,t) = \sum_{\lambda \in E} c_{\lambda}(t)f_{\lambda}(x) }[/math]

For some functions [math]\displaystyle{ c_{\lambda}(t) }[/math]. In the separation of variables, these functions are given by solutions to [math]\displaystyle{ Sg = Kg }[/math]

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 [math]\displaystyle{ \frac{d^2}{dx^2} }[/math], we can show that they are self-adjoint by integration by parts. While these operators may not be compact, their inverses (when they exist) may be, as in the case of the wave equation, and these inverses have the same eigenfunctions and eigenvalues as the original operator (with the possible exception of zero).[7]

Matrices

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:

[math]\displaystyle{ L = \mathbf{D_{xx}}\oplus\mathbf{D_{yy}}=\mathbf{D_{xx}}\otimes\mathbf{I}+\mathbf{I}\otimes\mathbf{D_{yy}}, \, }[/math]

where [math]\displaystyle{ \mathbf{D_{xx}} }[/math] and [math]\displaystyle{ \mathbf{D_{yy}} }[/math] are 1D discrete Laplacians in the x- and y-directions, correspondingly, and [math]\displaystyle{ \mathbf{I} }[/math] are the identities of appropriate sizes. See the main article Kronecker sum of discrete Laplacians for details.

Software

Some mathematical programs are able to do separation of variables: Xcas[8] among others.

See also

Notes

References

External links