% vim: tw=50
% 17/10/2022 10AM

\subsubsection*{Real eigenvalues}

Given
\[ \mathcal{L} y_n = \lambda_n \omega y_n
\tag{2.12} \]
take complex conjugate (note both $\mathcal{L}$
and $\omega$ are real):
\[ \mathcal{L} y_n^* = \lambda_n^* \omega y_n^* \]
Consider
\begin{align*}
    \int_a^b (y_n^* \mathcal{L} y_n - (\mathcal{L}
    y_n^*) y_n \dd x
    &= (\lambda_n - \lambda_n^*) \int_a^b \omega
    y_n y_n^* \dd x \\
    &= 0
\end{align*}
(the equals zero comes from the fact that we know
that the original expression was zero, because
$\mathcal{L}$ is self-adjoint) \\
But the right hand side is
\[ \int \omega |y_n|^2 \dd x > 0 \]
so $\lambda_n = \lambda_n^*$ so $\lambda_n$ is
real. We will \emph{assume} that $y_n$ are real.

\subsubsection*{Orthogonal eigenfunctions}

Consider (2.12) with a second eigenvalue
$\lambda_m \neq \lambda_n$.
\[ \mathcal{L} y_m = \lambda_m \omega y_m \]
then from (2.10)
\begin{align*}
    0
    &= \int_a^b (y_m \mathcal{L} y_n - y_n
    \mathcal{L} y_m) \dd x \\
    &= (\lambda_n - \lambda_m) \int_a^b \omega y_n
    y_m \dd x
\end{align*}
But since $\lambda_m \neq \lambda_n$,
\[ \boxed{\int_a^b \omega y_n y_m \dd x = 0 \quad
\forall n \neq m} \tag{2.13} \]
so $y_n, y_m$ are orthogonal with respect to
$\omega(x)$ on the interval $a \le x < b$. \\
Define the inner product with respect to weight
function $w(x)$ on $a \le x \le b$ as
\begin{flashcard}[SL-inner-product]
\prompt{Inner product for Sturm-Liouville form?}
\[ \cloze{\langle f, g \rangle_\omega = \int_a^b
\omega(x) f^*(x)g(x) \dd x = \langle \omega f, g
\rangle = \langle f, \omega g \rangle \tag{2.14}} \]
\end{flashcard}
so orthogonal relation (2.13) becomes
\[ \langle y_n, y_m \rangle_\omega = 0 \quad
\forall n \neq m \tag{2.15} \]

\subsubsection*{Eigenfunction expansions}

Completeness (not proven here) implies we can
approximate any ``well-behaved'' function $f(x)$
on $a \le x \le b$ by the series
\[ \boxed{f(x) = \sum_{n = 1}^\infty a_n y_n(x)}
\tag{2.16} \]
To find \emph{expansion coefficients} consider
\begin{align*}
    \int_a^b \dd x \omega(x) y_m(x) f(x)
    &= \sum_{n = 1}^\infty a_n \int_a^b \omega y_n
    y_m \dd x \\
    &= a_m \int_a^b \omega y_m^2 \dd x
\end{align*}
by orthogonality. Hence
\begin{flashcard}[SL-expansion-coefficients]
\prompt{Expansion coefficients for Sturm-Liouville
eigenfunction expansion $f = \sum_n a_n y_n$?}
\[ \boxed{a_n = \cloze{\frac{\int_a^b \omega(x) y_n(x)
f(x) \dd x}{\int_a^b \omega(x) y_n^2(x) \dd x}}}
\tag{2.17} \]
\end{flashcard}
Eigenfunctions normalized for convenience.
\emph{Unit norm} has
\[ Y_n(x) \equiv \frac{y_n(x)}{\left( \int_a^b
\omega y_n^2 \dd x \right)^\half} \]
so $\langle Y_n, Y_m \rangle = \delta_{nm}$ (2.18)
are orthogonal with $f(x) = \sum_{n = 1}^\infty
A_nY_n(x)$ and $A_n = \int_a^b \omega Y_n f \dd
x$. \myskip
Exemplar 1: Recall Fourier series (1.4) in Sturm
Liouville form
\[ \mathcal{L} y_n \equiv -\dfrac[2]{y_n}{x} =
\lambda_n y_n \tag{1.21} \]
with $\lambda_n = \left( \frac{n\pi}{L} \right)^2$
and orthogonality relations (1.1-3).

\subsection{Completeness and Parseval's identity}

Consider
\begin{align*}
    \int_a^b \left[ f(x) - \sum_{n = 1}^\infty a_n
    y_n \right]^2 \omega\dd x
    &= \int_a^b \left[ f^2 - 2f \sum_n a_n y_n +
    \sum_n a_n^2 y_n^2 \right] \omega \dd x
    &&\text{(by orthogonality)} \\
    &= \int_a^b \omega f^2 \dd x - \sum_{n =
    1}^\infty a_n^2 \int_a^b \omega y_n^2 \dd x
\end{align*}
because by (2.17) $\int_a^b f y_n \omega \dd x =
a_n \int_a^b \omega y_n^2 \dd x$. If the
eigenfunctions are \emph{complete} then series
converges
\begin{align*}
    \int_a^b \omega f^2 \dd x
    &= \sum_{n = 1}^\infty a_n^2 \int \omega y_n^2
    \dd x \tag{2.19} \\
    &= \sum_{n = 1}^\infty A_n^2
\end{align*}
for unit norm $Y_n$.

\begin{theorem*}[Bessel's inequality]
    If some eigenfunctions are missing, then
    \[ \int_a^b \omega f^2 \dd x \ge \sum_{n =
    1}^\infty A_n^2 \]
\end{theorem*}

\begin{flashcard}[SL-mean-square-error]
\begin{definition*}[Mean square error]
    \[ \cloze{\eps_N = \int_a^b \omega [f(x) - S_N(x)]^2
    \dd x \to 0} \]
\end{definition*}
\end{flashcard}

\noindent
Define \emph{partial sum}
\[ S_N(x) = \sum_{n = 1}^N a_n y_n \tag{2.20} \]
with $f(x) = \lim_{N \to \infty} S_N(x)$.
The \emph{error} in the partial sum (2.20) is
minimised by $a_n$ defined in (2.19) for the $N =
\infty$ expansion:
\begin{align*}
    \pfrac{\eps_N}{a_n}
    &= \pfrac{}{a_n} \left[
    \int_a^b \omega [f(x) - \sum a_n y_n]^2 \dd x
    \right] \\
    &= -2 \int_a^b y_n \omega [f - \sum_{n = 1}^N
    a_n y_n \dd x \\
    &= -2\int_a^b (\omega f y_n - a_n \omega
    y_n^2) \dd x \\
    &= 0
\end{align*}
if $a_n$ given by (2.17). So $a_n$ is the ``best
possible choice'' (assuming you care about the
mean square error).

\subsection{Exemplar 2: Legendre polynomials}

Consider Legendre's equation arising from
spherical polars $x = \cos \theta$
\begin{flashcard}[Legendre-SL]
\prompt{What is Legendre's equation?}
\[ \cloze{(1 - x^2) y'' - 2xy' + \lambda y = 0
\tag{2.21}} \]
so \cloze{$p = 1 - x^2$, $q = 0$, $\omega = 1$}.
\end{flashcard}
on the interval $-1 \le x \le 1$ with $y$ finite
at $x = \pm 1$ (regular singular point of ODE).
Equation (2.21) is in Sturm Liouville form (2.7)
with
\[ p = 1 - x^2, ~ q = 0, ~ \omega = 1 \]
How to solve? Seek a power series about $x = 0$:
\[ y = \sum_n c_n x^n \]
Substitute
\[ (1 - x^2) \sum n(n - 1) c_n x^{n - 2} - 2x
\sum_n c_n x^{n - 1} + \lambda \sum c_n x^n = 0 \]
Equate powers of $x^n$:
\[ (n + 2)(n + 1) c_{n + 2} - n(n - 1) c_n - 2nc_n
+ \lambda c_n = 0 \]
\[ \implies c_{n + 2} = \frac{n(n + 1) -
\lambda}{(n + 1)(n + 2)} c_n \tag{2.22} \]
so specifying $c_0, c_1$ gives 2 independent
solutions (near $x = 0$).
\[ y_{\text{even}} = c_0 \left[ 1 +
\frac{(-\lambda)}{2!} x^2 + \frac{(6 -
\lambda)(-\lambda)}{4!} x^4 + \cdots \right] \]
\[ y_{\text{odd}} = c_1 \left[ x +
\frac{(2-\lambda)}{3!} x^3 + \cdots \right] \]
But as $n \to \infty$, $\frac{c_{n + 1}{c_n}} \to
1$ so there is a radius of convergence $|x| < 1$
(geometric series), i.e. divergent at $x = \pm 1$.
What can be done? \emph{Finiteness}\dots
