Artificial Intelligence 🤖
Differential equations
Method of separation of variables

Method of separation of variables

We now turn our attention to the classes of linear PDEs outlined above, namely Eqs. (2.78)-(2.80). In all cases (and subject to specific boundary conditions) we assume that the solution is separable. For example, the solution y(x,t)y(x, t) for Eq. (2.78) can be expressed as the product of a xx-dependent function and a tt-dependent function:

y(x,t)=X(x)T(t)y(x, t)=\mathcal{X}(x) \mathcal{T}(t)

where X\mathcal{X} is only a function of the spatial variable, xx and T\mathcal{T} is only a function of the temporal variable, tt.

Boundary/initial conditions

In situations where we look for transient solutions (like, for example, in solving the heat equation [see Eq. (2.79) ]), we are interested in knowing how the temperature, which we denote by u(x,t)u(x, t) varies in the spatial domain, xx for all time, tt; the task of solving a PDE is usually referred to as an initial-boundaryvalue problem (IBVP). Equation (2.79), is first order in time and second order in space; we therefore need one initial condition describing the solution at all values of xx and at t=0t=0 and two boundary conditions, describing the solution at all values of tt and at two, distinct points in xx. Generally, we expect the solution to a PDE to be separable if the PDE is linear and homogeneous (here, homogeneity refers to both the equation and the BCs). It is possible in some cases, to transform inhomogeneous BCs to homogeneous ones such that the transformed problem can be solved using the method of separation of variables. The physical problems we consider are subject to types of boundary conditions we have seen in Subsec. 2.3.2. we discuss them again here in the context of PDEs:

Dirichlet BCs represent the function at two distinct points in space, say x=ax=a, x=b(x=b( where ab)a \neq b) and hold true for all values of tt

y(a,t)=y1 and y(b,t)=y2y(a, t)=y_{1} \text { and } y(b, t)=y_{2}

Neumann BCs represent the derivative of the function at two distinct points in space, say x=a,x=bx=a, x=b (where, again, aba \neq b ) and hold true for all values of tt

yx(a,t)=y1 and yx(b,t)=y2\frac{\partial y}{\partial x}(a, t)=y_{1} \text { and } \frac{\partial y}{\partial x}(b, t)=y_{2}

For Periodic BCs, at the boundaries, the conditions on the function and the derivative match each other:

y(a,t)=y(a,t) and yx(a,t)=yx(a,t)y(-a, t)=y(a, t) \text { and } \frac{\partial y}{\partial x}(-a, t)=\frac{\partial y}{\partial x}(a, t)

In Eqs. (2.108) and (2.109) y1,y2y_{1}, y_{2} are constants. Recall that the BCs are said to be homogeneous if y1=y2=0y_{1}=y_{2}=0.

The 1D heat equation

Next, we outline the method of separation of variables; we use the 1D heat equation as an example but the method may be applied to equations like the ones given in (2.78)-(2.80) . The problem statement is given as follows: the heat equation is given by:

ut=α22ux2\frac{\partial u}{\partial t}=\alpha^{2} \frac{\partial^{2} u}{\partial x^{2}}

where u=u(x,t)u=u(x, t) represents the temperature in a thin rod as it varies with space, xx and time, tt. The thin rod is of length π\pi and so the interval of interest is x[0,π]x \in[0, \pi]. At the two boundaries, the temperature of the rod is fixed at 0 , so we have:

u(0,t)=u(π,t)=0,u(0, t)=u(\pi, t)=0,

and, initially, at t=0t=0, the temperature distribution is given by a function f(x)f(x). Mathematically, this is expressed as:

u(x,0)=f(x).u(x, 0)=f(x) .

Algorithmic approach

  1. Motivated by the homogeneity of the boundary conditions, we assume the solution to the PDE is separable, i.e.,
u(x,t)=X(x)T(t),u(x, t)=\mathcal{X}(x) \mathcal{T}(t),

where X(x)\mathcal{X}(x) and T(t)\mathcal{T}(t) are unknown functions to be determined;

  1. Differentiate (2.114), substitute the derivatives in Eq. (2.111) and separate the variables:
1a2TTt=1X2Xx2\frac{1}{a^{2} \mathcal{T}} \frac{\partial \mathcal{T}}{\partial t}=\frac{1}{\mathcal{X}} \frac{\partial^{2} \mathcal{X}}{\partial x^{2}}
  1. Since the LHS of Eq.(2.115) is independent of xx and the RHS is independent of tt, the two sides can only be equal to a function that is independent of both xx and tt, i.e. a constant, which we set to λ-\lambda. Next, we separate into two ODEs:
