# 2.2: The Method of Separation of Variables

- Page ID
- 210787

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,t)}{\partial x^2} = \dfrac{1}{v^2} \dfrac{\partial^2 u(x,t)}{\partial t^2} \label{2.1.1}\]

This wave equation is a type of second-order partial differential equation (PDE) involving two variables - \(x\) and \(t\). PDEs differ from ordinary differential equations (ODEs) that involve functions of only one variable. However, this difference makes PDEs appreciably more difficult to solve. In fact, the vast majority of PDE cannot be solved analytically and those classes of special PDEs that can be solved analytically invariably involve converting the PDE into one or more ODEs and then solving independently. One of these approaches is the the method of *separation of variables*.

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.

## A Vibrating Spring Held Fixed Between Two 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}\]

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

\[ \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 function 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 expressions 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 (i.e., no wave exists).
- 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 infinite number of waves with no quantization to limit those that are allowed (i.e., any values of \(A\) and \(B\) are possible). 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 \,\,\, @ \; x=0 \label{2.2.7a}\]

and

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

Both Equations \(\ref{2.2.4a}\) and \(\ref{2.2.4b}\) can 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 a 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}\]

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 (UC Davis)