Chapter 8: Expansion in Orthogonal Functions
NOTE: Math will not display properly in Safari  please use another browser
The material covered in this chapter is partially presented in Boas Chapter 12, Sections 6 and 9.
8.1 Generalized Fourier Series
The Fourier series of Chapter 7 is the most familiar instance of a powerful technique of mathematical physics that consists of expanding a function $f(x)$ in an infinite set of basis functions. In this case the function is required to be periodic, $f(x+2\pi) = f(x)$, and the basis functions are the complex exponentials $e^{inx}$. These are orthogonal functions, in the sense that
\begin{equation} \int_0^{2\pi} (e^{inx})^* e^{in' x}\, dx = 2\pi \delta_{nn'}, \tag{8.1}\end{equation}
and this property allows us to go from the Fourier series
\begin{equation} f(x) = \sum_{n=\infty}^\infty c_n e^{inx} \tag{8.2} \end{equation}
to the Fourier coefficients
\begin{equation} c_n = \frac{1}{2\pi} \int_0^{2\pi} f(x) e^{inx}\, dx. \tag{8.3} \end{equation}
The Fourier series allows us to encode the information contained in $f(x)$ in an infinite number of (complex) constants $c_n$. That we need an infinite number of coefficients is expected, because the information content of a function is also infinite  we need values for $f$ at an infinite number of points. It is interesting to note, however, that while the number of values of $f$ is uncountably infinite, the number of Fourier coefficients is countably infinite; we seem to be gaining in efficiency by expressing $f(x)$ as a Fourier series. The gain is even more substantial when we remember that a truncated Fourier series often offers a perfectly adequate approximation to the function.
The Fourier series is based on a specific set of orthogonal functions, the complex exponentials, but the idea can easily be generalized to any set of orthogonal functions. Suppose that the set $e_n(x)$, whatever it might be, is orthogonal on the interval $(a,b)$, so that
\begin{equation} \int_a^b e^*_n(x) e_{n'}(x)\, dx = N_n \delta_{nn'}, \tag{8.4} \end{equation}
where $N_n := \int_a^b e_n(x)^2\, dx$ is the norm of the function $e_n(x)$. We assume that the set includes an infinite number of basis functions, which in general we allow to be complex. A function $f(x)$ on $(a, b)$ can always be expressed as
\begin{equation} f(x) = \sum_n c_n e_n(x), \tag{8.5} \end{equation}
with coefficients
\begin{equation} c_n = \frac{1}{N_n} \int_a^b f(x) e_n^*(x)\, dx. \tag{8.6} \end{equation}
Equation (8.5) is a generalized Fourier series, and the coefficients of Eq.(8.6) are generalized Fourier coefficients. The generalized Fourier series gives an encoding of the information contained in $f(x)$ in the form of the coefficients $c_n$. An exact representation of the function would in general require an infinite number of terms in Eq.(8.5), but here also we can expect that a truncated sum will often produce a very good approximation.
To establish Eq.(8.6) we rewrite Eq.(8.5) as $f = \sum_{n'} c_{n'} e_{n'}$, using $n'$ instead of $n$ as the summation index. We multiply by $e_n^*$ and integrate over the interval $(a,b)$, giving
\begin{equation} \int_a^b f(x) e_n^*(x)\, dx = \sum_{n'} c_{n'} \int_a^b e_n(x)^* e_{n'}(x)\, dx = \sum_{n'} c_{n'}\, N_n \delta_{nn'} = c_n N_n, \tag{8.7} \end{equation}
which is the same as Eq.(8.6). In the second step we made use of Eq.(8.4), and in the last step we noted that by virtue of the Kronecker delta, the only nonvanishing term in the sum over $n'$ is the one with $n' = n$.
A generalized Fourier series can be defined for any set of orthogonal functions. We have encountered a few such sets in Chapters 3, 4, and 5. In the next sections we will involve them all in generalized Fourier series. These developments might seem exotic at first sight, and with a less generous attitude, might even appear as a futile exercise at expressing simple functions in horribly complicated ways. Bear with it! The power of these techniques will be unleashed in Chapters 10 and 11.
8.2 Legendre Series
We saw back in Chapter 3  refer to Sec.3.7  that the Legendre polynomials $P_\ell(x)$ form a set of orthogonal functions on the interval $(1,1)$. The statement of orthogonality is Eq.(3.44),
\begin{equation} \int_{1}^1 P_\ell(x) P_{\ell'}(x)\, dx = \frac{2}{2\ell+1}\, \delta_{\ell\ell'}. \tag{8.8} \end{equation}
Comparing with Eq.(8.4), we have that $\ell = 0, 1, 2, \cdots$ can be identified with $n$, $P_\ell(x)$ can be identified with $e_n(x)$, and $2/(2\ell+1)$ can be identified with $N_n$. The Legendre polynomials are real functions, so there is no need to complex conjugate anything. Equations (8.5) and (8.6) become
\begin{equation} f(x) = \sum_{\ell=0}^\infty c_\ell P_\ell(x) \tag{8.9} \end{equation}
and
\begin{equation} c_\ell = \frac{1}{2} (2\ell+1) \int_{1}^1 f(x) P_\ell(x)\, dx \tag{8.10} \end{equation}
in the context of Legendre polynomials. Equation (8.9) is known as a Legendre series (or sometimes FourierLegendre series). It is understood that the function $f(x)$ is defined on the interval $(1,1)$.
As an example, let us construct the Legendre series for the step function
\begin{equation} f(x) = \left\{ \begin{array}{lr} 0 & \quad 1 \leq x < 0 \\ 1 & \quad 0 \leq x < 1 \end{array} \right. . \tag{8.11} \end{equation}
According to Eq.(8.10), the first two coefficients are given by
\begin{equation} c_0 = \frac{1}{2} \int_{1}^1 f(x) P_0(x)\, dx = \frac{1}{2} \int_0^1 P_0(x)\, dx = \frac{1}{2} \int_0^1 dx = \frac{1}{2} \tag{8.12} \end{equation}
and
\begin{equation} c_1 = \frac{3}{2} \int_{1}^1 f(x) P_1(x)\, dx = \frac{1}{2} \int_0^1 P_1(x)\, dx = \frac{3}{2} \int_0^1 x\, dx = \frac{3}{4}. \tag{8.13} \end{equation}
A general expression for $c_\ell$ when $\ell \geq 1$ can be obtained if we rely on the recursion relation  refer back to Eq.(3.21b)  $(2\ell+1) P_\ell = P'_{\ell+1}  P'_{\ell1}$, in which a prime indicates differentiation with respect to $x$. We have
\begin{equation} c_\ell = \frac{1}{2} \int_0^1 \bigl( P'_{\ell+1}  P'_{\ell1} \bigr)\, dx = \frac{1}{2} \bigl[ P_{\ell+1}(1)  P_{\ell+1}(0)  P_{\ell1}(1) + P_{\ell1}(0) \bigr], \tag{8.14} \end{equation}
and since $P_{\ell+1}(1) = P_{\ell1}(1) = 1$  refer back to Eq.(3.4)  this simplifies to
\begin{equation} c_\ell = \frac{1}{2} \bigl[ P_{\ell+1}(0)  P_{\ell1}(0) \bigr]. \tag{8.15} \end{equation}
Because $P_\ell(x)$ is an odd function when $\ell$ is odd, we have that $P_\ell(0) = 0$ when $\ell$ is odd, or that $P_{\ell\pm 1}(0) = 0$ when $\ell$ is even. The coefficients of Eq.(8.15), therefore, vanish when $\ell$ is even. In Sec.3.11 (Problem 1) you were asked to work out an expression for $P_\ell(0)$ when $\ell$ is even; your answer should have been
\begin{equation} P_\ell(0) = (1)^{\ell/2} \frac{(\ell1)!!}{\ell!!}, \qquad \text{$\ell$ even, greater than 0}. \tag{8.16} \end{equation}
This can be substituted into Eq.(8.15), with $\ell$ replaced by $\ell \pm 1$, for a more concrete expression for the coefficients.
Exercise 8.1: Make the substitution, and show that Eq.(8.15) becomes
\[ c_\ell = \frac{1}{2} (2\ell+1) (1)^{(\ell1)/2} \frac{(\ell2)!!}{(\ell+1)!!} \]
when $\ell$ is odd and greater than 1.
The step function is plotted in Fig.8.1, along with three truncations of the Legendre series. We see that the series has difficulties coping with the discontinuity of the function at $x=0$. This behaviour is similar to what was observed in the case of Fourier series applied to the square and sawtooth waves. The reason is the same: it is difficult to produce a discontinuity by adding a bunch of continuous functions.
8.3 Expansion in Spherical Harmonics
The spherical harmonics $Y^m_\ell(\theta,\phi)$ were introduced in Chapter 4, and in Sec.4.7 we learned that they form an orthonormal set of functions on the surface of a sphere. The meaning of this phrase is provided by Eq.(4.40),
\begin{equation} \int_0^{2\pi} \int_0^\pi \bigl[ Y^m_\ell(\theta,\phi) \bigr]^* \bigl[ Y^{m'}_{\ell'}(\theta,\phi) \bigr]\, \sin\theta d\theta d\phi = \delta_{\ell\ell'} \delta_{mm'}. \tag{8.17} \end{equation}
The labels $\ell$ and $m$ are integers, with $\ell = 0, 1, 2, \cdots$ and $m = \ell, \ell+1, \cdots \ell1, \ell$.
Because they form a set of orthogonal functions, the spherical harmonics can be implicated in a generalized Fourier series. Because the spherical harmonics depend on $\theta$ and $\phi$, the functions to be expanded will also depend on these variables, and will also be interpreted as functions on the surface of a sphere. And because the spherical harmonics carry two labels, $\ell$ and $m$, the series will be expressed as a double sum. We have
\begin{equation} f(\theta,\phi) = \sum_{\ell=0}^\infty \sum_{m=\ell}^\ell c^m_\ell Y^m_\ell(\theta,\phi). \tag{8.18} \end{equation}
The coefficients $c^m_\ell$ can be related to the function $f$ by adapting the general method described near the end of Sec.8.1 to this new situation. The steps are equally straightforward, and we get
\begin{equation} c^m_\ell = \int_0^{2\pi} \int_0^\pi f(\theta,\phi) \bigl[ Y^m_\ell(\theta,\phi) \bigr]^*\, \sin\theta d\theta d\phi \tag{8.19} \end{equation}
for the expansion coefficients.
Exercise 8.2: Verify Eq.(8.19).
As an example, let us work out the expansion of
\begin{equation} f(\theta,\phi) = \sin^2\theta \cos^2\phi \tag{8.20} \end{equation}
in spherical harmonics. A generic function of $\theta$ and $\phi$ would normally have an expansion involving an infinite number of terms, but this function is very simple, and we can easily identify the few spherical harmonics that will be implicated in its expansion. The first clue comes from the factor $\cos^2\phi$, which can be expressed as $\frac{1}{2}(1 + \cos 2\phi) = \frac{1}{2} + \frac{1}{4} e^{2i\phi} + \frac{1}{4} e^{2i\phi}$; this indicates that only spherical harmonics with $m=0$ and $m = \pm 2$ will be implicated in the expansion. Incorporating the factor $\sin^2\theta$, we see that some pieces of $f$ are given by $\frac{1}{4} \sin^2\theta e^{\pm 2i\phi}$, which is precisely proportional to $Y^{\pm 2}_2$, as can be seen from the listing of Eq.(4.36). The missing piece of $f$ is $\frac{1}{2} \sin^2\theta$, which can be expressed as $\frac{1}{2}  \frac{1}{2} \cos^2\theta = \frac{1}{3}  \frac{1}{6} (3\cos^2\theta  1)$. The first term is proportional to $Y^0_0$, the second is proportional to $Y^0_2$, and we have all the required pieces. Putting this all together, and incorporating the strange numerical coefficients that come with the spherical harmonics, we arrive at
\begin{equation} f(\theta, \phi) = \frac{2\sqrt{\pi}}{3} Y^0_0  \frac{2}{3} \sqrt{\frac{\pi}{5}} Y^0_2 + \sqrt{\frac{2\pi}{15}} \bigl( Y^2_2 + Y^{2}_2 \bigr). \tag{8.21} \end{equation}
In this example, the function $f$ was sufficiently simple that we could break it up directly into pieces that were recognized as spherical harmonics. In this case we didn't have to resort to Eq.(8.19) to calculate the nonvanishing expansion coefficients, $c^0_0$, $c^2_0$, and $c^{\pm 2}_2$. In more complicated situations, however, this direct decomposition may not be possible, and Eq.(8.19) would have to be invoked to get all the relevant coefficients.
Exercise 8.3: Fill in the missing steps in the derivation of Eq.(8.21). Also, calculate $c^0_0$, $c^2_0$, and $c^{\pm 2}_2$ directly from Eq.(8.19), and verify that they agree with Eq.(8.21).
8.4 Bessel Series
Another set of orthogonal functions are the Bessel functions introduced in Chapter 5. In this case the meaning of orthogonality is far more subtle, and provided by Eqs.(5.39) and (5.40), which we combine as
\begin{equation} \int_0^1 J_n(\alpha_{np} x) J_n(\alpha_{nq} x)\, x\, dx = \frac{1}{2} \bigl[ J_{n+1}(\alpha_{np}) \bigr]^2 \delta_{pq}, \tag{8.22} \end{equation}
where $\alpha_{np}$ is the $p^{\rm th}$ zero of the $n^{\rm th}$ Bessel function. Adapting once again the general method of Sec.8.1 to this new situation, we have that a generalized Fourier series based on $J_n$ is given by
\begin{equation} f(x) = \sum_{p=1}^\infty c_p J_n(\alpha_{np} x), \tag{8.23} \end{equation}
with coefficients
\begin{equation} c_p = \frac{2}{ \bigl[ J_{n+1}(\alpha_{np}) \bigr]^2 } \int_0^1 f(x) J_n(\alpha_{np} x)\, x\, dx. \tag{8.24} \end{equation}
Equation (8.23) is known as a Bessel series, or sometimes as a FourierBessel series. It is understood that the function $f(x)$ is defined on the interval $(0,1)$. Notice that Eq.(8.23) actually defines an infinite number of Bessel series, one for each value of $n$.
Exercise 8.4: Verify Eq.(8.24).
As an example we shall expand
\begin{equation} f(x) = 1  x^2 \tag{8.25} \end{equation}
in a Bessel series based on $J_0$,
\begin{equation} f(x) = \sum_{p=1}^\infty c_p J_0(\alpha_{0p} x). \tag{8.26} \end{equation}
The coefficients are given by Eq.(8.24) with $n=0$, which we write as
\begin{equation} N_p c_p = \int_0^1 (1x^2) J_0(\alpha_{0p} x)\, x\, dx, \tag{8.27} \end{equation}
where $N_p := \frac{1}{2} [J_1(\alpha_{0p} x)]^2$. To evaluate the integral we let $y := \alpha_{0p} x$, $\alpha := \alpha_{0p}$, so that
\begin{equation} N_p c_p = \frac{1}{\alpha^4} \int_0^{\alpha} (\alpha^2  y^2) J_0(y)\, y\, dy. \tag{8.28} \end{equation}
For the remaining steps we require the recursion relations of Eqs.(5.20), especially
\begin{equation} \frac{d}{dy} (y^n J_n) = y^n J_{n1}, \qquad \frac{d}{dy} (y^{n} J_n) = y^{n} J_{n+1} \tag{8.29}. \end{equation}
We set $n=1$ in the first equation, get $y J_0 = (y J_1)'$ with the prime indicating differentiation with respect to $y$, and rewrite the integrand as
\begin{equation} (\alpha^2  y^2) J_0\, y = (\alpha^2  y^2) (y J_1)' = \bigl[ (\alpha^2y^2) y J_1 \bigr]' + 2y^2 J_1. \tag{8.30} \end{equation}
Integration yields
\begin{equation} \alpha^4 N_p c_p = \bigl[ (\alpha^2y^2) y J_1 \bigr] \biggr^\alpha_0 +2 \int_0^\alpha y^2 J_1(y)\, dy = 2 \int_0^\alpha y^2 J_1(y)\, dy, \tag{8.31} \end{equation}
because the boundary terms at $y = \alpha$ and $y=0$ both vanish. At this stage we set $n=0$ in the second recursion relation, get $J_1 = J_0'$, and rewrite the integrand as
\begin{equation} y^2 J_1 = y^2 J_0' = (y^2 J_0)' + 2y J_0. \tag{8.32} \end{equation}
Integration gives
\begin{equation} \alpha^4 N_p c_p = 2 y^2 J_0 \biggr^\alpha_0 + 4 \int_0^\alpha y J_0\, dy = 4 \int_0^\alpha y J_0\, dy, \tag{8.33} \end{equation}
because the boundary terms vanish once again  recall that $\alpha \equiv \alpha_{0p}$ is a zero of $J_0$. To deal with the remaining integral we once again exploit the identity $y J_0 = (y J_1)'$, and get
\begin{equation} \alpha^4 N_p c_p = 4 y J_1 \biggr^\alpha_0 = 4\alpha J_1(\alpha). \tag{8.34} \end{equation}
We have finally obtained
\begin{equation} c_p = \frac{8}{ (\alpha_{0p})^3 J_1(\alpha_{0p}) } \tag{8.35} \end{equation}
for the expansion coefficients. If we evaluate them numerically, we find that the first few are given by $c_1 \simeq 1.108$, $c_2 \simeq 0.1398$, $c_3 \simeq 0.04548$, $c_4 \simeq 0.02099$, and $c_5 \simeq 0.01164$. As we have seen in the case of Fourier series, the coefficients decrease in magnitude with increasing $p$, indicating that a truncated expansion will do an excellent job at reproducing the function.
The function of Eq.(8.25) is plotted in Fig.8.2, along with three truncations of the Bessel series. We see that because $f$ is nice and smooth, the truncated series provide very accurate representations of the function.
8.5 Practice Problems

(Boas Chapter 12, Section 9, Problem 2) Expand in a Legendre series the function defined by $f(x) = 0$ when $1 \leq x < 0$ and $f(x) = x$ when $0 \leq x < 1$.

(Boas Chapter 12, Section 9, Problem 3) Expand $P'_3(x)$ in a Legendre series.

(Boas Chapter 12, Section 9, Problem 10) Expand $3x^2 + x  1$ in a Legendre series.

(Boas Chapter 12, Section 9, Problem 11) Expand $7x^4  3x + 1$ in a Legendre series.

Express $\cos\theta  \cos^3\theta$ as an expansion in spherical harmonics.

Express $\sin\theta\cos\theta\sin\phi$ as an expansion in spherical harmonics.

Express $(4\cos^2\theta3) \sin^3\theta \cos\phi$ as an expansion in spherical harmonics.

Expand $f(x) = 1$ ($0 < x < 1$) in a Bessel series.

Expand $f(x) = x$ ($0 < x < 1$) in a Bessel series.