Boundary Value Problems
Before we introduce an important solution method for PDEs in section 7.3, we consider an ordinary differential equation that will arise in that method when dealing with a single spatial dimension \(x\): the sturm-liouville (S-L) differential equation. Let \(p, q, \sigma\) be functions of \(x\) on open interval \((a,b)\). Let \(X\) be the dependent variable and \(\lambda\) constant. The regular S-L problem is the S-L ODE1 $$\begin{align} \frac{d} {d x} \left( p X' \right) + q X + \lambda \sigma X = 0 \end{align}$$ with boundary conditions $$\begin{align}\label{eq:s_l_bcs} \beta_1 X(a) + \beta_2 X'(a) &= 0 \\ \beta_3 X(b) + \beta_4 X'(b) &= 0 \end{align}$$ with coefficients \(\beta_i \in \mathbb{R}\). This is a type of boundary value problem.
This problem has nontrivial solutions, called eigenfunctions \(X_n(x)\) with \(n \in \mathbb{Z}_+\), corresponding to specific values of \(\lambda = \lambda_n\) called eigenvalues.2 There are several important theorems proven about this (see Haberman (2018, sec. 5.3)). Of greatest interest to us are that
There exist an infinite number of eigenfunctions \(X_n\) (unique within a multiplicative constant)
There exists a unique corresponding real eigenvalue \(\lambda_n\) for each eigenfunction \(X_n\)
The eigenvalues can be ordered as \(\lambda_1 < \lambda_2 < \cdots\)
Eigenfunction \(X_n\) has \(n-1\) zeros on open interval \((a,b)\)
The eigenfunctions \(X_n\) form an orthogonal basis with respect to weighting function \(\sigma\) such that any piecewise continuous function \(f:[a,b]\rightarrow\mathbb{R}\) can be represented by a generalized fourier series on \([a,b]\)
This last theorem will be of particular interest in section 7.3.
Types of boundary conditions
Boundary conditions of the sturm-liouville kind eq. ¿eq:s_l_bcs? have four sub-types:
- Dirichlet
-
for just \(\beta_2, \beta_4 = 0\),
- Neumann
-
for just \(\beta_1, \beta_3 = 0\),
- Robin
-
for all \(\beta_i \ne 0\), and
- Mixed
-
if \(\beta_1 = 0\), \(\beta_3 \ne 0\); if \(\beta_2 = 0\), \(\beta_4 \ne 0\).
There are many problems that are not regular sturm-liouville problems. For instance, the right-hand sides of eq. ¿eq:s_l_bcs? are zero, making them homogeneous boundary conditions; however, these can also be nonzero. Another case is periodic boundary conditions: $$\begin{align} X(a) &= X(b) \\ X'(a) &= X'(b). \end{align}$$
Consider the differential equation $$\begin{aligned} X'' + \lambda X = 0 \end{aligned}$$ with dirichlet boundary conditions on the boundary of the interval [0,L] $$\begin{aligned} X(0) = 0 \quad\text{and}\quad X(L) = 0. \end{aligned}$$ Solve for the eigenvalues and eigenfunctions.
This is a sturm-liouville problem, so we know the eigenvalues are real. The well-known general solution to the ODE is $$X(x) = \begin{cases} k_1 + k_2 x & \lambda = 0 \\ k_1 e^{j\sqrt{\lambda} x} + k_2 e^{-j\sqrt{\lambda} x} & \text{otherwise} \end{cases}$$ with real constants k1, k2. The solution must also satisfy the boundary conditions. Let’s apply them to the case of λ = 0 first: $$\begin{aligned} X(0) &= 0 \Rightarrow k_1 + k_2 (0) = 0 \Rightarrow k_1 = 0 \\ X(L) &= 0 \Rightarrow k_1 + k_2 (L) = 0 \Rightarrow k_2 = -k_1/L. \end{aligned}$$ Together, these imply k1 = k2 = 0, which gives the trivial solution X(x) = 0, in which we aren’t interested. We say, then, that for nontrivial solutions, λ ≠ 0. Now let’s check λ < 0. The solution becomes $$\begin{aligned} X(x) &= k_1 e^{-\sqrt{\abs{\lambda}} x} + k_2 e^{\sqrt{\abs{\lambda}} x} \\ &= k_3 \cosh(\sqrt{\abs{\lambda}}x) + k_4 \sinh(\sqrt{\abs{\lambda}}x) \end{aligned}$$ where k3 and k4 are real constants. Again applying the boundary conditions: $$\begin{aligned} X(0) &= 0 \Rightarrow k_3 \cosh(0) + k_4 \sinh(0) = 0 \Rightarrow k_3 + 0 = 0 \Rightarrow k_3 = 0 \\ X(L) &= 0 \Rightarrow 0 \cosh(\sqrt{\abs{\lambda}}L) + k_4 \sinh(\sqrt{\abs{\lambda}}L) = 0 \Rightarrow k_4 \sinh(\sqrt{\abs{\lambda}}L) = 0. \end{aligned}$$ However, $\sinh(\sqrt{\abs{\lambda}}L) \ne 0$ for L > 0, so k4 = k3 = 0—again, the trivial solution. Now let’s try λ > 0. The solution can be written $$\begin{aligned} X(x) = k_5 \cos(\sqrt{\lambda}x) + k_6 \sin(\sqrt{\lambda}x). \end{aligned}$$ Applying the boundary conditions for this case: $$\begin{aligned} X(0) &= 0 \Rightarrow k_5 \cos(0) + k_6 \sin(0) = 0 \Rightarrow k_5 + 0 = 0 \Rightarrow k_5 = 0 \\ X(L) &= 0 \Rightarrow 0 \cos(\sqrt{\lambda}L) + k_6 \sin(\sqrt{\lambda}L) = 0 \Rightarrow k_6 \sin(\sqrt{\lambda}L) = 0. \end{aligned}$$ Now, $\sin(\sqrt{\lambda}L) = 0$ for $$\begin{align} \sqrt{\lambda}L &= n \pi \Rightarrow \nonumber \\ \lambda &= \left(\frac{n \pi} {L}\right)^2. \tag{$n \in \mathbb{Z_+}$} \end{align}$$ Therefore, the only nontrivial solutions that satisfy both the ODE and the boundary conditions are the eigenfunctions $$\begin{align} X_n(x) &= \sin\left(\sqrt{\lambda_n} x\right) \\ &= \sin\left(\frac{n \pi} {L} x\right) \end{align}$$ with corresponding eigenvalues $$\begin{aligned} \lambda_n &= \left(\frac{n \pi} {L}\right)^2. \end{aligned}$$ Note that because λ > 0, λ1 is the lowest eigenvalue.
Plotting the eigenfunctions
import numpy as np
import matplotlib.pyplot as plt
Set L = 1 and compute
values for the first four eigenvalues lambda_n
and eigenfunctions X_n
.
= 1
L = np.linspace(0, L, 100)
x = np.linspace(1, 4, 4, dtype=int)
n = (n*np.pi/L)**2
lambda_n = np.zeros([len(n), len(x)])
X_n for i,n_i in enumerate(n):
= np.sin(np.sqrt(lambda_n[i])*x) X_n[i, :]
Plot the eigenfunctions.
= plt.subplots()
fig, ax for i, n_i in enumerate(n):
=2,label='$n = '+str(n_i)+'$')
ax.plot(x, X_n[i,:], linewidth
plt.legend() plt.show()
We see that the fourth of the S-L theorems appears true: n − 1 zeros of Xn exist on the open interval (0,1).
Irregular Sturm-Liouville problems
Sturm-Liouville problems that do not satisfy the regularity conditions are called irregular. The nice theorems for regular S-L problems may not hold for irregular S-L problems. However, we can often still solve irregular S-L problems using the same methods as for regular problems.
Consider the ODE called Bessel’s equation [@kreyszig2011, § 5.4], for real independent variable s and dependent variable y(s), s2y″ + sy′ + (s2−ν2)y = 0. This ODE arises in polar coordinate PDE models of circular membranes, where y is the membrane displacement and s = kr, and where r is the radius of the membrane and k is a constant sometimes called the wavenumber.
Consider the following boundary conditions:
- At radius r = R, the membrane is fixed, so y = 0.
- At radius r = 0, the membrane is free to move, but the displacement is finite, so |y| < ∞.
Prove that the Bessel equation is an irregular Sturm-Liouville problem and solve for the eigenvalues and eigenfunctions for the case ν = 0.
We proceed to show that the Bessel equation with the given boundary conditions is an irregular Sturm-Liouville problem by first showing that the Bessel equation can be written in the form of a Sturm-Liouville problem ODE, then showing that the boundary conditions are not regular. Dividing the Bessel equation by s gives $$\begin{align} s y'' + y' + \frac{s^2 - \nu^2}{s} y &= 0 \implies \tag{z \ne 0} \\ \frac{d}{d s} \left( s y' \right) + \left(s - \nu^2/s\right) y &= 0. \end{align}$$ So we see that this is equivalent to the Sturm-Liouville problem’s ODE, $$\begin{align} \frac{d} {d x} \left(p X'\right) + \left(\lambda \sigma + q\right) X = 0, \end{align}$$ with x = s, X = y, p(s) = s, q(s) = − ν2/s, σ(s) = s, and λ = 1.
Now let us consider the boundary conditions. The second boundary condition cannot be written as a linear combination of y and y′ at s = 0, therefore this is an irregular Sturm-Liouville problem.
Solutions for Bessel’s equation are Bessel functions of the first kind, Jν(s) (section 6.4), and Bessel functions of the second kind, Yν(s) [@kreyszig2011,§ 5.5]. For ν = 0, the Bessel equation simplifies to s2y″ + sy′ + s2y = 0 and the solutions are zeroth-order Bessel functions of the first kind, J0(s), and of the second kind, Y0(s). That is, the general solution is y(s) = aJ0(s) + bY0(s). However, Y0(s) is singular at s = 0, so the boundary condition |y(0)| < ∞ requires b = 0. Therefore, the eigenfunctions are yn(s) = J0(s) = J0(knr) for eigenvalues λn = kn2 and n ∈ ℤ+. On the boundary, yn(kR) = 0 implies that knR are the zeros of J0(s), what we called α0, n in example. Therefore, the eigenvalues are $$ \lambda_n = \left(\frac{\alpha_{0,n}}{R}\right)^2. $$
Plotting the eigenfunctions
We proceed in Python. First, load packages.
import numpy as np
import sympy as sp
import scipy
from scipy.special import jn_zeros
import matplotlib.pyplot as plt
The eigenvalues can be computed from the zeros of the Bessel function zeros α0, n, where n = 1, 2, 3, … as follows:
= sp.symbols('n', integer=True, positive=True)
n = sp.symbols('k, R', positive=True, real=True)
k, R = sp.symbols('r', nonnegative=True)
r = sp.besselj(0, k * r)
J_0 = 5
N_zeros = jn_zeros(0, N_zeros)
alpha_0_n = {R: 1} # Set R = 1
params = (alpha_0_n / params[R])**2
lambda_n_ print(f"The first {N_zeros} eigenvalues are:")
print(lambda_n_)
The first 5 eigenvalues are:
[ 5.78318596 30.47126234 74.88700679 139.04028443 222.93230362]
The eigenfunctions are given by the Bessel functions of the first kind J0(knr).
def k_n(lambda_n): return np.sqrt(lambda_n)
= k_n(lambda_n_) k_n_
Plot the eigenfunctions.
= np.linspace(0, 1, 101)
r_plt print(J_0)
= sp.lambdify((r, k), J_0, modules=['numpy', 'scipy'])
y_n_fun = plt.subplots()
fig, ax for i in range(5):
= k_n_[i]
k_i =f'$y_{i+1}(k_{i+1} r)$')
ax.plot(r_plt, y_n_fun(r_plt, k_i), label'bottom'].set_position('zero')
ax.spines['left'].set_position('zero')
ax.spines['$r$')
ax.set_xlabel('Eigenfunctions $y_n(k_n r)$')
ax.set_ylabel(
ax.legend() plt.show()
The plot shows the eigenfunctions yn(knr) for the first few eigenvalues. Note that the boundary conditions are satisfied and that the eigenfunctions appear to be radial modes of vibration for a circular membrane.
For the S-L problem to be regular, it has the additional constraints that \(p, q, \sigma\) are continuous and \(p, \sigma > 0\) on \([a,b]\). This is also sometimes called the sturm-liouville eigenvalue problem. See Haberman (2018, sec. 5.3) for the more general (non-regular) S-L problem and Haberman (2018, sec. 7.4) for the multi-dimensional analog.↩︎
These eigenvalues are closely related to, but distinct from, the “eigenvalues” that arise in systems of linear ODEs.↩︎
Online Resources for Section 7.2
No online resources.