# Preface

This section gives some examples of solving the Helmholtz equation $$\nabla^2 u + k^2 u = 0 .$$

Introduction to Linear Algebra with Mathematica

# Helmholtz equation

We demonstrate application of the separation of variables in solving the Helmholtz equation $$\nabla^2 u + k^2 u = 0 .$$ The Helmholtz equation often arises in the study of physical problems involving partial differential equations (PDEs) in both space and time. The Helmholtz equation, which represents a time-independent form of the wave equation, results from applying the technique of separation of variables to reduce the complexity of the analysis.

Cartesian Coordinates

In Cartesian coordinates the Helmholtz equation becomes
$$\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2} + k^2 u(x,y,z) = 0 , \label{EqHelmholtz.1}$$
where ∇² is the Laplace operator (or "Laplacian"), k² is the eigenvalue. We split Eq.\eqref{EqHelmholtz.1} into a set of ordinary differential equations by considering
$u(x,y,z) = X(x)\,Y(y)\,Z(z) .$
Substituting this product into the Helmholtz equation, we obtain
$Y\,Z\,\frac{{\text d}^2 X}{{\text d}x^2} + X\,Z\,\frac{{\text d}^2 Y}{{\text d}y^2} + X\,Y\,\frac{{\text d}^2 Z}{{\text d}z^2} + k^2 u = 0.$
Dividing by u = X Y Z and rearranging terms, we get
$$\frac{1}{X}\,\frac{{\text d}^2 X}{{\text d}x^2} = - k^2 - \frac{1}{Y}\,\frac{{\text d}^2 Y}{{\text d}y^2} - \frac{1}{Z}\,\frac{{\text d}^2 Z}{{\text d}z^2} . \label{EqHelmholtz.2}$$
Equation \eqref{EqHelmholtz.2} exhibits one separation of variables. The left-hand side is a function of x alone, whereas the right-hand side depends only on y and z and not on x. But x, y, and z are all independent coordinates. The equality of both sides depending on different variables means that the behavior of x as an independent variable is not determined by y and z. Therefore, each side must be equal to a constant, a constant of separation. We choose
\begin{align} \frac{1}{X}\,\frac{{\text d}^2 X}{{\text d}x^2} &= - \lambda^2 , \label{EqHelmholtz.3} \\ - k^2 - \frac{1}{Y}\,\frac{{\text d}^2 Y}{{\text d}y^2} - \frac{1}{Z}\,\frac{{\text d}^2 Z}{{\text d}z^2} &= - \lambda^2 . \label{EqHelmholtz.4} \end{align}
The choice of sign of λ² is completely arbitrary here; it will be fixed in specific problems by the need to satisfy specific boundary conditions. Now, turning our attention to Eq.\eqref{EqHelmholtz.4}, we obtain
$$\frac{1}{Y}\,\frac{{\text d}^2 Y}{{\text d}y^2} = \lambda^2 - k^2 - \frac{1}{Z}\,\frac{{\text d}^2 Z}{{\text d}z^2} , \label{EqHelmholtz.5}$$
and a second separation has been achieved. Here we have a function of y equated to a function of z, as before. We resolve it, as before, by equating each side to another constant of separationm, -m²:
\begin{align} \frac{1}{Y}\,\frac{{\text d}^2 Y}{{\text d}y^2} &= - m^2 , \label{EqHelmholtz.6} \\ \frac{1}{Z}\,\frac{{\text d}^2 Z}{{\text d}z^2} &= \lambda^2 + m^2 + k^2 = -n^2 , \label{EqHelmholtz.7} \end{align}
introducing a constant n² by $$\displaystyle k^2 = \lambda^2 + m^2 + n^2$$ to produce a symmetric set of equations. Now we have three ODEs \eqref{EqHelmholtz.3},\eqref{EqHelmholtz.6}, and \eqref{EqHelmholtz.7}.

Our solution should be labeled according to the choice of our constants λ, m, and n; that is,