dTdt+λα2T=0d2Xdx2+λX=0\begin{aligned} \frac{d \mathcal{T}}{d t}+\lambda \alpha^{2} \mathcal{T} & =0 \\ \frac{d^{2} \mathcal{X}}{d x^{2}}+\lambda \mathcal{X} & =0 \end{aligned}

We now have 2 ODEs from which we can form an initial-value problem and a boundary-value problem. The IVP consists of Eq. (2.116) and an initial condition. Note this is a first order ODE for T(t)\mathcal{T}(t) and we will require a condition for T\mathcal{T} at t=t0t=t_{0} ( t0t_{0} is usually equal to 0 for physical problems, e.g. this time could mark the start of an experimental run). The BVP consists of Eq. (2.117) and two boundary conditions. This is a second order ODE and we will require conditions for X\mathcal{X} at two different boundary values for xx. Note also the negative sign in λ-\lambda. This allows the BVP given by Eq. (2.117) to be expressed in the form encountered in Subsec. 2.3.2,

  1. Now we essentially have 3 unknowns we need to solve for: the functions X,T\mathcal{X}, \mathcal{T} and the eigenvalue λ\lambda. We can use our knowledge of BVPs (see Subsec. 2.3.2) to determine the admissible form for the eigenvalues and thus find the corresponding eigenfunctions given by X(x)\mathcal{X}(x). \rightarrow find X(x)\mathcal{X}(x). Recall that eigenvalues exist for nontrivial (i.e. nonzero) eigenfunctions.
  • Since Eq. (2.117) is a second order ODE for X(x)\mathcal{X}(x), we require two BCs in xx. These are given by Eq. (2.112) for the two-variable function uu.
  • To transform the BCs, use the separated solution (2.114) evaluated at x=0x=0 and x=πx=\pi (i.e. at the two ends). At x=0x=0, we have:
u(0,t)=X(0)T(t)=0.u(0, t)=\mathcal{X}(0) \mathcal{T}(t)=0 .

Now, Eq. (2.118) suggests that either T(t)=0\mathcal{T}(t)=0 or X(0)=0\mathcal{X}(0)=0. Note that if T(t)\mathcal{T}(t) is zero, it is zero for all values of tt which would the imply that the form of the suggested solution (2.114) is trivial. We therefore set T(t)0\mathcal{T}(t) \neq 0 which means that X(0)=0\mathcal{X}(0)=0. With a similar argument, X(π)=0\mathcal{X}(\pi)=0. So the appropriate BCs for Eq. (2.117) are X(0)=0\mathcal{X}(0)=0 and X(π)=0\mathcal{X}(\pi)=0.

  • Solving the BVP (ODE + BCs) gives λn=n2,n1\lambda_{n}=n^{2}, n \geq 1 and the corresponding eigenfunctions are: Xn(x)=bnsin(nx)\mathcal{X}_{n}(x)=b_{n} \sin (n x) where, again, n1n \geq 1.
  • Note that λ0\lambda \leq 0 are not eigenvalues of the BVP.
  1. Next, we determine the form of the other separated function [i.e. Tn(t)\mathcal{T}_{n}(t) ] using the eigenvalues, λn\lambda_{n}, from step 4 .
  • Equation (2.116) is a first order separable ODE for T(t)\mathcal{T}(t) :
1TdTdt=n2α2\frac{1}{\mathcal{T}} \frac{d \mathcal{T}}{d t}=-n^{2} \alpha^{2}
  • Solving (2.119), gives Tn(t)=aneα2n2t\mathcal{T}_{n}(t)=a_{n} e^{-\alpha^{2} n^{2} t} with n1n \geq 1.
  1. Now, we have Xn(x)\mathcal{X}_{n}(x) and Tn(t)\mathcal{T}_{n}(t) which we use to find a general solution for u(x,t)u(x, t) \rightarrow using the suggested solution in step 1 given by un(x,t)=u_{n}(x, t)= Xn(x)Tn(t)\mathcal{X}_{n}(x) \mathcal{T}_{n}(t).
  2. Due to the linearity of the PDE and the orthogonality of eigenfunctions corresponding to distinct eigenvalues, we may sum across all solutions (for each nn ) to form a series representation of the solution,
un(x,t)=n=1cnXn(x)Tn(t)u_{n}(x, t)=\sum_{n=1}^{\infty} c_{n} \mathcal{X}_{n}(x) \mathcal{T}_{n}(t)
  1. Determine the coefficients, cnc_{n} in the series representation using the initial condition given at t=0t=0 [given by (2.113)] and by making use of orthogonality properties (see Topic B1 on Fourier series).