# 2.2: The Method of Separation of Variables

Skills to Develop

• Toe be introduce to the Separation of Variables as method to solved wave equations

Solving the wave equation involves identifying the functions $$u(x,t)$$ that solve the partial differential equation that represent the amplitude of the wave at any position $$x$$ at any time $$t$$

$\dfrac{\partial^2 u(x,y)}{\partial x^2} = \dfrac{1}{v^2} \dfrac{\partial^2 u(x,y)}{\partial t^2} \label{2.1.1}$

### Outline of the General Method

Method of separation of variables is one of the most widely used techniques to solve partial differential equations and  is based on the assumption that the solution of the equation is separable, that is, the final solution can be represented as a product of several functions, each of which is only dependent upon a single independent variable. If this assumption is incorrect, then clear violations of mathematical principles will be obvious from the analysis.

The general application of the Method of Separation of Variables for a wave equation involves three steps:

1. We find all solutions of the wave equation with the general form $u(x,t)= X(x)T(t)$ for some function $$X(x)$$ that depends on $$x$$ but not $$t$$ and some function $$T(t)$$ that depends only on $$t$$, but not $$x$$. It is of course too much to expect that all solutions of Equation $$\ref{2.1.1}$$ are of this form, however, if we find a set of solutions $$\{X_i(x)T_i(t)\}$$ since the wave equation is a linear equation, $u(x,t)=\sum_i c_ iX_i(x)T_i(t)$ is also a solution for any choice of the constants $$a_i$$. The goal is then to select the constants $$a_i$$ so that the boundary conditions are also satisfied.
2. Impose constraints on the solutions based on the knowledge of the system. These are called the boundary conditions, which specific the values of $$u(,x,t$$ at the extremes ("boundaries"). This is similar constraint to the solution as in initial value problems which the conditions $$x(t_i)$$ are specified at a specific time $$t_i$$.
3. If a perturbation in time is induced, then the last step requires imposing initial conditions (discussed later). For example, if the string was initial not moving before being plucked at $$t=0$$ then $$u(x,t<0)=0$$.

### A Vibrating Spring held fixed between to points

As discussed in Section 2.1, the solutions to the string example $$u(x,t)$$ for all $$x$$ and $$t$$ would be assumed to be a product of two functions: $$X(x)$$ and $$T(t)$$, where $$X(x)$$ is a function of only $$x$$, not $$t$$ and $$T(t)$$ is a function of $$t$$, but not $$x$$.

$u(x,t)= X(x)T(t) \label{2.2.1}$

By substituting the new product solution form into the original wave equation, one can obtain a two ordinary differential equations (differential equation containing a function or functions of one independent variable and its derivatives. Each differential equation would involve only one of the independent variables ($$x$$ or $$t$$).

Substitute Equation $$\ref{2.2.1}$$ into the one-dimensional wave equation (Equation $$\ref{2.1.1}$$)

$\dfrac{\partial^2 X(x)T(t)}{\partial x^2} = \dfrac{1}{v^2} \dfrac{\partial^2 X(x)T(t)}{\partial t^2} \label{2.2.2}$

since $$X$$ is not a function of $$t$$ and $$T$$ is not a functon of $$x$$, Equation $$\ref{2.2.2}$$ can be simplified

$T(t) \dfrac{\partial^2 X(x)}{\partial x^2} = \dfrac{1}{v^2} X(x) \dfrac{\partial^2T(t)}{\partial t^2} \label{2.2.3}$

Collecting the expression that depend on $$x$$ on the left side of Equation $$\ref{2.2.3}$$ and of $$t$$ on the right side results in

$\dfrac{1}{X(x)} \dfrac{\partial^2 X(x)}{\partial x^2} = \dfrac{1}{v^2} \dfrac{1}{T(t)} \dfrac{\partial^2T(t)}{\partial t^2} \label{2.2.3a}$

Equation $$\ref{2.2.3a}$$ is an interesting equation since the each side can be set to a fixed constant $$K$$ as that is the only solution that works for all values of $$t$$ and $$x$$. Therefore, the equation can be separated into two ordinary differential equations:

$\dfrac{d^2T(t)}{dt^2} - Kv^2 T(t) = 0 \label{2.2.4a}$

$\dfrac{d^2X(x)}{dx^2} - K X(x) = 0 \label{2.2.4b}$

• If $$K=0$$, then the solution is the trivial $$u(x,y,)=0$$ solution.
• If $$K > 0$$, then the general solution of Equation $$\ref{2.2.4b}$$ is $X(x) = A e^{\sqrt{K}x} + B e^{-\sqrt{K}x} \label{2.2.5}$

At this stage, Equation $$\ref{2.2.5}$$ implies that the solution to the two ordinary differential wave equations will be an infinity number of waves with no quantiziation to limit those that are allowed. Narrowing down the general solution to a specific solution occurs when taking the boundary conditions into account.

The boundary conditions for this problem is that the wave amplitude equal to zero at the ends of the string

$u(0,t) = X(x)T(t) = 0 \label{2.2.6a}$

$u(L,t) = X(x)T(t) = 0 \label{2.2.6b}$

for all times $$t$$.

Applying the two boundary conditions in Equations $$\ref{2.2.6a}$$ and  $$\ref{2.2.6b}$$ into the general solution in Equation $$\ref{2.2.5}$$ results into relationships between $$A$$ and $$B$$:

$X(0)= A + B = 0 \,\,\, at \; x=0 \label{2.2.7a}$

and

$X(L)= A e^{\sqrt{K}L} + B e^{-\sqrt{K}L} = 0\,\,\, at \; x=L \label{2.2.7b}$

One solution to this is that $$A = B = 0$$, but this is the trivial solution from $$K=0$$ and one we ignore since it provides no physical solution to problem other than the knowledge that $$0=0$$, which is not that inspiring of a result.

Both Equations $$\ref{2.2.4a}$$ and $$\ref{2.2.4b}$$ are be generalized into the following equations

$\dfrac{d^2y(x)}{dx^2} - k^2 y(x) = 0 \label{2.2.8}$

where k is a real constant (i.e., not complex). Equation $$\ref{2.2.8}$$ is a homogeneous second order linear differential equation. The general solution to these types of differential equations has the form

$y(x) = e^{\alpha x} \label{2.2.9}$

where $$\alpha$$ is a constant to be determined by the constraints of system. Substituting Equation $$\ref{2.2.9}$$ into Equation $$\ref{2.2.8}$$ results in

$\left( \alpha^2 - k^2 \right)y(x)=0 \label{2.2.10}$

For this equation to be satisfied, either

• $$\alpha^2 - k^2 = 0$$ or
• $$y(x) = 0$$.

The later is the trivial solution and is ignored and therefore

$\alpha^2 - k^2 = 0 \label{2.2.11}$

so

$\alpha = \pm k \label{2.2.12}$

Hence there are two solutions to the general Equation $$\ref{2.2.8}$$, as expected for a second order differential equation (first order differential equations have one solution), which are result from substituting the $$\alpha$$ values from Equation $$\ref{2.2.12}$$ into Equation $$\ref{2.2.9}$$

$y(x) = e^{k\, x} \label{2.2.13a}$

$y(x) = e^{-k\, x} \label{2.2.13b}$

The general solution can then be any linear combination of these two equations

$y(x) = c_1 e^{k\, x} + c_2 e^{-k\, x} \label{2.2.14}$

Example $$\PageIndex{1}$$

Solve

$y'' + 3y' - 4y = 0$

Solution

The strategy is to search for a solution of the form

$y = e^{\alpha t }$

The reason for this is that long ago some geniuses figured this stuff out and it works. Now calculate derivatives

$y' = \alpha e^{\alpha t }$

$y'' = \alpha^2e^{\alpha t}$

Substituting into the differential equation gives

$\alpha ^2e^{\alpha t} + 3(\alpha e^{\alpha t}) - 4(e^{\alpha t})$

$= ( \alpha ^2 + 3\alpha - 4)e^{\alpha t} = 0$

Now divide by $$e^{\alpha t}$$ to get

$\alpha ^2 + 3\alpha - 4 = 0$

$(\alpha - 1)(\alpha + 4) = 0$

$\alpha = 1 \;\; and \;\;\ \alpha = -4$

We can conclude that two solutions are

$$y_1 = e^t and y_2 = e^{-4t}$$

Now let

$L(y) = y'' + 3y' - 4$

It is easy to verify that if $$y_1$$ and $$y_2$$ are solutions to

$L(y) = 0$

then

$c_1y_1 + c_2y_2$

is also a solution.  More specifically we can conclude that

$y = c_1e^t + c_2e^{-4t }$

Represents a two dimensional family (vector space) of solutions. Later we will prove that this is the most general description of the solution space.

Example $$\PageIndex{2}$$

Solve

$y'' - y' - 6y = 0$

with $$y(0) = 1$$ and $$y'(0) = 2$$

As before we seek solutions of the form

$y = e^{rt}$

Now calculate derivatives

$y' = re^{rt} y'' = r^2e^{rt}$

Substituting into the differential equation gives

$r^2e^{rt} + (re^{rt}) - 6(e^{rt})$

$( r^2 - r - 6 )e^{rt} = 0$

Now divide byert to get

$r^2 - r - 6 = 0$

$(r - 3)(r + 2) = 0$

We can conclude that two solutions are

$$y_1 = e^{3t}$$  $$\text {and}$$   $$y_2 = e^{-2t}$$

We can conclude that

$y = c_1e^{3t} + C_2e^{-2t}$

Represents a two dimensional family (vector space) of solutions. Now use the initial conditions to find that

$1 = c_1 + c_2$

We have that

$y' = 3C_1e^{3t} - 2C_2e^{-2t}$

Plugging in the initial condition with y', gives

$2 = 3c_1 - 2c_2$

This is a system of two equations and two unknowns.  We can use a matrix to arrive at

$$c_1 = \frac{4}{5}$$  and  $$C_2 = \frac {1}{5}$$

The final solution is

$y = \dfrac{4}{5} e^{3t } + \dfrac{1}{5}e^{-2t}$

When $$K > 0$$, the general solutions of Equations $$\ref{2.2.4a}$$ and $$\ref{2.2.4b}$$ are oscillatory in time and space, respectively, as discussed in the following section.

### Contributors

• Delmar Larsen