$$u_{\lambda ,m} (x,y,z) = X_{\lambda} (x)\, Y_m (y)\, Z_n (z) . \label{EqHelmholtz.8}$$
Subject to the conditions of the problem being solved and to the condition k² = λ² + m² + n², we may choose λ, m, and n as we like, and formula \eqref{EqHelmholtz.8} will still be a solution of the Helmholtz equation, provided Xλ(x) is a solution of Eq.\eqref{EqHelmholtz.3}, and so on. We may develop the most general solution of Eq.\eqref{EqHelmholtz.1} by taking a linear combination of solutions uλ,m,n:
$$u(x,y,z) = \sum_{\lambda , m} c_{\lambda , m} u_{\lambda ,m, n} (x,y,z) = \sum_{\lambda , m} c_{\lambda , m} X_{\lambda} (x)\, Y_m (y)\, Z_n (z) . \label{EqHelmholtz.9}$$
The constant coefficients cλ,m are finally chosen to permit u(x, y, z) to satisfy the boundary conditions of the problem, which, as a rule, lead to a discrete set of values λ, m.

Circular Cylindrical Coordinates

With our unknown function u(x, y, z) dependent on ρ, φ, and z, the Helmholtz equation becomes
$$\nabla^2 u + k^2 u(\rho , \psi , z) = 0 \qquad\mbox{or} \qquad \frac{1}{\rho} \,\frac{\partial}{\partial \rho} \left( \rho\,\frac{\partial u}{\partial \rho} \right) + \frac{1}{\rho^2} \,\frac{\partial^2 u}{\partial \phi^2} + \frac{\partial^2 u}{\partial z^2} + k^2 u = 0. \label{EqHelmholtz.10}$$
As before, we assume a factored form for u:
$u(\rho , \psi , z) = R(\rho )\,\Phi (\phi )\,Z(z) .$
Substituting into Eq.\eqref{EqHelmholtz.10}, we have
$\frac{\Psi\, Z}{\rho} \,\frac{\text d}{{\text d}\rho} \left( \rho\,\frac{{\text d}R}{{\text d}\rho} \right) + \frac{R\, Z}{\rho^2} \,\frac{{\text d}^2 \Phi}{{\text d}\phi^2} + R\,\Psi \,\frac{{\text d}^2 Z}{{\text d}z^2} + k^2 u = 0.$
All the partial derivatives have become ordinary derivatives. Dividing by u and moving the z derivative to the right-hand side yields
$\frac{1}{R\,\rho} \,\frac{\text d}{{\text d}\rho} \left( \rho\,\frac{{\text d}R}{{\text d}\rho} \right) + \frac{1}{\Phi\,\rho^2} \,\frac{{\text d}^2 \Phi}{{\text d}\phi^2} + k^2 = - \frac{1}{Z} \,\frac{{\text d}^2 Z}{{\text d}z^2} .$
Again, a function of z on the right appears to depend on a function of ρ and φ on the left. We resolve this by setting each side of equal to the same constant. Let us choose -λ². Then
$$\frac{{\text d}^2 Z}{{\text d}z^2} = \lambda^2 Z \label{EqHelmholtz.11}$$
and
$\frac{1}{R\,\rho} \,\frac{\text d}{{\text d}\rho} \left( \rho\,\frac{{\text d}R}{{\text d}\rho} \right) + \frac{1}{\Phi\,\rho^2} \,\frac{{\text d}^2 \Phi}{{\text d}\phi^2} + k^2 = -\lambda^2 .$
Setting k² + λ² = n², multiplying by ρ², amd rearranging terms, we obtain
$\frac{\rho}{R} \,\frac{\text d}{{\text d}\rho} \left( \rho\,\frac{{\text d}R}{{\text d}\rho} \right) + n^2 \rho^2 = - \frac{1}{\Phi}\,\frac{{\text d}^2 \Phi}{{\text d}\phi^2} .$
We may set the right-hand side to m² and
$$\frac{{\text d}^2 \Phi}{{\text d}\phi^2} = - m^2 \Psi (\phi ) . \label{EqHelmholtz.12}$$
Finally, for the ρ dependence we have
$$\rho \, \frac{\text d}{{\text d}\rho} \left( \rho\,\frac{{\text d}R}{{\text d}\rho} \right) + \left( n^2 \rho^2 - m^2 \right) %R = 0. \label{EqHelmholtz.13}$$
This is Bessel’s differential equation. The solutions and their properties are presented in section. The separation of variables of Laplace’s equation in parabolic coordinates also gives rise to Bessel’s equation. It may be noted that the Bessel equation is notorious for the variety of disguises it may assume.

The original Helmholtz equation, a three-dimensional PDE, has been replaced by three ODEs, Eqs. \eqref{EqHelmholtz.11}, \eqref{EqHelmholtz.12}, and \eqref{EqHelmholtz.13}. A solution of the Helmholtz equation is

$u(\rho , \phi , z ) = R(\rho )\,\Phi (\phi )\,Z(z) .$
Identifying the specific P , , Z solutions by subscripts, we see that the most general solu- tion of the Helmholtz equation is a linear combination of the product solutions
$$u(\rho , \phi , z) = \sum_{m,n} c_{m.n} R_{m.n} (\rho )\,\Phi_{m.n} (\phi )\,Z_{m.n} (z) . \label{EqHelmholtz.14}$$

Spherical Polar Coordinates

Let us try to separate the Helmholtz equation, again with k² constant, in spherical polar coordinates
$$\frac{1}{r^2 \sin\theta} \left[ \sin\theta \,\frac{\partial}{\partial r} \left( r^2 \frac{\partial u}{\partial r} \right) + \frac{\partial}{\partial \theta} \left( \sin\theta \,\frac{\partial u}{\partial \theta} \right) + \frac{1}{\sin\theta} \,\frac{\partial^2 u}{\partial \phi^2} \right] = -k^2 u . \label{EqHelmholtz.20}$$
Now, in analogy with previous exposition, let us try
$u(r, \theta , \phi ) = R(r)\,\Theta (\theta )\,\Phi (\phi ) .$
By substituting back into the Helmholtz equation and dividing by u, we get
$\frac{1}{R\,r^2} \,\frac{\text d}{{\text d}r} \left( r^2 \frac{{\text d}R}{{\text d}r} \right) + \frac{1}{\Theta\,r^2 \sin\theta} \,\frac{\text d}{{\text d}\theta} \left( \sin\theta \,\frac{{\text d}\Theta}{{\text d}\theta} \right) + \frac{1}{\Phi\, r^2 \sin^2 \theta}\,\frac{{\text d}^2 \Phi}{{\text d} \phi^2} = - k^2 .$
Note that all derivatives are now ordinary derivatives rather than partials. By multiplying by r² sin²θ, we can isolate $$(1/\Phi)\,({\text d}^2 \Phi /{\text d}\phi^2 )$$ to obtain
$\frac{1}{\Phi}\,\frac{{\text d}^2 \Phi}{{\text d} \phi^2} = r^2 \sin^2 \theta \left[ -k^2 - \frac{1}{r^2 R} \,\frac{\text d}{{\text d}r} \left( r^2 \frac{{\text d}R}{{\text d}r} \right) - \frac{1}{\Theta\,r^2 \sin\theta} \,\frac{\text d}{{\text d}\theta} \left( \sin\theta \,\frac{{\text d}\Theta}{{\text d}\theta} \right) \right] .$
This equation relates a function of φ alone to a function of r and θ alone. Since r, θ, and φ are independent variables, we equate each side of the equation above to a constant. In almost all physical problems φ will appear as an azimuth angle. This suggests a periodic solution rather than an exponential. With this in mind, let us use -m² as the separation constant, which, then, must be an integer squared. Then
$$\frac{1}{\Phi}\,\frac{{\text d}^2 \Phi}{{\text d} \phi^2} = - m^2 \qquad \mbox{or} \qquad \frac{{\text d}^2 \Phi}{{\text d} \phi^2} + m^2 \Phi (\phi ) = 0 , \label{EqHelmholtz.21}$$
and
$\frac{1}{r^2 R} \,\frac{\text d}{{\text d}r} \left( r^2 \frac{{\text d}R}{{\text d}r} \right) + \frac{1}{\Theta\,r^2 \sin\theta} \,\frac{\text d}{{\text d}\theta} \left( \sin\theta \,\frac{{\text d}\Theta}{{\text d}\theta} \right) - \frac{m^2}{r^2 \sin^2 \theta} = - k^2 .$
Multiplying the latter by r² and rearranging terms, we obtain
$\frac{1}{R} \, \frac{\text d}{{\text d}r} \left( r^2 \frac{{\text d}R}{{\text d}r} \right) + r^2 k^2 = - \frac{1}{\Theta\, \sin\theta} \,\frac{\text d}{{\text d}\theta} \left( \sin\theta \,\frac{{\text d}\Theta}{{\text d}\theta} \right) + \frac{m^2}{\sin^2 \theta} .$
Again, the variables are separated. We equate each side to a constant, λ, and finally obtain
\begin{align} \frac{1}{\sin\theta} \, \frac{\text d}{{\text d}\theta} \left( \sin\theta \,\frac{{\text d}\Theta}{{\text d}\theta} \right) - \frac{m^2}{\sin^2 \theta} \,\Theta + \lambda\,\Theta &= 0 , \label{EqHelmholtz.22} \\ \frac{1}{r^2} \, \frac{\text d}{{\text d}r} \left( r^2 \frac{{\text d}R}{{\text d}r} \right) + r^2 R - \lambda \,\frac{R}{r^2} &= 0 . \label{EqHelmholtz.23} \end{align}
Therefore, we have replaced a partial differential equation of three variables by three ODEs. Again, our most general solution may be written
$$u(r, \theta , \phi ) = \sum_{\lambda , m} c_{\lambda , m} R_{\lambda} (r)\,\Theta_{\lambda , m} (\theta )\,\Phi_m (\phi ) . \label{EqHelmholtz.24}$$
The restriction that k² be a constant is unnecessarily severe. The separation process will still be possible for k² as general as
$$k^2 = f(r) + \frac{1}{r^2} \,g(\theta ) + \frac{1}{r^2 \sin^2 \theta} \,h(\phi ) + p^2 , \label{EqHelmholtz.25}$$
for some functions f, g, and h; p is another parameter. In the hydrogen atom problem, one of the most important examples of the Schrödinger wave equation with a closed form solution is k² = f(r), with k²independent of θ, φ. Equation \eqref{EqHelmholtz.23} for the hydrogen atom becomes the associated Laguerre equation. The great importance of this separation of variables in spherical polar coordinates stems from the fact that the case k² = k²(r) covers a tremendous amount of physics: a great deal of the theories of gravitation, electrostatics, and atomic, nuclear, and particle physics. And with k² = k²(r), the angular dependence is isolated in \eqref{EqHelmholtz.21} and \eqref{EqHelmholtz.22} that can be solves explicitely.

Finally, as an illustration of how the constant m in Eq.\eqref{EqHelmholtz.21} is restricted, we note that φ in cylindrical and spherical polar coordinates is an azimuth angle. If this is a classical problem, we shall certainly require that the azimuthal solution Φ(φ) be single-valued; that is,

$$\Phi (\phi + 2\pi ) = \Phi (\phi ) . \label{EqHelmholtz.26}$$
This is equivalent to requiring the azimuthal solution to have a period of 2π. Therefore m must be an integer. Which integer it depends on the details of the problem. If the integer |m| > 1, then Φ will have the period 2π/m. Whenever a coordinate corresponds to an axis equation \eqref{EqHelmholtz.21} must be holt for any φ, the azimuth angle, and
$\frac{{\text d}^2 Z(z)}{{\text d} z^2} = \pm a^2 Z(z)$
for z, an axis of translation of the cylindrical coordinate system. The solutions, of course, are sin(𝑎z) and cos(𝑎z) and the corresponding hyperbolic function (or exponentials) sinh(𝑎z) and cosh(𝑎z) for +𝑎².

1. Grigoryan, V, Parial Differential Equations, 2010, University of California, Santa Barbara.