From b31c40a22e885205373ff1a3284935d544c99889 Mon Sep 17 00:00:00 2001
From: canuel <cattaneo.manuel@hotmail.com>
Date: Tue, 16 Aug 2022 14:32:49 +0200
Subject: started the chapter about spherical harmonics (more specific about
 the derivation of them)

---
 buch/papers/kugel/spherical-harmonics.tex | 387 +++++++++++++++++++++++++++++-
 1 file changed, 386 insertions(+), 1 deletion(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 6b23ce5..c76e757 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -1,9 +1,394 @@
 % vim:ts=2 sw=2 et spell:
 
 \section{Spherical Harmonics}
+We finally arrived at the main section, which gives our chapter its name. The idea is to discuss spherical harmonics, their mathematical derivation and some of their properties and applications.\newline
+The subsection \ref{} will be devoted to the Eigenvalue problem of the Laplace operator. Through the latter, we will derive the set of Eigenfunctions that obey the equation presented in \ref{}[TODO: reference to eigenvalue equation], which will be defined as \emph{Spherical Harmonics}. In fact, this subsection will present their mathematical derivation.\newline
+In the subsection \ref{}, on the other hand, some interesting properties related to them will be discussed. Some of these will come back to help us understand in more detail why they are useful in various real-world applications, which will be presented in the section \ref{}.\newline
+One specific property will be studied in more detail in the subsection \ref{}, namely the recursive property.
+The last subsection is devoted to one of the most beautiful applications (In our humble opinion), namely the derivation of a Fourier-style series expansion but defined on the sphere instead of a plane.\newline 
+More importantly, this subsection will allow us to connect all the dots we have created with the previous sections, concluding that Fourier is just a specific case of the application of the concept of orthogonality.\newline
+Our hope is that after reading this section you will appreciate the beauty and power of generalization that mathematics offers us.
 
-\subsection{Eigenvalue Problem in Spherical Coordinates}
+\subsection{Eigenvalue Problem on the Spherical surface}
+\subsubsection{Unormalized Spherical Harmonics}
+From the chapter \ref{}, we know that the spherical Laplacian is defined as. \begin{equation*}
+    \nabla^2_S := \frac{1}{r^2} \frac{\partial}{\partial r} \left( r^2 \frac{\partial}{\partial r} \right) + \frac{1}{r^2} 
+    \left[
+        \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( \sin\vartheta \frac{\partial}{\partial\vartheta} \right)
+                + \frac{1}{\sin^2 \vartheta} \frac{\partial^2}{\partial\varphi^2}
+    \right] 
+\end{equation*}
+But we do not want to consider this algebraic monster entirely, since this includes the whole set $\mathbb{R}^3$; rather, we want to focus only on the spherical surface (as the title suggests). We can then further concretise our calculations by selecting any number for the variable $r$, so that we have a sphere and, more importantly, a spherical surface on which we can ``play''.\newline
+Surely you have already heard of the unit circle, a geometric entity used extensively in many mathematical contexts. The most famous and basic among them is surely trigonometry.\newline
+Extending this concept into three dimensions, we will talk about the unit sphere. This is a very famous sphere, as is the unit circle. So since we need a sphere why not use the most famous one? Thus imposing $r=1$.\newline
+Now, since the variable $r$ became a constant, we can leave out all derivatives with respect to $r$, setting them to zero. Then substituting the value of $r$ for 1, we will obtain the operator we will refer to as \emph{Spherical Surface Operator}:
+\begin{equation*}
+    \nabla^2_{\partial S} := \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( \sin\vartheta \frac{\partial}{\partial\vartheta} \right)
+                + \frac{1}{\sin^2 \vartheta} \frac{\partial^2}{\partial\varphi^2}.
+\end{equation*}
+As can be seen, for this definition, the subscript ``$\partial S$'' was used to emphasize the fact that we are on the spherical surface, which can be understood as a boundary of the sphere.\newline
+Now that we have defined an operator, we can go on to calculate its eigenfunctions. As mentioned earlier, we can translate this problem at first abstract into a much more concrete problem, which has to do with the field of \emph{Partial Differential Equaitons} (PDEs). The functions we want to find are simply functions that respect the following expression:
+\begin{equation}\label{kugel:eq:sph_srfc_laplace}
+    \nabla^2_{\partial S} f = \lambda f 
+\end{equation}
+Which is traditionally written as follows:
+\begin{equation*}
+    \nabla^2_{\partial S} f = -\lambda f 
+\end{equation*}
+Perhaps the fact that we are dealing with a PDE may not be obvious at first glance, but if we extend the operator $\nabla^2_{\partial S}$ according to Eq.(\ref{kugel:eq:sph_srfc_laplace}), we will get:
+\begin{equation}\label{kugel:eq:PDE_sph}
+    \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( \sin\vartheta \frac{\partial f}{\partial\vartheta} \right)
+                + \frac{1}{\sin^2 \vartheta} \frac{\partial^2 f}{\partial\varphi^2} + \lambda f = 0, 
+\end{equation}
+making it emerge.\newline
+All functions satisfying Eq.(\ref{kugel:eq:PDE_sph}), are called eigenfunctions. Our new goal is therefore to solve this PDE. The task seems very difficult but we can simplify it with a well-known technique, namely the \emph{separation Ansatz}. The latter consists in assuming that the function $f(\vartheta, \varphi)$ we are looking for can be factorized in the following form 
+\begin{equation}\label{kugel:eq:sep_ansatz_0}
+    f(\vartheta, \varphi) = \Theta(\vartheta)\Phi(\varphi). 
+\end{equation}
+In short, we are saying that the effect of the two independent variables can be described using the multiplication of two functions that describe their effect separately. If we include this assumption in Eq.(\ref{kugel:eq:PDE_sph}), we have:
+\begin{equation}
+    \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( \sin\vartheta \frac{\partial  \Theta(\vartheta)}{\partial\vartheta} \right)\Phi(\varphi)
+                + \frac{1}{\sin^2 \vartheta} \frac{\partial^2  \Phi(\varphi)}{\partial\varphi^2} \Theta(\vartheta) + \lambda  \Theta(\vartheta)\Phi(\varphi) = 0.  \label{kugel:eq:sep_ansatz_1}
+\end{equation}
+Dividing Eq.(\ref{kugel:eq:sep_ansatz_1}) by $\Theta(\vartheta)\Phi(\varphi)$ and inserting an auxiliary variable $m$, which we will call the separating constant, we will have:
+\begin{equation*}
+\frac{1}{\Theta(\vartheta)}\sin \vartheta \frac{d}{d \vartheta} \left( \sin \vartheta \frac{d \Theta}{d \vartheta} \right) + \lambda \sin^2 \vartheta = -\frac{1}{\Phi(\varphi)} \frac{d^2\Phi(\varphi)}{d\varphi^2} = m,
+\end{equation*}
+which is equivalent to the following system of two \emph{Ordinary Differential Equations} (ODEs)
+\begin{align}
+    \frac{d^2\Phi(\varphi)}{d\varphi^2} &= -m \Phi(\varphi) \label{kugel:eq:ODE_1} \\ 
+    \sin \vartheta \frac{d}{d \vartheta} \left( \sin \vartheta \frac{d \Theta}{d \vartheta} \right) + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)\Theta(\vartheta) &= 0 \label{kugel:eq:ODE_2} 
+\end{align}
+The solution of Eq.(\ref{kugel:eq:ODE_1}) is quite trivial. The complex exponential is obviously the function we are looking for, so we can write
+\begin{equation*}
+    \Phi_m(\varphi) = e^{j m \varphi}, \quad m \in \mathbb{Z}.
+\end{equation*}
+The restriction for the separation constant $m$ arises from the fact that we require the following periodic constraint $\Phi_m(\varphi + 2\pi) = \Phi_m(\varphi)$.\newline
+As for Eq.(\ref{kugel:eq:ODE_2}), the resolution will not be so straightforward. We can begin by considering the substitution $x = \cos \vartheta$. The operator $\frac{d}{d \vartheta}$ will be:
+\begin{align*}
+    \frac{d}{d \vartheta} = \frac{dx}{d \vartheta}\frac{d}{dx} &= -\sin \vartheta \frac{d}{dx} \\
+    &= -\sqrt{1-x^2} \frac{d}{dx}.
+\end{align*} 
+Eq.(\ref{kugel:eq:ODE_2}) will then become.
+\begin{align*}
+   \frac{-\sqrt{1-x^2}}{\sqrt{1-x^2}} \frac{d}{dx} \left( \left(\sqrt{1-x^2}\right) \left(-\sqrt{1-x^2}\right) \frac{d \Theta}{dx} \right) + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)\Theta(\vartheta) &= 0 \\
+   \frac{d}{dx} \left( (1-x^2) \frac{d \Theta}{dx} \right) + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)\Theta(\vartheta) &= 0 \\
+   (1-x^2)\frac{d^2 \Theta}{dx} - 2x\frac{d \Theta}{dx} + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)\Theta(\vartheta) &= 0 \\
+   (1-x^2)\frac{d^2 \Theta}{dx} - 2x\frac{d \Theta}{dx} + \left( \lambda - \frac{m}{1-x^2} \right)\Theta(\vartheta) &= 0 
+\end{align*}
+By making two final cosmetic substitutions, namely $\Theta(\vartheta)=\Theta(\cos^{-1}x):=y(x)$ and $\lambda=n(n+1)$, we will be able to define the \emph{Associated Legendre Equation} in its standard and most familiar form
+\begin{definition}{Associated Legendre Equation}
+    \begin{equation}\label{kugel:eq:associated_leg_eq}
+        (1-x^2)\frac{d^2 y}{dx} - 2x\frac{d y}{dx} + \left( n(n+1) - \frac{m}{1-x^2} \right)y(x) = 0. 
+    \end{equation}
+\end{definition}
+Our new goal then became solving Eq.(\ref{kugel:eq:asssociated_leg_eq}). After that we can fit the solution into Eq.(\ref{kugel:eq:sep_ansatz_0}), obtaining $f(\vartheta, \varphi)$, the solution of the eigenvalue problem. \newline
+We simplified the problem somewhat but the task still remains very difficult. We can rely on a lemma to continue but first we need to define an additional equation, namely the \emph{Legendre Equation}
+\begin{definition}{Legendre equation}\newline
+    Setting $m=0$ in Eq.(\ref{kugel:eq:asssociated_leg_eq}), we get
+    \begin{equation}\label{kugel:eq:leg_eq}
+        (1-x^2)\frac{d^2 y}{dx} - 2x\frac{d y}{dx} + n(n+1)y(x) = 0,
+    \end{equation}
+    also known as \emph{Legendre Equation}.
+\end{definition}
+Now we can continue with the lemma
+\begin{lemma}\label{kugel:lemma_1}
+    If $y_n(x)$ is a solution of Eq.(\ref{kugel:eq:leg_eq}), then the function
+    \begin{equation*}
+        y_{m,n}(x) = (1-x^2)^{\frac{m}{2}}\frac{d^m}{dx^m}y_n(x)
+    \end{equation*}
+    satisfies Eq.(\ref{kugel:eq:associated_leg_eq})
+\end{lemma}
+\begin{proof} [TODO: modificare la $m$ (è già usata come costante di separazione) o forse è giusta (?)]
+    To begin, we can start by differentiating $m$ times Eq.\eqref{kugel:eq:leg_eq} (which is staisfied by $y(x)$), obtaining
+    \begin{equation}\label{eq:lagrange_mderiv}
+    \frac{d^m}{dx^m}\left[ (1-x^2)\frac{d^2y}{dx^2} \right] -2 \frac{d^m}{dx^m}\left[ x\frac{dy}{dx} \right] + n(n+1)\frac{d^m}{dx^m}y=0.
+    \end{equation}
+    \emph{Leibniz's theorem} says, that if we want to differentiate $m$ times a multiplication of two functions, we can use the binomial coefficients to build up a sum. This allows us to be more compact, obtaining 
+    \begin{equation}\label{eq:leibniz}
+    \frac{d^m}{dx^m}[u(x)v(x)] = \sum_{i=0}^m \binom{n}{i} \frac{d^{m-i}u}{dx^{m-1}} \frac{d^{i}v}{dx^i}.
+    \end{equation}
+    Using Eq.\eqref{eq:leibniz} in Eq.\eqref{eq:lagrange_mderiv}, we have
+    \begin{align}
+    (1-x^2)\frac{d^{m+2}y}{dx^{m+2}} &+ m \frac{d}{dx}(1-x^2)\frac{d^{m+1}y}{dx^{m+1}} + \frac{m(m-1)}{2}\frac{d^{2}}{dx^{2}}(1-x^2)\frac{d^{m}y}{dx^{m}} + n(n+1)\frac{d^m{}y}{dx^{m}} \nonumber \\
+    &-2\left(x\frac{d^{m+1}y}{dx^{m+1}} + m\frac{d}{dx}x\frac{d^{m}y}{dx^{m}} \right) \nonumber \\
+    &= (1-x^2)\frac{d^{m+2}y}{dx^{m+2}} -2x(m+1)\frac{d^{m+1}y}{dx^{m+1}}+(n(n+1)-m(m-1)-2m)\frac{d^{m}y}{dx^{m}}=0. \label{eq:aux_3}
+    \end{align}
+    To make the notation easier to follow, a new function can be defined
+    \begin{equation*}
+    \frac{d^{m}y}{dx^{m}} := y_m.
+    \end{equation*}
+    Eq.\eqref{eq:aux_3} now becomes
+    \begin{equation}\label{eq:1st_subs}
+    (1-x^2)\frac{d^{2}y_m}{dx^{2}} -2x(m+1)\frac{dy_m}{dx}+(n(n+1)-m(m+1))y_m=0
+    \end{equation}
+    A second function can be further defined as
+    \begin{equation*}
+    (1-x^2)^{\frac{m}{2}}\frac{d^{m}y}{dx^{m}} = (1-x^2)^{\frac{m}{2}}y_m := \hat{y}_m,
+    \end{equation*}
+    allowing to write Eq.\eqref{eq:1st_subs} as
+    \begin{equation}\label{eq:2st_subs}
+    (1-x^2)\frac{d^2}{dx^2}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] -2(m+1)x\frac{d}{dx}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] + (n(n+1)-m(m+1))\hat{y}_m(1-x^2)^{-\frac{m}{2}}=0.
+    \end{equation}
+    The goal now is to compute the two terms 
+    \begin{align*}
+    \frac{d^2}{dx^2}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] &=  \frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} + \frac{d\hat{y}_m}{dx}\frac{m}{2}(1-x^2)^{-\frac{m}{2}-1}2x \\
+    &+ m\left( \frac{d\hat{y}_m}{dx} x (1-x^2)^{-\frac{m}{2}-1} + \hat{y}_m (1-x^2)^{-\frac{m}{2}-1} - \hat{y}_m x (-\frac{m}{2}-1)(1-x^2)^{-\frac{m}{2}} 2x\right) \\
+    &= \frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} + \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-\frac{m}{2}-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-\frac{m}{2}-1}\\
+    &+ m\hat{y}_m  (1-x^2)^{-\frac{m}{2}-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-\frac{m}{2}-2}
+    \end{align*}
+    and
+    \begin{align*}
+    \frac{d}{dx}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] &= \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_m\frac{m}{2}(1-x^2)^{-\frac{m}{2}-1}2x \\
+    &= \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_mm(1-x^2)^{-\frac{m}{2}-1}x,
+    \end{align*}
+    to use them in Eq.\eqref{eq:2st_subs}, obtaining
+    \begin{align*}
+    (1-x^2)\biggl[\frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} &+ \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-\frac{m}{2}-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-\frac{m}{2}-1} \\ 
+    &+ m\hat{y}_m  (1-x^2)^{-\frac{m}{2}-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-\frac{m}{2}-2}\biggr] \\
+    &-2(m+1)x\left[  \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_mm(1-x^2)^{-\frac{m}{2}-1}x \right] \\
+    &+ (n(n+1)-m(m+1))\hat{y}_m(1-x^2)^{-\frac{m}{2}}=0.\\
+    \end{align*}
+    We can now divide by $(1-x^2)^{-\frac{m}{2}}$, obtaining
+    \begin{align*}
+    (1-x^2)\biggl[\frac{d^2\hat{y}_m}{dx^2} &+ \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-1} + m\hat{y}_m  (1-x^2)^{-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-2}\biggr] \\
+    &-2(m+1)x\left[  \frac{d\hat{y}_m}{dx} + \hat{y}_mm(1-x^2)^{-1}x \right] + (n(n+1)-m(m+1))\hat{y}_m\\
+    &= \frac{d^2\hat{y}_m}{dx^2} + \frac{d\hat{y}_m}{dx}mx + m\frac{d\hat{y}_m}{dx}x + m\hat{y}_m + m\hat{y}_m x^2(m+2)(1-x^2)^{-1} \\
+    &-2(m+1)x\left[  \frac{d\hat{y}_m}{dx} + \hat{y}_mm(1-x^2)^{-1}x \right] + (n(n+1)-m(m+1))\hat{y}_m\\
+    \end{align*}
+    and collecting some terms
+    \begin{equation*}
+    (1-x^2)\frac{d^2\hat{y}_m}{dx^2} - 2x\frac{d\hat{y}_m}{dx} + \left( -x^2 \frac{m^2}{1-x^2} + m+n(n+1)-m(m+1)\right)\hat{y}_m=0.
+    \end{equation*}
+    Showing that 
+    \begin{align*}
+    -x^2 \frac{m^2}{1-x^2} + m+n(n+1)-m(m+1) &= n(n+1)- m^2 -x^2 \frac{m^2}{1-x^2} \\
+    &= n(n+1)- \frac{m}{1-x^2}
+    \end{align*}
+    implies $\hat{y}_m(x)$ being a solution of Eq.\eqref{kugel:eq:associated_leg_eq}
+\end{proof}
+In simpler words, if we find a solution to Eq.\eqref{kugel:eq:leg_eq}, we can extend the latter according to the Lemma \ref{kugel:lemma_1} obtaining the solution of Eq.\eqref{kugel:eq:associated_leg_eq}.\newline
+We can say that we are going in the right direction, as the problem to be solved is decreasing in difficulty. We moved from having to find a solution to Eq.\eqref{kugel:eq:associated_leg_eq} to finding a solution to Eq.\eqref{kugel:eq:leg_eq}, which is much more approachable as a problem. Luckily for us, the lemma we will present below will help us extensively, which is something of an euphemism, since it will give us the solution directly.
+\begin{lemma}
+    The polynomial function
+    \begin{align*}
+        y_n(x)&=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{(2n-2k)!}{2^n k! (n-k)!(n-2k)!} x^{n-2k}\\
+        &= \frac{1}{n!2^n}\frac{d^n}{dx^n}(1-x^2)^n =: P_n(x),
+    \end{align*}
+    is a solution to the second order differential equation
+    \begin{equation}\label{kugel:eq:sol_leg}
+        (1-x^2)\frac{d^2y}{dx^2}-2x\frac{dy}{dx} + n(n+1)y=0, \quad \forall n>0.
+    \end{equation}
+\end{lemma}
+\begin{proof}
+    In order to find a solution to Eq.\eqref{eq:legendre}, the following Ansatz can be performed:
+    \begin{equation}\label{eq:ansatz}
+    y(x) = \sum_{k=0}^\infty a_k x^k.
+    \end{equation}
+    Given Eq.\eqref{eq:ansatz}, then
+    \begin{align*}
+    \frac{dy}{dx} &= \sum_{k=0}^\infty k a_k x^{k-1}, \\
+    \frac{d^2y}{dx^2} &= \sum_{k=0}^\infty k (k-1) a_k x^{k-2}.
+    \end{align*}
+    Eq.\eqref{eq:legendre} can be therefore written as
+    \begin{align}
+    &(1-x^2)\sum_{k=0}^\infty k (k-1) a_k x^{k-2} - 2x\sum_{k=0}^\infty k a_k x^{k-1} + n(n+1)\sum_{k=0}^\infty a_k x^k=0 \label{eq:ansatz_in_legendre} \\
+    &=\sum_{k=0}^\infty k (k-1) a_k x^{k-2} - \sum_{k=0}^\infty k (k-1) a_k x^{k} - 2x\sum_{k=0}^\infty k a_k x^{k-1} + n(n+1)\sum_{k=0}^\infty a_k x^k=0. \nonumber
+    \end{align}
+    If one consider the term
+    \begin{equation}\label{eq:term}
+    \sum_{k=0}^\infty k (k-1) a_k x^{k-2},
+    \end{equation}
+    the substitution $\tilde{k}=k-2$ yields Eq.\eqref{eq:term} to
+    \begin{equation*}
+    \sum_{\tilde{k}=-2}^\infty (\tilde{k}+2) (\tilde{k}+1) a_{\tilde{k}+2} x^{\tilde{k}}=\sum_{\tilde{k}=0}^\infty (\tilde{k}+2) (\tilde{k}+1) a_{\tilde{k}} x^{\tilde{k}}.
+    \end{equation*}
+    This means that Eq.\eqref{eq:ansatz_in_legendre} becomes
+    \begin{align}
+    &\sum_{k=0}^\infty (k+1)(k+2) a_{k+2} x^{k} - \sum_{k=0}^\infty k (k-1) a_k x^{k} - 2\sum_{k=0}^\infty k a_k x^k + n(n+1)\sum_{k=0}^\infty a_k x^k \nonumber \\
+    = &\sum_{k=0}^\infty \big[ (k+1)(k+2) a_{k+2} - k (k-1) a_k - 2 k a_k + n(n+1) a_k \big] x^k \stackrel{!}{=} 0. \label{eq:condition}
+    \end{align}
+    The condition in Eq.\eqref{eq:condition} is equivalent to 
+    \begin{equation}\label{eq:condition_2}
+    (k+1)(k+2) a_{k+2} - k (k-1) a_k - 2 k a_k + n(n+1) a_k = 0.
+    \end{equation}
+    We can derive a recursion formula for $a_{k+2}$ from Eq.\eqref{eq:condition_2}, which can be expressed as
+    \begin{equation}\label{eq:recursion}
+    a_{k+2}= \frac{k (k-1) - 2 k + n(n+1)}{(k+1)(k+2)}a_k = \frac{(k-n)(k+n+1)}{(k+2)(k+1)}a_k.
+    \end{equation}
+    All coefficients can be calculated using the latter. 
+    
+    Following Eq.\eqref{eq:recursion}, if we want to compute $a_6$ we would have
+    \begin{align*}
+    a_{6}= -\frac{(n-4)(n+5)}{6\cdot 5}a_4 &= -\frac{(n-4)(5+n)}{6 \cdot 5} -\frac{(n-2)(n+3)}{4 \cdot 3}  a_2 \\
+    &= -\frac{(n-4)(n+5)}{6 \cdot 5} -\frac{(n-2)(n+3)}{4 \cdot 3} -\frac{n(n+1)}{2 \cdot 1}  a_0 \\
+    &= -\frac{(n+5)(n+3)(n+1)n(n-2)(n-4)}{6!} a_0.
+    \end{align*}
+    One can generalize this relation for the $i^\text{th}$ even coefficient as
+    \begin{equation*}
+    a_{2k} = (-1)^k \frac{(n+(2k-1))(n+(2k-1)-2)\hdots (n-(2k-2)+2)(n-(2k-2))}{(2k)!}a_0
+    \end{equation*}
+    where $i=2k$.
+    
+    A similar expression can be written for the odd coefficients $a_{2k-1}$. In this case, the equation starts from $a_1$ and to find the pattern we can write the recursion for an odd coefficient, $a_7$ for example
+    \begin{align*}
+    a_{7}= -\frac{(n-5)(n+6)}{7\cdot 6}a_5 &= - \frac{(n-5)(n+6)}{7\cdot 6} -\frac{(n-3)(n+4)}{5 \cdot 4}  a_3 \\
+    &= - \frac{(n-5)(n+6)}{7\cdot 6} -\frac{(n-3)(n+4)}{5 \cdot 4}  -\frac{(n-1)(n+2)}{3 \cdot 2}  a_1 \\
+    &= -\frac{(n+6)(n+4)(n+2)(n-1)(n-3)(n-5)}{7!} a_1.
+    \end{align*}
+    As before, we can generalize this equation for the $i^\text{th}$ odd coefficient
+    \begin{equation*}
+    a_{2k+1} = (-1)^k \frac{(n + 2k)(n+2k-2)\hdots(n-(2k-1)+2)(n-(2k-1))}{(2k+1)!}a_1
+    \end{equation*}
+    where $i=2k+1$.
+    
+    Let be 
+    \begin{align*}
+    y_\text{e}^K(x) &:= \sum_{k=0}^K(-1)^k \frac{(n+(2k-1))(n+(2k-1)-2)\hdots \color{red}(n-(2k-2)+2)(n-(2k-2))}{(2k)!} x^{2k}, \\
+    y_\text{o}^K(x) &:= \sum_{k=0}^K(-1)^k \frac{(n + 2k)(n+2k-2)\hdots \color{blue} (n-(2k-1)+2)(n-(2k-1))}{(2k+1)!} x^{2k+1}.
+    \end{align*}
+    The solution to the Eq.\eqref{eq:legendre} can be written as
+    \begin{equation}\label{eq:solution}
+    y(x) = \lim_{K \to \infty} \left[ a_0 y_\text{e}^K(x) + a_1 y_\text{o}^K(x) \right].
+    \end{equation}
+    
+    The colored parts can be analyzed separately:
+    \begin{itemize}
+      \item[\textcolor{red}{\textbullet}] Suppose that $n=n_0$ is an even number. Then the red part, for a specific value of $k=k_0$, will follow the following relation:
+    \begin{equation*}
+    n_0-(2k_0-2)=0. 
+    \end{equation*}
+    From that point on, given the recursive nature of Eq.\eqref{eq:recursion}, all the subsequent coefficients will also be 0, making the sum finite.
+    \begin{equation*}
+    a_{2k}=0 \iff y_{\text{o}}^{2k}(x)=y_{\text{o}}^{2k_0}(x), \quad \forall k>k_0
+    \end{equation*} 
+      \item[\textcolor{blue}{\textbullet}] Suppose that $n=n_0$ is an odd number. Then the blue part, for a specific value of $k=k_0$, will follow the following relation 
+    \begin{equation*}
+    n_0-(2k_0-1)=0.  
+    \end{equation*}
+    From that point on, for the same reason as before, all the subsequent coefficients will also be 0, making the sum finite.
+    \begin{equation*}
+    a_{2k+1}=0 \iff y_{\text{o}}^{2k+1}(x)=y_{\text{o}}^{2k_0+1}(x), \quad \forall k>k_0
+    \end{equation*}
+    \end{itemize} 
+    
+    There is the possibility of expressing the solution in Eq.\eqref{eq:solution} in a more compact form, combining the two solutions $y_\text{o}^K(x)$ and $y_\text{e}^K(x)$. They are both a polynomial of maximum degree $n$, assuming $n \in \mathbb{N}$. In the case where $n$ is even, the polynomial solution
+    \begin{equation*}
+    \lim_{K\to \infty} y_\text{e}^K(x)
+    \end{equation*}
+    will be a finite sum. If instead $n$ is odd, will be 
+    \begin{equation*}
+    \lim_{K\to \infty} y_\text{o}^K(x)
+    \end{equation*}
+    to be a finite sum. 
+    
+    Depending on the coefficient we start with, $a_1$ or $a_0$, we will obtain the odd or even polynomial respectively. Starting with the last coefficient $a_n$ and, recursively, calculating all the others in descending order, we can express the two parts $y_\text{o}^K(x)$ and $y_\text{e}^K(x)$ with a single sum. Hence, because we start with the last coefficient, the choice concerning $a_1$ and $a_0$ will be at the end of the sum, and not at the beginning. To compact Eq.\eqref{eq:solution}, Eq.\eqref{eq:recursion} can be reconsidered to calculate the coefficient $a_{k-2}$, using $a_k$
+    \begin{equation*}
+    a_{k-2} = -\frac{(k+2)(k+1)}{(k-n)(k+n+1)}a_k
+    \end{equation*}
+    Now the game is to find a pattern, as before. Remember that $n$ is a fixed parameter of Eq.\eqref{eq:legendre}.  
+    \begin{align*}
+    a_{n-2} &= -\frac{n(n-1)}{2(2n-1)}a_n, \\
+    a_{n-4} &= -\frac{(n-2)(n-3)}{4(2n-3)}a_{n-2} \\
+    &= -\frac{(n-2)(n-3)}{4(2n-3)}-\frac{n(n-1)}{2(2n-1)}a_n.
+    \end{align*}
+    In general 
+    \begin{equation}\label{eq:general_recursion}
+    a_{n-2k} = (-1)^k \frac{n(n-1)(n-2)(n-3) \hdots (n-2k+1)}{2\cdot4\hdots 2k(2n-1)(2n-3)\hdots(2n-2k+1)}a_n
+    \end{equation}
+    The whole solution can now be written as
+    \begin{align}
+    y(x) &= a_n x^n + a_{n-2} x^{n-2} + a_{n-4} x^{n-4} + a_{n-6} x^{n-6} + \hdots + \begin{cases} 
+    a_1 x, \quad &\text{if } n \text{ odd} \\ 
+    a_0, \quad  &\text{if } n \text{ even} 
+    \end{cases} \nonumber \\
+    &= \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} a_{n-2k}x^{n-2k} \label{eq:solution_2}
+    \end{align}
+    By considering
+    \begin{align}
+    (2n-1)(2n-3)\hdots (2n-2k+1)&=\frac{2n(2n-1)(2n-2)(2n-3)\hdots(2n-2k+1)}
+    {2n(2n-2)(2n-4)(2n-6)\hdots(2n-2k+2)} \nonumber \\ 
+    &=\frac{\frac{(2n)!}{(2n-2k)!}}
+    {2^kn(n-1)(n-2)(n-3)\hdots(n-k+1)} \nonumber \\
+    &=\frac{\frac{(2n)!}{(2n-2k)!}}
+    {2^k\frac{n!}{(n-k)!}}=\frac{(n-k)!(2n)!}{n!(2n-2k)!2^k} \label{eq:1_sub_recursion}, \\
+    2 \cdot 4  \hdots 2k &= 2^r 1\cdot2 \hdots r = 2^r r!\label{eq:2_sub_recursion}, \\
+    n(n-1)(n-2)(n-3) \hdots (n-2k+1) &= \frac{n!}{(n-2k)!}\label{eq:3_sub_recursion}.
+    \end{align}
+    Eq.\eqref{eq:solution_2} can be rewritten as
+    \begin{equation}\label{eq:solution_3}
+    y(x)=a_n \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{n!^2(2n-2k)!}{k!(n-2k)!(n-k)!(2n)!}  x^{n-2k}.
+    \end{equation}
+    Eq.\eqref{eq:solution_3} is defined for any $a_n$. By letting $a_n$ be declared as
+    \begin{equation*}
+    a_{n} := \frac{(2n)!}{2^n n!^2},
+    \end{equation*}
+    the so called \emph{Legendre polynomial} emerges
+    \begin{equation}\label{eq:leg_poly}
+    P_n(x):=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{(2n-2k)!}{2^n k! (n-k)!(n-2k)!} x^{n-2k} 
+    \end{equation}
+\end{proof}
+As can be seen, the solution is a $n$-dependent power series, traditionally denoted as $P_n(x)$. This set of polynomials are called \emph{Legendre Polynomials}, because precisely they are polynomials satisfying the Legendre equation.\newline
+Now that we have a solution to Eq.\eqref{kugel:eq:leg_eq}, we can then extend Eq.\eqref{kugel:eq:sol_leg}, as stated in Lemma \ref{kugel:lemma_1}. We will then have
+\begin{align*}
+y_{m,n}(x) &= (1-x^2)^{\frac{m}{2}}\frac{d^m}{dx^m}P_n(x) \\
+&= \frac{1}{n!2^n}(1-x^2)^{\frac{m}{2}}\frac{d^{m+n}}{dx^{m+n}}(1-x^2)^n 
+\end{align*}
+This set of functions are defined as \emph{Associated Legendre functions}, because similarly to before, they solve the Associated Legendre equation, defined in Eq.\eqref{kugel:eq:eq_leg}.
+\begin{definition}{Associated Legendre Functions}
+\begin{equation}\label{kugel:eq:associated_leg_func}
+P_{m,n}(x) := \frac{1}{n!2^n}(1-x^2)^{\frac{m}{2}}\frac{d^{m+n}}{dx^{m+n}}(1-x^2)^n 
+\end{equation}
+\end{definition}
+As you may recall, previously we performed the substitution $x=\cos \vartheta$. Now we need to return to the old domain, which can be done straightforwardly:
+\begin{equation*}
+    \Theta(\vartheta) = P_{m,n}(\cos \vartheta),
+\end{equation*}
+obtaining the much sought function $\Theta(\vartheta)$. \newline
+So we finally reached the end of this tortuous path. Now we just need to put together all the information we have to construct $f(\vartheta, \varphi)$ in the following way:
+\begin{equation}\label{kugel:eq:sph_harm_0}
+    f(\vartheta, \varphi) = \Theta(\vartheta)\Phi(\varphi) = P_{m,n}(\cos \vartheta)e^{jm\varphi}, \quad |m|\leq n.
+\end{equation}
+The constraint $|m|<n$, can be justified by considering Eq.\eqref{kugel:eq:associated_leg_func}, in which the derivative of degree $m+n$ is present. A derivative to be well defined must have an order that is greater than zero. Furthermore, it can be seen that this derivative is applied on a polynomial of degree $2n$. As is known from Calculus 1, if you derive a polynomial of degree $2n$ more than $2n$ times, you get zero, which is a trivial solution in which we are not interested.\newline
+We can thus summarize these two conditions by writing:
+\begin{equation*}
+    \begin{rcases}
+        m+n \leq 2n &\implies m \leq n \\
+        m+n \geq 0  &\implies  m \geq -n
+    \end{rcases} |m| \leq n.
+\end{equation*}
+The set of functions in Eq.\eqref{kugel:eq:sph_harm_0} is named \emph{Spherical Harmonics}, which are the eigenfunctions of the Laplace operator on the \emph{spherical surface domain}, which is exactly what we were looking for at the beginning of this section.
+\begin{definition}{Spherical Harmonics}
+    \begin{equation}\label{kugel:eq:sph_harm_1}
+    \tilde{Y}_{m,n}(\vartheta, \varphi) := P_{m,n}(\cos \vartheta)e^{jm\varphi}, \quad |m|\leq n.
+    \end{equation}
+\end{definition}
 
+\subsection{Normalization}
+As explained in the chapter \ref{}, the concept of orthogonality is very important and at the practical level it is very useful, because it allows us to develop very powerful techniques at the mathematical level.\newline 
+Throughout this book we have been confronted with the Sturm-Liouville theory (see chapter \ref{}). The latter, among other things, carries with it the concept of orthogonality. Indeed, if we consider the solutions of the Sturm-Liouville equation, which can be expressed in this form
+\begin{equation}\label{kugel:eq:sturm_liouville}
+    \mathcal{S}f := \frac{d}{dx}\left[p(x)\frac{df}{dx}\right]+q(x)f(x)
+\end{equation}
+possiamo dire che formano una base ortogonale.\newline
+Adesso possiamo dare un occhiata alle due equazioni che abbiamo ottenuto tramite la Separation Ansatz (Eqs.\eqref{kugel:eq:associated_leg_eq}\eqref{kugel:eq:ODE_1}), le quali possono essere riscritte come:
+\begin{align*}
+    \frac{d}{dx} \left[ (1-x^2) \cdot \frac{dP_{m,n}}{dx} \right] &+ \left(n(n+1)-\frac{m}{1-x^2} \right) \cdot P_{m,n}(x) = 0, \\
+    \frac{d}{d\varphi} \left[ 1 \cdot \frac{ d\Phi }{d\varphi} \right] &+ 1 \cdot \Phi(\varphi) = 0. 
+\end{align*}
+Si può concludere in modo diretto che sono due casi dell'equazione di Sturm-Liouville. Questo significa che le loro soluzioni sono ortogonali sotto l'inner product con weight function $w(x)=1$, dunque:
+\begin{align}
+\int_{0}^{2\pi} \Phi_m(\varphi)\Phi_m'(\varphi) d\varphi &= \delta_{m'm}, \nonumber \\
+\int_{-1}^1 P_{m,m'}(x)P_{n,n'}(x) dx &= \delta_{m'm}\delta_{n'n}. \label{kugel:eq:orthogonality_associated_func}
+\end{align}
+Inoltre, possiamo provare l'ortogonalità di $\Theta(\vartheta)$ utilizzando \eqref{kugel:eq:orthogonality_associated_func}:
+\begin{align}
+    x
+\end{align}
+Ora, visto che la soluzione dell'eigenfunction problem è formata dalla moltiplicazione di $\Phi_m(\varphi)$ e $P_{m,n}(x)$
+\begin{lemma}
+
+\end{lemma}
 \subsection{Properties}
 
 \subsection{Recurrence Relations}
-- 
cgit v1.2.1


From c4cf68ac67f7fbadaacae64597ae713a6879f944 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Tue, 16 Aug 2022 23:39:59 +0200
Subject: kugel: Comment out preliminaries, review manu's work until legendre

---
 buch/papers/kugel/spherical-harmonics.tex | 229 +++++++++++++++++++++++-------
 1 file changed, 174 insertions(+), 55 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index c76e757..70657c9 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -1,70 +1,189 @@
-% vim:ts=2 sw=2 et spell:
+% vim:ts=2 sw=2 et spell tw=80:
 
 \section{Spherical Harmonics}
-We finally arrived at the main section, which gives our chapter its name. The idea is to discuss spherical harmonics, their mathematical derivation and some of their properties and applications.\newline
-The subsection \ref{} will be devoted to the Eigenvalue problem of the Laplace operator. Through the latter, we will derive the set of Eigenfunctions that obey the equation presented in \ref{}[TODO: reference to eigenvalue equation], which will be defined as \emph{Spherical Harmonics}. In fact, this subsection will present their mathematical derivation.\newline
-In the subsection \ref{}, on the other hand, some interesting properties related to them will be discussed. Some of these will come back to help us understand in more detail why they are useful in various real-world applications, which will be presented in the section \ref{}.\newline
-One specific property will be studied in more detail in the subsection \ref{}, namely the recursive property.
-The last subsection is devoted to one of the most beautiful applications (In our humble opinion), namely the derivation of a Fourier-style series expansion but defined on the sphere instead of a plane.\newline 
-More importantly, this subsection will allow us to connect all the dots we have created with the previous sections, concluding that Fourier is just a specific case of the application of the concept of orthogonality.\newline
-Our hope is that after reading this section you will appreciate the beauty and power of generalization that mathematics offers us.
 
-\subsection{Eigenvalue Problem on the Spherical surface}
-\subsubsection{Unormalized Spherical Harmonics}
-From the chapter \ref{}, we know that the spherical Laplacian is defined as. \begin{equation*}
-    \nabla^2_S := \frac{1}{r^2} \frac{\partial}{\partial r} \left( r^2 \frac{\partial}{\partial r} \right) + \frac{1}{r^2} 
-    \left[
-        \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( \sin\vartheta \frac{\partial}{\partial\vartheta} \right)
-                + \frac{1}{\sin^2 \vartheta} \frac{\partial^2}{\partial\varphi^2}
-    \right] 
-\end{equation*}
-But we do not want to consider this algebraic monster entirely, since this includes the whole set $\mathbb{R}^3$; rather, we want to focus only on the spherical surface (as the title suggests). We can then further concretise our calculations by selecting any number for the variable $r$, so that we have a sphere and, more importantly, a spherical surface on which we can ``play''.\newline
-Surely you have already heard of the unit circle, a geometric entity used extensively in many mathematical contexts. The most famous and basic among them is surely trigonometry.\newline
-Extending this concept into three dimensions, we will talk about the unit sphere. This is a very famous sphere, as is the unit circle. So since we need a sphere why not use the most famous one? Thus imposing $r=1$.\newline
-Now, since the variable $r$ became a constant, we can leave out all derivatives with respect to $r$, setting them to zero. Then substituting the value of $r$ for 1, we will obtain the operator we will refer to as \emph{Spherical Surface Operator}:
+\if 0
+\kugeltodo{Rewrite this section if the preliminaries become an addendum}
+We finally arrived at the main section, which gives our chapter its name. The
+idea is to discuss spherical harmonics, their mathematical derivation and some
+of their properties and applications.
+
+The subsection \ref{} \kugeltodo{Fix references} will be devoted to the
+Eigenvalue problem of the Laplace operator. Through the latter we will derive
+the set of Eigenfunctions that obey the equation presented in \ref{}
+\kugeltodo{reference to eigenvalue equation}, which will be defined as
+\emph{Spherical Harmonics}. In fact, this subsection will present their
+mathematical derivation.
+
+In the subsection \ref{}, on the other hand, some interesting properties
+related to them will be discussed. Some of these will come back to help us
+understand in more detail why they are useful in various real-world
+applications, which will be presented in the section \ref{}.
+
+One specific property will be studied in more detail in the subsection \ref{},
+namely the recursive property.  The last subsection is devoted to one of the
+most beautiful applications (In our humble opinion), namely the derivation of a
+Fourier-style series expansion but defined on the sphere instead of a plane.
+More importantly, this subsection will allow us to connect all the dots we have
+created with the previous sections, concluding that Fourier is just a specific
+case of the application of the concept of orthogonality. Our hope is that after
+reading this section you will appreciate the beauty and power of generalization
+that mathematics offers us.
+\fi
+
+\subsection{Eigenvalue Problem}
+
+\begin{figure}
+  \centering
+  \includegraphics{papers/kugel/figures/tikz/spherical-coordinates}
+  \caption{
+    Spherical coordinate system. Space is described with the free variables $r
+    \in \mathbb{R}_0^+$, $\vartheta \in [0; \pi]$ and $\varphi \in [0; 2\pi)$.
+    \label{kugel:fig:spherical-coordinates}
+  }
+\end{figure}
+
+From Section \ref{buch:pde:section:kugel}, we know that the spherical Laplacian
+in the spherical coordinate system (shown in Figure
+\ref{kugel:fig:spherical-coordinates}) is is defined as
 \begin{equation*}
-    \nabla^2_{\partial S} := \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( \sin\vartheta \frac{\partial}{\partial\vartheta} \right)
-                + \frac{1}{\sin^2 \vartheta} \frac{\partial^2}{\partial\varphi^2}.
+    \sphlaplacian :=
+      \frac{1}{r^2} \frac{\partial}{\partial r} \left(
+        r^2 \frac{\partial}{\partial r}
+      \right)
+      + \frac{1}{r^2} \left[
+          \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left(
+            \sin\vartheta \frac{\partial}{\partial\vartheta}
+          \right)
+        + \frac{1}{\sin^2 \vartheta} \frac{\partial^2}{\partial\varphi^2}
+      \right].
 \end{equation*}
-As can be seen, for this definition, the subscript ``$\partial S$'' was used to emphasize the fact that we are on the spherical surface, which can be understood as a boundary of the sphere.\newline
-Now that we have defined an operator, we can go on to calculate its eigenfunctions. As mentioned earlier, we can translate this problem at first abstract into a much more concrete problem, which has to do with the field of \emph{Partial Differential Equaitons} (PDEs). The functions we want to find are simply functions that respect the following expression:
-\begin{equation}\label{kugel:eq:sph_srfc_laplace}
-    \nabla^2_{\partial S} f = \lambda f 
+But we will not consider this algebraic monstrosity in its entirety. As the
+title suggests, we will only care about the \emph{surface} of the sphere.  This
+is for many reasons, but mainly to simplify reduce the already broad scope of
+this text. Concretely, we will always work on the unit sphere, which just means
+that we set $r = 1$ and keep only $\vartheta$ and $\varphi$ as free variables.
+Now, since the variable $r$ became a constant, we can leave out all derivatives
+with respect to $r$ and substitute all $r$'s with 1's to obtain a new operator
+that deserves its own name.
+
+\begin{definition}[Surface spherical Laplacian]
+  \label{kugel:def:surface-laplacian}
+  The operator
+  \begin{equation*}
+      \surflaplacian :=
+        \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left(
+          \sin\vartheta \frac{\partial}{\partial\vartheta}
+        \right)
+        + \frac{1}{\sin^2 \vartheta} \frac{\partial^2}{\partial\varphi^2},
+  \end{equation*}
+  is called the surface spherical Laplacian.
+\end{definition}
+
+In the definition, the subscript ``$\partial S$'' was used to emphasize the
+fact that we are on the spherical surface, which can be understood as being the
+boundary of the sphere. But what does it actually do? To get an intuition,
+first of all, notice the fact that $\surflaplacian$ have second derivatives,
+which means that this a measure of \emph{curvature}; But curvature of what? To
+get an even stronger intuition we will go into geometry, were curvature can be
+grasped very well visually. Consider figure \ref{kugel:fig:curvature} where the
+curvature is shown using colors. First we have the curvature of a curve in 1D,
+then the curvature of a surface (2D), and finally the curvature of a function on
+the surface of the unit sphere.
+
+\begin{figure}
+  \centering
+  \includegraphics[width=.3\linewidth]{papers/kugel/figures/tikz/curvature-1d}
+  \hskip 5mm
+  \includegraphics[width=.3\linewidth]{papers/kugel/figures/povray/curvature}
+  \hskip 5mm
+  \includegraphics[width=.3\linewidth]{papers/kugel/figures/povray/spherecurve}
+  \caption{
+    \kugeltodo{Fix alignment / size, add caption. Would be nice to match colors.}
+    \label{kugel:fig:curvature}
+  }
+\end{figure}
+
+Now that we have defined an operator, we can go and study its eigenfunctions,
+which means that we would like to find the functions $f(\vartheta, \varphi)$
+that satisfy the equation
+\begin{equation} \label{kuvel:eqn:eigen}
+    \surflaplacian f = -\lambda f.
 \end{equation}
-Which is traditionally written as follows:
-\begin{equation*}
-    \nabla^2_{\partial S} f = -\lambda f 
-\end{equation*}
-Perhaps the fact that we are dealing with a PDE may not be obvious at first glance, but if we extend the operator $\nabla^2_{\partial S}$ according to Eq.(\ref{kugel:eq:sph_srfc_laplace}), we will get:
-\begin{equation}\label{kugel:eq:PDE_sph}
-    \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( \sin\vartheta \frac{\partial f}{\partial\vartheta} \right)
-                + \frac{1}{\sin^2 \vartheta} \frac{\partial^2 f}{\partial\varphi^2} + \lambda f = 0, 
+Perhaps it may not be obvious at first glance, but we are in fact dealing with a
+partial differential equation (PDE). If we unpack the notation of the operator
+$\nabla^2_{\partial S}$ according to definition
+\ref{kugel:def:surface-laplacian}, we get:
+\begin{equation} \label{kugel:eqn:eigen-pde}
+    \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left(
+      \sin\vartheta \frac{\partial f}{\partial\vartheta}
+    \right)
+    + \frac{1}{\sin^2 \vartheta} \frac{\partial^2 f}{\partial\varphi^2}
+    + \lambda f = 0.
 \end{equation}
-making it emerge.\newline
-All functions satisfying Eq.(\ref{kugel:eq:PDE_sph}), are called eigenfunctions. Our new goal is therefore to solve this PDE. The task seems very difficult but we can simplify it with a well-known technique, namely the \emph{separation Ansatz}. The latter consists in assuming that the function $f(\vartheta, \varphi)$ we are looking for can be factorized in the following form 
-\begin{equation}\label{kugel:eq:sep_ansatz_0}
+Since all functions satisfying \eqref{kugel:eqn:eigen-pde} are the
+\emph{eigenfunctions} of $\surflaplacian$, our new goal is to solve this PDE.
+The task may seem very difficult but we can simplify it with a well-known
+technique: \emph{the separation Ansatz}. It consists in assuming that the
+function $f(\vartheta, \varphi)$ can be factorized in the following form:
+\begin{equation} \label{kugel:eqn:sep-ansatz:0}
     f(\vartheta, \varphi) = \Theta(\vartheta)\Phi(\varphi). 
 \end{equation}
-In short, we are saying that the effect of the two independent variables can be described using the multiplication of two functions that describe their effect separately. If we include this assumption in Eq.(\ref{kugel:eq:PDE_sph}), we have:
-\begin{equation}
-    \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( \sin\vartheta \frac{\partial  \Theta(\vartheta)}{\partial\vartheta} \right)\Phi(\varphi)
-                + \frac{1}{\sin^2 \vartheta} \frac{\partial^2  \Phi(\varphi)}{\partial\varphi^2} \Theta(\vartheta) + \lambda  \Theta(\vartheta)\Phi(\varphi) = 0.  \label{kugel:eq:sep_ansatz_1}
+In other words, we are saying that the effect of the two independent variables
+can be described using the multiplication of two functions that describe their
+effect separately. This separation process was already presented in section
+\ref{buch:pde:section:kugel}, but we will briefly rehearse it here for
+convenience. If we substitute this assumption in
+\eqref{kugel:eqn:eigen-pde}, we have:
+\begin{equation} \label{kugel:eqn:sep-ansatz:1}
+    \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left(
+      \sin\vartheta \frac{\partial  \Theta(\vartheta)}{\partial\vartheta}
+    \right) \Phi(\varphi)
+    + \frac{1}{\sin^2 \vartheta} \frac{\partial^2 \Phi(\varphi)}{\partial\varphi^2}
+      \Theta(\vartheta)
+    + \lambda \Theta(\vartheta)\Phi(\varphi) = 0.
 \end{equation}
-Dividing Eq.(\ref{kugel:eq:sep_ansatz_1}) by $\Theta(\vartheta)\Phi(\varphi)$ and inserting an auxiliary variable $m$, which we will call the separating constant, we will have:
-\begin{equation*}
-\frac{1}{\Theta(\vartheta)}\sin \vartheta \frac{d}{d \vartheta} \left( \sin \vartheta \frac{d \Theta}{d \vartheta} \right) + \lambda \sin^2 \vartheta = -\frac{1}{\Phi(\varphi)} \frac{d^2\Phi(\varphi)}{d\varphi^2} = m,
-\end{equation*}
-which is equivalent to the following system of two \emph{Ordinary Differential Equations} (ODEs)
-\begin{align}
-    \frac{d^2\Phi(\varphi)}{d\varphi^2} &= -m \Phi(\varphi) \label{kugel:eq:ODE_1} \\ 
-    \sin \vartheta \frac{d}{d \vartheta} \left( \sin \vartheta \frac{d \Theta}{d \vartheta} \right) + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)\Theta(\vartheta) &= 0 \label{kugel:eq:ODE_2} 
-\end{align}
-The solution of Eq.(\ref{kugel:eq:ODE_1}) is quite trivial. The complex exponential is obviously the function we are looking for, so we can write
+Dividing by $\Theta(\vartheta)\Phi(\varphi)$ and introducing an auxiliary
+variable $m$, the separation constant, yields:
 \begin{equation*}
-    \Phi_m(\varphi) = e^{j m \varphi}, \quad m \in \mathbb{Z}.
+  \frac{1}{\Theta(\vartheta)}\sin \vartheta \frac{d}{d \vartheta} \left(
+    \sin \vartheta \frac{d \Theta}{d \vartheta}
+  \right)
+  + \lambda \sin^2 \vartheta
+  = -\frac{1}{\Phi(\varphi)} \frac{d^2\Phi(\varphi)}{d\varphi^2}
+  = m,
 \end{equation*}
-The restriction for the separation constant $m$ arises from the fact that we require the following periodic constraint $\Phi_m(\varphi + 2\pi) = \Phi_m(\varphi)$.\newline
-As for Eq.(\ref{kugel:eq:ODE_2}), the resolution will not be so straightforward. We can begin by considering the substitution $x = \cos \vartheta$. The operator $\frac{d}{d \vartheta}$ will be:
+which is equivalent to the following system of 2 first order differential
+equations (ODEs):
+\begin{subequations}
+  \begin{gather}
+    \frac{d^2\Phi(\varphi)}{d\varphi^2} = -m \Phi(\varphi),
+      \label{kugel:eqn:ode-phi} \\ 
+    \sin \vartheta \frac{d}{d \vartheta} \left(
+      \sin \vartheta \frac{d \Theta}{d \vartheta}
+    \right)
+    + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)
+      \Theta(\vartheta) = 0
+      \label{kugel:eqn:ode-theta}.
+  \end{gather}
+\end{subequations}
+The solution of \eqref{kugel:eqn:ode-phi} is easy to find: The complex
+exponential is obviously the function we are looking for. So we can directly
+write the solutions
+\begin{equation} \label{kugel:eqn:ode-phi-sol}
+    \Phi(\varphi) = e^{i m \varphi}, \quad m \in \mathbb{Z}.
+\end{equation}
+The restriction that the separation constant $m$ needs to be an integer arises
+from the fact that we require a $2\pi$-periodicity in $\varphi$ since
+$\Phi(\varphi + 2\pi) = \Phi(\varphi)$. Unfortunately, solving
+\eqref{kugel:eqn:ode-theta} is not so straightforward. Actually it is quite
+difficult, and the process is so involved that it will require a dedicated
+section of its own.
+
+\subsection{Legendre Functions}
+
+To solve \eqref{kugel:eqn:ode-theta}
+We can begin by considering the substitution $x = \cos \vartheta$. The operator $\frac{d}{d \vartheta}$ will be:
 \begin{align*}
     \frac{d}{d \vartheta} = \frac{dx}{d \vartheta}\frac{d}{dx} &= -\sin \vartheta \frac{d}{dx} \\
     &= -\sqrt{1-x^2} \frac{d}{dx}.
-- 
cgit v1.2.1


From 7e51ae842c61ba338aec179d71fab2d041ebe8c5 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Wed, 17 Aug 2022 16:29:41 +0200
Subject: kugel: Review manu's text, improve legendre functions

---
 buch/papers/kugel/spherical-harmonics.tex | 424 ++++++++++--------------------
 1 file changed, 139 insertions(+), 285 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 70657c9..5645941 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -1,6 +1,6 @@
 % vim:ts=2 sw=2 et spell tw=80:
 
-\section{Spherical Harmonics}
+\section{Construction of the Spherical Harmonics}
 
 \if 0
 \kugeltodo{Rewrite this section if the preliminaries become an addendum}
@@ -111,7 +111,7 @@ that satisfy the equation
     \surflaplacian f = -\lambda f.
 \end{equation}
 Perhaps it may not be obvious at first glance, but we are in fact dealing with a
-partial differential equation (PDE). If we unpack the notation of the operator
+partial differential equation (PDE) \kugeltodo{Boundary conditions?}. If we unpack the notation of the operator
 $\nabla^2_{\partial S}$ according to definition
 \ref{kugel:def:surface-laplacian}, we get:
 \begin{equation} \label{kugel:eqn:eigen-pde}
@@ -126,7 +126,7 @@ Since all functions satisfying \eqref{kugel:eqn:eigen-pde} are the
 The task may seem very difficult but we can simplify it with a well-known
 technique: \emph{the separation Ansatz}. It consists in assuming that the
 function $f(\vartheta, \varphi)$ can be factorized in the following form:
-\begin{equation} \label{kugel:eqn:sep-ansatz:0}
+\begin{equation}
     f(\vartheta, \varphi) = \Theta(\vartheta)\Phi(\varphi). 
 \end{equation}
 In other words, we are saying that the effect of the two independent variables
@@ -135,34 +135,34 @@ effect separately. This separation process was already presented in section
 \ref{buch:pde:section:kugel}, but we will briefly rehearse it here for
 convenience. If we substitute this assumption in
 \eqref{kugel:eqn:eigen-pde}, we have:
-\begin{equation} \label{kugel:eqn:sep-ansatz:1}
+\begin{equation*}
     \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left(
       \sin\vartheta \frac{\partial  \Theta(\vartheta)}{\partial\vartheta}
     \right) \Phi(\varphi)
     + \frac{1}{\sin^2 \vartheta} \frac{\partial^2 \Phi(\varphi)}{\partial\varphi^2}
       \Theta(\vartheta)
     + \lambda \Theta(\vartheta)\Phi(\varphi) = 0.
-\end{equation}
+\end{equation*}
 Dividing by $\Theta(\vartheta)\Phi(\varphi)$ and introducing an auxiliary
-variable $m$, the separation constant, yields:
+variable $m^2$, the separation constant, yields:
 \begin{equation*}
   \frac{1}{\Theta(\vartheta)}\sin \vartheta \frac{d}{d \vartheta} \left(
     \sin \vartheta \frac{d \Theta}{d \vartheta}
   \right)
   + \lambda \sin^2 \vartheta
   = -\frac{1}{\Phi(\varphi)} \frac{d^2\Phi(\varphi)}{d\varphi^2}
-  = m,
+  = m^2,
 \end{equation*}
 which is equivalent to the following system of 2 first order differential
 equations (ODEs):
 \begin{subequations}
   \begin{gather}
-    \frac{d^2\Phi(\varphi)}{d\varphi^2} = -m \Phi(\varphi),
+    \frac{d^2\Phi(\varphi)}{d\varphi^2} = -m^2 \Phi(\varphi),
       \label{kugel:eqn:ode-phi} \\ 
     \sin \vartheta \frac{d}{d \vartheta} \left(
       \sin \vartheta \frac{d \Theta}{d \vartheta}
     \right)
-    + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)
+    + \left( \lambda - \frac{m^2}{\sin^2 \vartheta} \right)
       \Theta(\vartheta) = 0
       \label{kugel:eqn:ode-theta}.
   \end{gather}
@@ -174,291 +174,141 @@ write the solutions
     \Phi(\varphi) = e^{i m \varphi}, \quad m \in \mathbb{Z}.
 \end{equation}
 The restriction that the separation constant $m$ needs to be an integer arises
-from the fact that we require a $2\pi$-periodicity in $\varphi$ since
-$\Phi(\varphi + 2\pi) = \Phi(\varphi)$. Unfortunately, solving
-\eqref{kugel:eqn:ode-theta} is not so straightforward. Actually it is quite
-difficult, and the process is so involved that it will require a dedicated
-section of its own.
+from the fact that we require a $2\pi$-periodicity in $\varphi$ since the
+coordinate systems requires that $\Phi(\varphi + 2\pi) = \Phi(\varphi)$.
+Unfortunately, solving \eqref{kugel:eqn:ode-theta} is as straightforward,
+actually, it is quite difficult, and the process is so involved that it will
+require a dedicated section of its own.
 
 \subsection{Legendre Functions}
 
-To solve \eqref{kugel:eqn:ode-theta}
-We can begin by considering the substitution $x = \cos \vartheta$. The operator $\frac{d}{d \vartheta}$ will be:
-\begin{align*}
-    \frac{d}{d \vartheta} = \frac{dx}{d \vartheta}\frac{d}{dx} &= -\sin \vartheta \frac{d}{dx} \\
-    &= -\sqrt{1-x^2} \frac{d}{dx}.
-\end{align*} 
-Eq.(\ref{kugel:eq:ODE_2}) will then become.
+To solve \eqref{kugel:eqn:ode-theta} we start with the substitution $z = \cos
+\vartheta$ \kugeltodo{Explain geometric origin with picture}. The operator
+$\frac{d}{d \vartheta}$ becomes
+\begin{equation*}
+    \frac{d}{d \vartheta}
+    = \frac{dz}{d \vartheta}\frac{d}{dz}
+    = -\sin \vartheta \frac{d}{dz}
+    = -\sqrt{1-z^2} \frac{d}{dz},
+\end{equation*} 
+since $\sin \vartheta = \sqrt{1 - \cos^2 \vartheta} = \sqrt{1 - z^2}$, and
+then \eqref{kugel:eqn:ode-theta} becomes 
 \begin{align*}
-   \frac{-\sqrt{1-x^2}}{\sqrt{1-x^2}} \frac{d}{dx} \left( \left(\sqrt{1-x^2}\right) \left(-\sqrt{1-x^2}\right) \frac{d \Theta}{dx} \right) + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)\Theta(\vartheta) &= 0 \\
-   \frac{d}{dx} \left( (1-x^2) \frac{d \Theta}{dx} \right) + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)\Theta(\vartheta) &= 0 \\
-   (1-x^2)\frac{d^2 \Theta}{dx} - 2x\frac{d \Theta}{dx} + \left( \lambda - \frac{m}{\sin^2 \vartheta} \right)\Theta(\vartheta) &= 0 \\
-   (1-x^2)\frac{d^2 \Theta}{dx} - 2x\frac{d \Theta}{dx} + \left( \lambda - \frac{m}{1-x^2} \right)\Theta(\vartheta) &= 0 
+  \frac{-\sqrt{1-z^2}}{\sqrt{1-z^2}} \frac{d}{dz} \left[
+    \left(\sqrt{1-z^2}\right) \left(-\sqrt{1-z^2}\right) \frac{d \Theta}{dz}
+  \right]
+  + \left( \lambda - \frac{m^2}{1 - z^2} \right)\Theta(\vartheta) &= 0,
+  \\
+  \frac{d}{dz} \left[ (1-z^2) \frac{d \Theta}{dz} \right]
+  + \left( \lambda - \frac{m^2}{1 - z^2} \right)\Theta(\vartheta) &= 0,
+  \\
+  (1-z^2)\frac{d^2 \Theta}{dz} - 2z\frac{d \Theta}{dz}
+  + \left( \lambda - \frac{m^2}{1 - z^2} \right)\Theta(\vartheta) &= 0.
 \end{align*}
-By making two final cosmetic substitutions, namely $\Theta(\vartheta)=\Theta(\cos^{-1}x):=y(x)$ and $\lambda=n(n+1)$, we will be able to define the \emph{Associated Legendre Equation} in its standard and most familiar form
-\begin{definition}{Associated Legendre Equation}
-    \begin{equation}\label{kugel:eq:associated_leg_eq}
-        (1-x^2)\frac{d^2 y}{dx} - 2x\frac{d y}{dx} + \left( n(n+1) - \frac{m}{1-x^2} \right)y(x) = 0. 
-    \end{equation}
-\end{definition}
-Our new goal then became solving Eq.(\ref{kugel:eq:asssociated_leg_eq}). After that we can fit the solution into Eq.(\ref{kugel:eq:sep_ansatz_0}), obtaining $f(\vartheta, \varphi)$, the solution of the eigenvalue problem. \newline
-We simplified the problem somewhat but the task still remains very difficult. We can rely on a lemma to continue but first we need to define an additional equation, namely the \emph{Legendre Equation}
-\begin{definition}{Legendre equation}\newline
-    Setting $m=0$ in Eq.(\ref{kugel:eq:asssociated_leg_eq}), we get
-    \begin{equation}\label{kugel:eq:leg_eq}
-        (1-x^2)\frac{d^2 y}{dx} - 2x\frac{d y}{dx} + n(n+1)y(x) = 0,
-    \end{equation}
-    also known as \emph{Legendre Equation}.
-\end{definition}
-Now we can continue with the lemma
-\begin{lemma}\label{kugel:lemma_1}
-    If $y_n(x)$ is a solution of Eq.(\ref{kugel:eq:leg_eq}), then the function
-    \begin{equation*}
-        y_{m,n}(x) = (1-x^2)^{\frac{m}{2}}\frac{d^m}{dx^m}y_n(x)
-    \end{equation*}
-    satisfies Eq.(\ref{kugel:eq:associated_leg_eq})
+By making two final cosmetic substitutions, namely $Z(z) = \Theta(\cos^{-1}z)$
+and $\lambda = n(n+1)$, we obtain what is known in the literature as the
+\emph{associated Legendre equation of order $m$}:
+\nocite{olver_introduction_2013}
+\begin{equation} \label{kugel:eqn:associated-legendre}
+  (1 - z^2)\frac{d^2 Z}{dz}
+  - 2z\frac{d Z}{dz}
+  + \left( n(n + 1) - \frac{m^2}{1 - z^2} \right) Z(z) = 0,
+  \quad
+  z \in [-1; 1], m \in \mathbb{Z}.
+\end{equation}
+
+Our new goal has therefore become to solve
+\eqref{kugel:eqn:associated-legendre}, since if we find a solution for $Z(z)$ we
+can perform the substitution backwards and get back to our eigenvalue problem.
+However, the associated Legendre equation is not any easier, so to attack the
+problem we will look for the solutions in the easier special case when $m = 0$.
+This reduces the problem because it removes the double pole, which is always
+tricky to deal with. In fact, the reduced problem when $m = 0$ is known as the
+\emph{Legendre equation}:
+\begin{equation} \label{kugel:eqn:legendre}
+  (1 - z^2)\frac{d^2 Z}{dz}
+  - 2z\frac{d Z}{dz}
+  + n(n + 1) Z(z) = 0,
+  \quad
+  z \in [-1; 1].
+\end{equation}
+
+The Legendre equation is a second order differential equation, and therefore it
+has 2 independent solutions, which are known as \emph{Legendre functions} of the
+first and second kind. For the scope of this text we will only derive a special
+case of the former that is known known as the \emph{Legendre polynomials}, since
+we only need a solution between $-1$ and $1$.
+
+\begin{lemma}[Legendre polynomials]
+  \label{kugel:lem:legendre-poly}
+  The polynomial function
+  \[
+    P_n(z) = \sum^{\lfloor n/2 \rfloor}_{k=0}
+      \frac{(-1)^k}{2^n s^k!} \frac{(2n - 2k)!}{(n - k)! (n-2k)!} z^{n - 2k}
+  \]
+  is the only finite solution of the Legendre equation
+  \eqref{kugel:eqn:legendre} when $n \in \mathbb{Z}$ and $z \in [-1; 1]$.
 \end{lemma}
-\begin{proof} [TODO: modificare la $m$ (è già usata come costante di separazione) o forse è giusta (?)]
-    To begin, we can start by differentiating $m$ times Eq.\eqref{kugel:eq:leg_eq} (which is staisfied by $y(x)$), obtaining
-    \begin{equation}\label{eq:lagrange_mderiv}
-    \frac{d^m}{dx^m}\left[ (1-x^2)\frac{d^2y}{dx^2} \right] -2 \frac{d^m}{dx^m}\left[ x\frac{dy}{dx} \right] + n(n+1)\frac{d^m}{dx^m}y=0.
-    \end{equation}
-    \emph{Leibniz's theorem} says, that if we want to differentiate $m$ times a multiplication of two functions, we can use the binomial coefficients to build up a sum. This allows us to be more compact, obtaining 
-    \begin{equation}\label{eq:leibniz}
-    \frac{d^m}{dx^m}[u(x)v(x)] = \sum_{i=0}^m \binom{n}{i} \frac{d^{m-i}u}{dx^{m-1}} \frac{d^{i}v}{dx^i}.
-    \end{equation}
-    Using Eq.\eqref{eq:leibniz} in Eq.\eqref{eq:lagrange_mderiv}, we have
-    \begin{align}
-    (1-x^2)\frac{d^{m+2}y}{dx^{m+2}} &+ m \frac{d}{dx}(1-x^2)\frac{d^{m+1}y}{dx^{m+1}} + \frac{m(m-1)}{2}\frac{d^{2}}{dx^{2}}(1-x^2)\frac{d^{m}y}{dx^{m}} + n(n+1)\frac{d^m{}y}{dx^{m}} \nonumber \\
-    &-2\left(x\frac{d^{m+1}y}{dx^{m+1}} + m\frac{d}{dx}x\frac{d^{m}y}{dx^{m}} \right) \nonumber \\
-    &= (1-x^2)\frac{d^{m+2}y}{dx^{m+2}} -2x(m+1)\frac{d^{m+1}y}{dx^{m+1}}+(n(n+1)-m(m-1)-2m)\frac{d^{m}y}{dx^{m}}=0. \label{eq:aux_3}
-    \end{align}
-    To make the notation easier to follow, a new function can be defined
-    \begin{equation*}
-    \frac{d^{m}y}{dx^{m}} := y_m.
-    \end{equation*}
-    Eq.\eqref{eq:aux_3} now becomes
-    \begin{equation}\label{eq:1st_subs}
-    (1-x^2)\frac{d^{2}y_m}{dx^{2}} -2x(m+1)\frac{dy_m}{dx}+(n(n+1)-m(m+1))y_m=0
-    \end{equation}
-    A second function can be further defined as
-    \begin{equation*}
-    (1-x^2)^{\frac{m}{2}}\frac{d^{m}y}{dx^{m}} = (1-x^2)^{\frac{m}{2}}y_m := \hat{y}_m,
-    \end{equation*}
-    allowing to write Eq.\eqref{eq:1st_subs} as
-    \begin{equation}\label{eq:2st_subs}
-    (1-x^2)\frac{d^2}{dx^2}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] -2(m+1)x\frac{d}{dx}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] + (n(n+1)-m(m+1))\hat{y}_m(1-x^2)^{-\frac{m}{2}}=0.
-    \end{equation}
-    The goal now is to compute the two terms 
-    \begin{align*}
-    \frac{d^2}{dx^2}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] &=  \frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} + \frac{d\hat{y}_m}{dx}\frac{m}{2}(1-x^2)^{-\frac{m}{2}-1}2x \\
-    &+ m\left( \frac{d\hat{y}_m}{dx} x (1-x^2)^{-\frac{m}{2}-1} + \hat{y}_m (1-x^2)^{-\frac{m}{2}-1} - \hat{y}_m x (-\frac{m}{2}-1)(1-x^2)^{-\frac{m}{2}} 2x\right) \\
-    &= \frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} + \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-\frac{m}{2}-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-\frac{m}{2}-1}\\
-    &+ m\hat{y}_m  (1-x^2)^{-\frac{m}{2}-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-\frac{m}{2}-2}
-    \end{align*}
-    and
-    \begin{align*}
-    \frac{d}{dx}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] &= \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_m\frac{m}{2}(1-x^2)^{-\frac{m}{2}-1}2x \\
-    &= \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_mm(1-x^2)^{-\frac{m}{2}-1}x,
-    \end{align*}
-    to use them in Eq.\eqref{eq:2st_subs}, obtaining
-    \begin{align*}
-    (1-x^2)\biggl[\frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} &+ \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-\frac{m}{2}-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-\frac{m}{2}-1} \\ 
-    &+ m\hat{y}_m  (1-x^2)^{-\frac{m}{2}-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-\frac{m}{2}-2}\biggr] \\
-    &-2(m+1)x\left[  \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_mm(1-x^2)^{-\frac{m}{2}-1}x \right] \\
-    &+ (n(n+1)-m(m+1))\hat{y}_m(1-x^2)^{-\frac{m}{2}}=0.\\
-    \end{align*}
-    We can now divide by $(1-x^2)^{-\frac{m}{2}}$, obtaining
-    \begin{align*}
-    (1-x^2)\biggl[\frac{d^2\hat{y}_m}{dx^2} &+ \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-1} + m\hat{y}_m  (1-x^2)^{-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-2}\biggr] \\
-    &-2(m+1)x\left[  \frac{d\hat{y}_m}{dx} + \hat{y}_mm(1-x^2)^{-1}x \right] + (n(n+1)-m(m+1))\hat{y}_m\\
-    &= \frac{d^2\hat{y}_m}{dx^2} + \frac{d\hat{y}_m}{dx}mx + m\frac{d\hat{y}_m}{dx}x + m\hat{y}_m + m\hat{y}_m x^2(m+2)(1-x^2)^{-1} \\
-    &-2(m+1)x\left[  \frac{d\hat{y}_m}{dx} + \hat{y}_mm(1-x^2)^{-1}x \right] + (n(n+1)-m(m+1))\hat{y}_m\\
-    \end{align*}
-    and collecting some terms
-    \begin{equation*}
-    (1-x^2)\frac{d^2\hat{y}_m}{dx^2} - 2x\frac{d\hat{y}_m}{dx} + \left( -x^2 \frac{m^2}{1-x^2} + m+n(n+1)-m(m+1)\right)\hat{y}_m=0.
-    \end{equation*}
-    Showing that 
-    \begin{align*}
-    -x^2 \frac{m^2}{1-x^2} + m+n(n+1)-m(m+1) &= n(n+1)- m^2 -x^2 \frac{m^2}{1-x^2} \\
-    &= n(n+1)- \frac{m}{1-x^2}
-    \end{align*}
-    implies $\hat{y}_m(x)$ being a solution of Eq.\eqref{kugel:eq:associated_leg_eq}
+\begin{proof}
+  This results is derived in section \ref{kugel:sec:proofs:legendre}.
 \end{proof}
-In simpler words, if we find a solution to Eq.\eqref{kugel:eq:leg_eq}, we can extend the latter according to the Lemma \ref{kugel:lemma_1} obtaining the solution of Eq.\eqref{kugel:eq:associated_leg_eq}.\newline
-We can say that we are going in the right direction, as the problem to be solved is decreasing in difficulty. We moved from having to find a solution to Eq.\eqref{kugel:eq:associated_leg_eq} to finding a solution to Eq.\eqref{kugel:eq:leg_eq}, which is much more approachable as a problem. Luckily for us, the lemma we will present below will help us extensively, which is something of an euphemism, since it will give us the solution directly.
-\begin{lemma}
-    The polynomial function
-    \begin{align*}
-        y_n(x)&=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{(2n-2k)!}{2^n k! (n-k)!(n-2k)!} x^{n-2k}\\
-        &= \frac{1}{n!2^n}\frac{d^n}{dx^n}(1-x^2)^n =: P_n(x),
-    \end{align*}
-    is a solution to the second order differential equation
-    \begin{equation}\label{kugel:eq:sol_leg}
-        (1-x^2)\frac{d^2y}{dx^2}-2x\frac{dy}{dx} + n(n+1)y=0, \quad \forall n>0.
-    \end{equation}
+
+Since the Legendre \emph{polynomials} are indeed polynomials, they can also be
+expressed using the hypergeometric functions described in section
+\ref{buch:rekursion:section:hypergeometrische-funktion}, so in fact
+\begin{equation}
+  P_n(z) = {}_2F_1 \left( \begin{matrix}
+    n + 1, & -n \\ \multicolumn{2}{c}{1}
+  \end{matrix} ; \frac{1 - z}{2} \right).
+\end{equation}
+Further, there are a few more interesting but not very relevant forms to write
+$P_n(z)$ such as \emph{Rodrigues' formula} and \emph{Laplace's integral
+representation} which are
+\begin{equation*}
+  P_n(z) = \frac{1}{2^n} \frac{d^n}{dz^n} (x^2 - 1)^n,
+  \qquad \text{and} \qquad
+  P_n(z) = \frac{1}{\pi} \int_0^\pi \left(
+    z + \cos\vartheta \sqrt{z^2 - 1}
+  \right) \, d\vartheta
+\end{equation*}
+respectively, both of which we will not prove (see chapter 3 of
+\cite{bell_special_2004} for a proof). Now that we have a solution for the
+Legendre equation, we can make use of the following lemma patch the solutions
+such that they also become solutions of the associated Legendre equation
+\eqref{kugel:eqn:associated-legendre}.
+
+\begin{lemma} \label{kugel:lem:extend-legendre}
+  If $Z_n(z)$ is a solution of the Legendre equation \eqref{kugel:eqn:legendre},
+  then
+  \begin{equation*}
+    Z^m_n(z) = (1 - z^2)^{m/2} \frac{d^m}{dz^m}Z_n(z)
+  \end{equation*}
+  solves the associated Legendre equation \eqref{kugel:eqn:associated-legendre}.
+  \nocite{bell_special_2004}
 \end{lemma}
 \begin{proof}
-    In order to find a solution to Eq.\eqref{eq:legendre}, the following Ansatz can be performed:
-    \begin{equation}\label{eq:ansatz}
-    y(x) = \sum_{k=0}^\infty a_k x^k.
-    \end{equation}
-    Given Eq.\eqref{eq:ansatz}, then
-    \begin{align*}
-    \frac{dy}{dx} &= \sum_{k=0}^\infty k a_k x^{k-1}, \\
-    \frac{d^2y}{dx^2} &= \sum_{k=0}^\infty k (k-1) a_k x^{k-2}.
-    \end{align*}
-    Eq.\eqref{eq:legendre} can be therefore written as
-    \begin{align}
-    &(1-x^2)\sum_{k=0}^\infty k (k-1) a_k x^{k-2} - 2x\sum_{k=0}^\infty k a_k x^{k-1} + n(n+1)\sum_{k=0}^\infty a_k x^k=0 \label{eq:ansatz_in_legendre} \\
-    &=\sum_{k=0}^\infty k (k-1) a_k x^{k-2} - \sum_{k=0}^\infty k (k-1) a_k x^{k} - 2x\sum_{k=0}^\infty k a_k x^{k-1} + n(n+1)\sum_{k=0}^\infty a_k x^k=0. \nonumber
-    \end{align}
-    If one consider the term
-    \begin{equation}\label{eq:term}
-    \sum_{k=0}^\infty k (k-1) a_k x^{k-2},
-    \end{equation}
-    the substitution $\tilde{k}=k-2$ yields Eq.\eqref{eq:term} to
-    \begin{equation*}
-    \sum_{\tilde{k}=-2}^\infty (\tilde{k}+2) (\tilde{k}+1) a_{\tilde{k}+2} x^{\tilde{k}}=\sum_{\tilde{k}=0}^\infty (\tilde{k}+2) (\tilde{k}+1) a_{\tilde{k}} x^{\tilde{k}}.
-    \end{equation*}
-    This means that Eq.\eqref{eq:ansatz_in_legendre} becomes
-    \begin{align}
-    &\sum_{k=0}^\infty (k+1)(k+2) a_{k+2} x^{k} - \sum_{k=0}^\infty k (k-1) a_k x^{k} - 2\sum_{k=0}^\infty k a_k x^k + n(n+1)\sum_{k=0}^\infty a_k x^k \nonumber \\
-    = &\sum_{k=0}^\infty \big[ (k+1)(k+2) a_{k+2} - k (k-1) a_k - 2 k a_k + n(n+1) a_k \big] x^k \stackrel{!}{=} 0. \label{eq:condition}
-    \end{align}
-    The condition in Eq.\eqref{eq:condition} is equivalent to 
-    \begin{equation}\label{eq:condition_2}
-    (k+1)(k+2) a_{k+2} - k (k-1) a_k - 2 k a_k + n(n+1) a_k = 0.
-    \end{equation}
-    We can derive a recursion formula for $a_{k+2}$ from Eq.\eqref{eq:condition_2}, which can be expressed as
-    \begin{equation}\label{eq:recursion}
-    a_{k+2}= \frac{k (k-1) - 2 k + n(n+1)}{(k+1)(k+2)}a_k = \frac{(k-n)(k+n+1)}{(k+2)(k+1)}a_k.
-    \end{equation}
-    All coefficients can be calculated using the latter. 
-    
-    Following Eq.\eqref{eq:recursion}, if we want to compute $a_6$ we would have
-    \begin{align*}
-    a_{6}= -\frac{(n-4)(n+5)}{6\cdot 5}a_4 &= -\frac{(n-4)(5+n)}{6 \cdot 5} -\frac{(n-2)(n+3)}{4 \cdot 3}  a_2 \\
-    &= -\frac{(n-4)(n+5)}{6 \cdot 5} -\frac{(n-2)(n+3)}{4 \cdot 3} -\frac{n(n+1)}{2 \cdot 1}  a_0 \\
-    &= -\frac{(n+5)(n+3)(n+1)n(n-2)(n-4)}{6!} a_0.
-    \end{align*}
-    One can generalize this relation for the $i^\text{th}$ even coefficient as
-    \begin{equation*}
-    a_{2k} = (-1)^k \frac{(n+(2k-1))(n+(2k-1)-2)\hdots (n-(2k-2)+2)(n-(2k-2))}{(2k)!}a_0
-    \end{equation*}
-    where $i=2k$.
-    
-    A similar expression can be written for the odd coefficients $a_{2k-1}$. In this case, the equation starts from $a_1$ and to find the pattern we can write the recursion for an odd coefficient, $a_7$ for example
-    \begin{align*}
-    a_{7}= -\frac{(n-5)(n+6)}{7\cdot 6}a_5 &= - \frac{(n-5)(n+6)}{7\cdot 6} -\frac{(n-3)(n+4)}{5 \cdot 4}  a_3 \\
-    &= - \frac{(n-5)(n+6)}{7\cdot 6} -\frac{(n-3)(n+4)}{5 \cdot 4}  -\frac{(n-1)(n+2)}{3 \cdot 2}  a_1 \\
-    &= -\frac{(n+6)(n+4)(n+2)(n-1)(n-3)(n-5)}{7!} a_1.
-    \end{align*}
-    As before, we can generalize this equation for the $i^\text{th}$ odd coefficient
-    \begin{equation*}
-    a_{2k+1} = (-1)^k \frac{(n + 2k)(n+2k-2)\hdots(n-(2k-1)+2)(n-(2k-1))}{(2k+1)!}a_1
-    \end{equation*}
-    where $i=2k+1$.
-    
-    Let be 
-    \begin{align*}
-    y_\text{e}^K(x) &:= \sum_{k=0}^K(-1)^k \frac{(n+(2k-1))(n+(2k-1)-2)\hdots \color{red}(n-(2k-2)+2)(n-(2k-2))}{(2k)!} x^{2k}, \\
-    y_\text{o}^K(x) &:= \sum_{k=0}^K(-1)^k \frac{(n + 2k)(n+2k-2)\hdots \color{blue} (n-(2k-1)+2)(n-(2k-1))}{(2k+1)!} x^{2k+1}.
-    \end{align*}
-    The solution to the Eq.\eqref{eq:legendre} can be written as
-    \begin{equation}\label{eq:solution}
-    y(x) = \lim_{K \to \infty} \left[ a_0 y_\text{e}^K(x) + a_1 y_\text{o}^K(x) \right].
-    \end{equation}
-    
-    The colored parts can be analyzed separately:
-    \begin{itemize}
-      \item[\textcolor{red}{\textbullet}] Suppose that $n=n_0$ is an even number. Then the red part, for a specific value of $k=k_0$, will follow the following relation:
-    \begin{equation*}
-    n_0-(2k_0-2)=0. 
-    \end{equation*}
-    From that point on, given the recursive nature of Eq.\eqref{eq:recursion}, all the subsequent coefficients will also be 0, making the sum finite.
-    \begin{equation*}
-    a_{2k}=0 \iff y_{\text{o}}^{2k}(x)=y_{\text{o}}^{2k_0}(x), \quad \forall k>k_0
-    \end{equation*} 
-      \item[\textcolor{blue}{\textbullet}] Suppose that $n=n_0$ is an odd number. Then the blue part, for a specific value of $k=k_0$, will follow the following relation 
-    \begin{equation*}
-    n_0-(2k_0-1)=0.  
-    \end{equation*}
-    From that point on, for the same reason as before, all the subsequent coefficients will also be 0, making the sum finite.
-    \begin{equation*}
-    a_{2k+1}=0 \iff y_{\text{o}}^{2k+1}(x)=y_{\text{o}}^{2k_0+1}(x), \quad \forall k>k_0
-    \end{equation*}
-    \end{itemize} 
-    
-    There is the possibility of expressing the solution in Eq.\eqref{eq:solution} in a more compact form, combining the two solutions $y_\text{o}^K(x)$ and $y_\text{e}^K(x)$. They are both a polynomial of maximum degree $n$, assuming $n \in \mathbb{N}$. In the case where $n$ is even, the polynomial solution
-    \begin{equation*}
-    \lim_{K\to \infty} y_\text{e}^K(x)
-    \end{equation*}
-    will be a finite sum. If instead $n$ is odd, will be 
-    \begin{equation*}
-    \lim_{K\to \infty} y_\text{o}^K(x)
-    \end{equation*}
-    to be a finite sum. 
-    
-    Depending on the coefficient we start with, $a_1$ or $a_0$, we will obtain the odd or even polynomial respectively. Starting with the last coefficient $a_n$ and, recursively, calculating all the others in descending order, we can express the two parts $y_\text{o}^K(x)$ and $y_\text{e}^K(x)$ with a single sum. Hence, because we start with the last coefficient, the choice concerning $a_1$ and $a_0$ will be at the end of the sum, and not at the beginning. To compact Eq.\eqref{eq:solution}, Eq.\eqref{eq:recursion} can be reconsidered to calculate the coefficient $a_{k-2}$, using $a_k$
-    \begin{equation*}
-    a_{k-2} = -\frac{(k+2)(k+1)}{(k-n)(k+n+1)}a_k
-    \end{equation*}
-    Now the game is to find a pattern, as before. Remember that $n$ is a fixed parameter of Eq.\eqref{eq:legendre}.  
-    \begin{align*}
-    a_{n-2} &= -\frac{n(n-1)}{2(2n-1)}a_n, \\
-    a_{n-4} &= -\frac{(n-2)(n-3)}{4(2n-3)}a_{n-2} \\
-    &= -\frac{(n-2)(n-3)}{4(2n-3)}-\frac{n(n-1)}{2(2n-1)}a_n.
-    \end{align*}
-    In general 
-    \begin{equation}\label{eq:general_recursion}
-    a_{n-2k} = (-1)^k \frac{n(n-1)(n-2)(n-3) \hdots (n-2k+1)}{2\cdot4\hdots 2k(2n-1)(2n-3)\hdots(2n-2k+1)}a_n
-    \end{equation}
-    The whole solution can now be written as
-    \begin{align}
-    y(x) &= a_n x^n + a_{n-2} x^{n-2} + a_{n-4} x^{n-4} + a_{n-6} x^{n-6} + \hdots + \begin{cases} 
-    a_1 x, \quad &\text{if } n \text{ odd} \\ 
-    a_0, \quad  &\text{if } n \text{ even} 
-    \end{cases} \nonumber \\
-    &= \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} a_{n-2k}x^{n-2k} \label{eq:solution_2}
-    \end{align}
-    By considering
-    \begin{align}
-    (2n-1)(2n-3)\hdots (2n-2k+1)&=\frac{2n(2n-1)(2n-2)(2n-3)\hdots(2n-2k+1)}
-    {2n(2n-2)(2n-4)(2n-6)\hdots(2n-2k+2)} \nonumber \\ 
-    &=\frac{\frac{(2n)!}{(2n-2k)!}}
-    {2^kn(n-1)(n-2)(n-3)\hdots(n-k+1)} \nonumber \\
-    &=\frac{\frac{(2n)!}{(2n-2k)!}}
-    {2^k\frac{n!}{(n-k)!}}=\frac{(n-k)!(2n)!}{n!(2n-2k)!2^k} \label{eq:1_sub_recursion}, \\
-    2 \cdot 4  \hdots 2k &= 2^r 1\cdot2 \hdots r = 2^r r!\label{eq:2_sub_recursion}, \\
-    n(n-1)(n-2)(n-3) \hdots (n-2k+1) &= \frac{n!}{(n-2k)!}\label{eq:3_sub_recursion}.
-    \end{align}
-    Eq.\eqref{eq:solution_2} can be rewritten as
-    \begin{equation}\label{eq:solution_3}
-    y(x)=a_n \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{n!^2(2n-2k)!}{k!(n-2k)!(n-k)!(2n)!}  x^{n-2k}.
-    \end{equation}
-    Eq.\eqref{eq:solution_3} is defined for any $a_n$. By letting $a_n$ be declared as
-    \begin{equation*}
-    a_{n} := \frac{(2n)!}{2^n n!^2},
-    \end{equation*}
-    the so called \emph{Legendre polynomial} emerges
-    \begin{equation}\label{eq:leg_poly}
-    P_n(x):=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{(2n-2k)!}{2^n k! (n-k)!(n-2k)!} x^{n-2k} 
-    \end{equation}
+  See section \ref{kugel:sec:proofs:legendre}.
 \end{proof}
-As can be seen, the solution is a $n$-dependent power series, traditionally denoted as $P_n(x)$. This set of polynomials are called \emph{Legendre Polynomials}, because precisely they are polynomials satisfying the Legendre equation.\newline
-Now that we have a solution to Eq.\eqref{kugel:eq:leg_eq}, we can then extend Eq.\eqref{kugel:eq:sol_leg}, as stated in Lemma \ref{kugel:lemma_1}. We will then have
-\begin{align*}
-y_{m,n}(x) &= (1-x^2)^{\frac{m}{2}}\frac{d^m}{dx^m}P_n(x) \\
-&= \frac{1}{n!2^n}(1-x^2)^{\frac{m}{2}}\frac{d^{m+n}}{dx^{m+n}}(1-x^2)^n 
-\end{align*}
-This set of functions are defined as \emph{Associated Legendre functions}, because similarly to before, they solve the Associated Legendre equation, defined in Eq.\eqref{kugel:eq:eq_leg}.
-\begin{definition}{Associated Legendre Functions}
-\begin{equation}\label{kugel:eq:associated_leg_func}
-P_{m,n}(x) := \frac{1}{n!2^n}(1-x^2)^{\frac{m}{2}}\frac{d^{m+n}}{dx^{m+n}}(1-x^2)^n 
-\end{equation}
+
+What is happening in lemma \ref{kugel:lem:extend-legendre}, is that we are
+essentially inserting a square root function in the solution in order to be able
+to reach the parts of the domain near the poles at $\pm 1$ of the associated
+Legendre equation, which is not possible only using power series
+\kugeltodo{Reference book theory on extended power series method.}. Now, since
+we have a solution in our domain, namely $P_n(z)$, we can insert it in the lemma 
+obtain the \emph{associated Legendre functions}.
+
+\begin{definition}[Ferrers or Associated Legendre functions]
+  The functions
+  \begin{equation}\label{kugel:eq:associated_leg_func}
+    P^m_n (z) = \frac{1}{n!2^n}(1-z^2)^{\frac{m}{2}}\frac{d^{m}}{dz^{m}} P_n(z)
+      = \frac{1}{n!2^n}(1-z^2)^{\frac{m}{2}}\frac{d^{m+n}}{dz^{m+n}}(1-z^2)^n 
+  \end{equation}
+  are known as Ferrers or associated Legendre functions.
 \end{definition}
+
+\subsection{Spherical Harmonics}
+
 As you may recall, previously we performed the substitution $x=\cos \vartheta$. Now we need to return to the old domain, which can be done straightforwardly:
 \begin{equation*}
     \Theta(\vartheta) = P_{m,n}(\cos \vartheta),
@@ -512,6 +362,10 @@ Ora, visto che la soluzione dell'eigenfunction problem è formata dalla moltipli
 
 \subsection{Recurrence Relations}
 
-\section{Series Expansions in \(C(S^2)\)}
+\section{Series Expansions in $C(S^2)$}
 
-\nocite{olver_introduction_2013}
+\subsection{Orthogonality of $P_n$, $P^m_n$ and $Y^m_n$}
+
+\subsection{Series Expansion}
+
+\subsection{Fourier on $S^2$}
-- 
cgit v1.2.1


From 494636b6d00b0697bda4c5840a3666b0867f22e8 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Wed, 17 Aug 2022 17:18:13 +0200
Subject: kugel: Minor changes

---
 buch/papers/kugel/spherical-harmonics.tex | 87 ++++++++++++++++++++++---------
 1 file changed, 63 insertions(+), 24 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 5645941..2ded50b 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -2,8 +2,8 @@
 
 \section{Construction of the Spherical Harmonics}
 
-\if 0
-\kugeltodo{Rewrite this section if the preliminaries become an addendum}
+\kugeltodo{Review text, or rewrite if preliminaries becomes an addendum}
+
 We finally arrived at the main section, which gives our chapter its name. The
 idea is to discuss spherical harmonics, their mathematical derivation and some
 of their properties and applications.
@@ -29,9 +29,9 @@ created with the previous sections, concluding that Fourier is just a specific
 case of the application of the concept of orthogonality. Our hope is that after
 reading this section you will appreciate the beauty and power of generalization
 that mathematics offers us.
-\fi
 
 \subsection{Eigenvalue Problem}
+\label{kugel:sec:construction:eigenvalue}
 
 \begin{figure}
   \centering
@@ -111,8 +111,9 @@ that satisfy the equation
     \surflaplacian f = -\lambda f.
 \end{equation}
 Perhaps it may not be obvious at first glance, but we are in fact dealing with a
-partial differential equation (PDE) \kugeltodo{Boundary conditions?}. If we unpack the notation of the operator
-$\nabla^2_{\partial S}$ according to definition
+partial differential equation (PDE) \kugeltodo{Boundary conditions?}. If we
+unpack the notation of the operator $\nabla^2_{\partial S}$ according to
+definition
 \ref{kugel:def:surface-laplacian}, we get:
 \begin{equation} \label{kugel:eqn:eigen-pde}
     \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left(
@@ -139,7 +140,8 @@ convenience. If we substitute this assumption in
     \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left(
       \sin\vartheta \frac{\partial  \Theta(\vartheta)}{\partial\vartheta}
     \right) \Phi(\varphi)
-    + \frac{1}{\sin^2 \vartheta} \frac{\partial^2 \Phi(\varphi)}{\partial\varphi^2}
+    + \frac{1}{\sin^2 \vartheta}
+      \frac{\partial^2 \Phi(\varphi)}{\partial\varphi^2}
       \Theta(\vartheta)
     + \lambda \Theta(\vartheta)\Phi(\varphi) = 0.
 \end{equation*}
@@ -182,6 +184,14 @@ require a dedicated section of its own.
 
 \subsection{Legendre Functions}
 
+\begin{figure}
+  \centering
+  \kugelplaceholderfig{.8\textwidth}{5cm}
+  \caption{
+    \kugeltodo{Why $z = \cos \vartheta$.}
+  }
+\end{figure}
+
 To solve \eqref{kugel:eqn:ode-theta} we start with the substitution $z = \cos
 \vartheta$ \kugeltodo{Explain geometric origin with picture}. The operator
 $\frac{d}{d \vartheta}$ becomes
@@ -298,26 +308,19 @@ Legendre equation, which is not possible only using power series
 we have a solution in our domain, namely $P_n(z)$, we can insert it in the lemma 
 obtain the \emph{associated Legendre functions}.
 
-\begin{definition}[Ferrers or Associated Legendre functions]
+\begin{definition}[Ferrers or associated Legendre functions]
+  \label{kugel:def:ferrers-functions}
   The functions
-  \begin{equation}\label{kugel:eq:associated_leg_func}
+  \begin{equation}
     P^m_n (z) = \frac{1}{n!2^n}(1-z^2)^{\frac{m}{2}}\frac{d^{m}}{dz^{m}} P_n(z)
       = \frac{1}{n!2^n}(1-z^2)^{\frac{m}{2}}\frac{d^{m+n}}{dz^{m+n}}(1-z^2)^n 
   \end{equation}
   are known as Ferrers or associated Legendre functions.
 \end{definition}
 
-\subsection{Spherical Harmonics}
+\kugeltodo{Discuss $|m| \leq n$.}
 
-As you may recall, previously we performed the substitution $x=\cos \vartheta$. Now we need to return to the old domain, which can be done straightforwardly:
-\begin{equation*}
-    \Theta(\vartheta) = P_{m,n}(\cos \vartheta),
-\end{equation*}
-obtaining the much sought function $\Theta(\vartheta)$. \newline
-So we finally reached the end of this tortuous path. Now we just need to put together all the information we have to construct $f(\vartheta, \varphi)$ in the following way:
-\begin{equation}\label{kugel:eq:sph_harm_0}
-    f(\vartheta, \varphi) = \Theta(\vartheta)\Phi(\varphi) = P_{m,n}(\cos \vartheta)e^{jm\varphi}, \quad |m|\leq n.
-\end{equation}
+\if 0
 The constraint $|m|<n$, can be justified by considering Eq.\eqref{kugel:eq:associated_leg_func}, in which the derivative of degree $m+n$ is present. A derivative to be well defined must have an order that is greater than zero. Furthermore, it can be seen that this derivative is applied on a polynomial of degree $2n$. As is known from Calculus 1, if you derive a polynomial of degree $2n$ more than $2n$ times, you get zero, which is a trivial solution in which we are not interested.\newline
 We can thus summarize these two conditions by writing:
 \begin{equation*}
@@ -327,13 +330,50 @@ We can thus summarize these two conditions by writing:
     \end{rcases} |m| \leq n.
 \end{equation*}
 The set of functions in Eq.\eqref{kugel:eq:sph_harm_0} is named \emph{Spherical Harmonics}, which are the eigenfunctions of the Laplace operator on the \emph{spherical surface domain}, which is exactly what we were looking for at the beginning of this section.
-\begin{definition}{Spherical Harmonics}
-    \begin{equation}\label{kugel:eq:sph_harm_1}
-    \tilde{Y}_{m,n}(\vartheta, \varphi) := P_{m,n}(\cos \vartheta)e^{jm\varphi}, \quad |m|\leq n.
-    \end{equation}
+\fi
+
+\subsection{Spherical Harmonics}
+
+Finally, we can go back to solving our boundary value problem we started in
+section \ref{kugel:sec:construction:eigenvalue}. We had left off in the middle
+of the separation, were we had used the Ansatz $f(\vartheta, \varphi) =
+\Theta(\vartheta) \Phi(\varphi)$ to find that $\Phi(\varphi) = e^{im\varphi}$,
+and we were solving for $\Theta(\vartheta)$.  As you may recall, previously we
+performed the substitution $z = \cos \vartheta$. Now we can finally to bring back the
+solution to the associated Legendre equation $P^m_n(z)$ into the $\vartheta$
+domain and combine it with $\Phi(\varphi)$ to get the full result:
+\begin{equation*}
+    f(\vartheta, \varphi)
+      = \Theta(\vartheta)\Phi(\varphi)
+      = P^m_n (\cos \vartheta) e^{im\varphi}.
+\end{equation*}
+This family of functions, which recall are the solutions of the eigenvalue
+problem of the surface spherical Laplacian, are the long anticipated
+\emph{complex spherical harmonics}, and they are usually denoted with
+$Y^m_n(\vartheta, \varphi)$.
+
+\begin{definition}[Spherical harmonics]
+  \label{kugel:def:spherical-harmonics}
+  The functions
+  \begin{equation*}
+    Y_{m,n}(\vartheta, \varphi) = P^m_n(\cos \vartheta) e^{im\varphi},
+  \end{equation*}
+  where $m, n \in \mathbb{Z}$ and $|m| < n$ are called spherical harmonics.
 \end{definition}
 
+\begin{figure}
+  \centering
+  \kugelplaceholderfig{\textwidth}{.8\paperheight}
+  \caption{
+    \kugeltodo{Big picture with the first few spherical harmonics.}
+  }
+\end{figure}
+
 \subsection{Normalization}
+
+\kugeltodo{Discuss various normalizations.}
+
+\if 0
 As explained in the chapter \ref{}, the concept of orthogonality is very important and at the practical level it is very useful, because it allows us to develop very powerful techniques at the mathematical level.\newline 
 Throughout this book we have been confronted with the Sturm-Liouville theory (see chapter \ref{}). The latter, among other things, carries with it the concept of orthogonality. Indeed, if we consider the solutions of the Sturm-Liouville equation, which can be expressed in this form
 \begin{equation}\label{kugel:eq:sturm_liouville}
@@ -355,9 +395,8 @@ Inoltre, possiamo provare l'ortogonalità di $\Theta(\vartheta)$ utilizzando \eq
     x
 \end{align}
 Ora, visto che la soluzione dell'eigenfunction problem è formata dalla moltiplicazione di $\Phi_m(\varphi)$ e $P_{m,n}(x)$
-\begin{lemma}
+\fi
 
-\end{lemma}
 \subsection{Properties}
 
 \subsection{Recurrence Relations}
-- 
cgit v1.2.1


From 95d6d5a46854e79d7b410a1fd4253ee4548e936e Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Thu, 18 Aug 2022 14:46:51 +0200
Subject: kugel: Orthogonality

---
 buch/papers/kugel/spherical-harmonics.tex | 203 ++++++++++++++++++++++++++++--
 1 file changed, 194 insertions(+), 9 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 2ded50b..2a00754 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -178,7 +178,7 @@ write the solutions
 The restriction that the separation constant $m$ needs to be an integer arises
 from the fact that we require a $2\pi$-periodicity in $\varphi$ since the
 coordinate systems requires that $\Phi(\varphi + 2\pi) = \Phi(\varphi)$.
-Unfortunately, solving \eqref{kugel:eqn:ode-theta} is as straightforward,
+Unfortunately, solving \eqref{kugel:eqn:ode-theta} is not as straightforward,
 actually, it is quite difficult, and the process is so involved that it will
 require a dedicated section of its own.
 
@@ -250,7 +250,7 @@ case of the former that is known known as the \emph{Legendre polynomials}, since
 we only need a solution between $-1$ and $1$.
 
 \begin{lemma}[Legendre polynomials]
-  \label{kugel:lem:legendre-poly}
+  \label{kugel:thm:legendre-poly}
   The polynomial function
   \[
     P_n(z) = \sum^{\lfloor n/2 \rfloor}_{k=0}
@@ -287,7 +287,7 @@ Legendre equation, we can make use of the following lemma patch the solutions
 such that they also become solutions of the associated Legendre equation
 \eqref{kugel:eqn:associated-legendre}.
 
-\begin{lemma} \label{kugel:lem:extend-legendre}
+\begin{lemma} \label{kugel:thm:extend-legendre}
   If $Z_n(z)$ is a solution of the Legendre equation \eqref{kugel:eqn:legendre},
   then
   \begin{equation*}
@@ -300,7 +300,7 @@ such that they also become solutions of the associated Legendre equation
   See section \ref{kugel:sec:proofs:legendre}.
 \end{proof}
 
-What is happening in lemma \ref{kugel:lem:extend-legendre}, is that we are
+What is happening in lemma \ref{kugel:thm:extend-legendre}, is that we are
 essentially inserting a square root function in the solution in order to be able
 to reach the parts of the domain near the poles at $\pm 1$ of the associated
 Legendre equation, which is not possible only using power series
@@ -356,9 +356,10 @@ $Y^m_n(\vartheta, \varphi)$.
   \label{kugel:def:spherical-harmonics}
   The functions
   \begin{equation*}
-    Y_{m,n}(\vartheta, \varphi) = P^m_n(\cos \vartheta) e^{im\varphi},
+    Y^m_n (\vartheta, \varphi) = P^m_n(\cos \vartheta) e^{im\varphi},
   \end{equation*}
-  where $m, n \in \mathbb{Z}$ and $|m| < n$ are called spherical harmonics.
+  where $m, n \in \mathbb{Z}$ and $|m| < n$ are called (unnormalized) spherical
+  harmonics.
 \end{definition}
 
 \begin{figure}
@@ -366,9 +367,195 @@ $Y^m_n(\vartheta, \varphi)$.
   \kugelplaceholderfig{\textwidth}{.8\paperheight}
   \caption{
     \kugeltodo{Big picture with the first few spherical harmonics.}
+    \label{kugel:fig:spherical-harmonics}
   }
 \end{figure}
 
+\kugeltodo{Describe how they look like with fig.
+\ref{kugel:fig:spherical-harmonics}}
+
+\subsection{Orthogonality of $P_n$, $P^m_n$ and $Y^m_n$}
+
+We shall now discuss an important property of the spherical harmonics: they form
+an orthogonal system. And since the spherical harmonics contain the Ferrers or
+associated Legendre functions, we need to discuss their orthogonality first.
+But the Ferrers functions themselves depend on the Legendre polynomials, so that
+will be our starting point.
+
+\begin{lemma} For the Legendre polynomials $P_n(z)$ and $P_k(z)$ it holds that
+  \label{kugel:thm:legendre-poly-ortho}
+  \begin{equation*}
+    \int_{-1}^1 P_n(z) P_k(z) \, dz
+    = \frac{2}{2n + 1} \delta_{nk}
+    = \begin{cases}
+      \frac{2}{2n + 1} & \text{if } n = k, \\
+      0 & \text{otherwise}.
+    \end{cases}
+  \end{equation*}
+\end{lemma}
+\begin{proof}
+  To start, consider the fact that that the Legendre equation
+  \eqref{kugel:eqn:legendre}, of which two distinct Legendre polynomials
+  $P_n(z)$ and $P_k(z)$ are a solution ($n \neq k$), can be rewritten in the
+  following form:
+  \begin{equation}
+    \frac{d}{dz} \left[ 
+      \left( 1 - z^2 \right) \frac{dZ}{dz}
+    \right] + n(n+1) Z(z) = 0.
+  \end{equation}
+  So we rewrite the Legendre equations for $P_n(z)$ and $P_k(z)$:
+  \begin{align*}
+    \frac{d}{dz} \left[ 
+      \left( 1 - z^2 \right) \frac{dP_n}{dz}
+    \right] + n(n+1) P_n(z) &= 0,
+    &
+    \frac{d}{dz} \left[ 
+      \left( 1 - z^2 \right) \frac{dP_k}{dz}
+    \right] + k(k+1) P_k(z) &= 0,
+  \end{align*}
+  then we multiply the former by $P_k(z)$ and the latter by $P_n(z)$ and
+  subtract the two to get
+  \begin{equation*}
+    \frac{d}{dz} \left[ 
+      \left( 1 - z^2 \right) \frac{dP_n}{dz}
+    \right] P_k(z) + n(n+1) P_n(z) P_k(z)
+    -
+    \frac{d}{dz} \left[ 
+      \left( 1 - z^2 \right) \frac{dP_k}{dz}
+    \right] P_n(z) - k(k+1) P_k(z) P_n(z) = 0.
+  \end{equation*}
+  By grouping terms, making order and integrating with respect to $z$ from $-1$
+  to 1 we obtain
+  \begin{gather}
+    \int_{-1}^1 \left\{
+      \frac{d}{dz} \left[ 
+        \left( 1 - z^2 \right) \frac{dP_n}{dz}
+      \right] P_k(z) 
+      -
+      \frac{d}{dz} \left[ 
+        \left( 1 - z^2 \right) \frac{dP_k}{dz}
+      \right] P_n(z) - k(k+1) P_k(z) P_n(z)
+    \right\} \,dz \nonumber \\
+    + \left[ n(n+1) - k(k+1) \right] \int_{-1}^1 P_k(z) P_n(z) \, dz = 0.
+    \label{kugel:thm:legendre-poly-ortho:proof:1}
+  \end{gather}
+  Since by the product rule
+  \begin{equation*}
+    \frac{d}{dz} \left[ (1 - z^2) \frac{dP_k}{dz} P_n(z) \right]
+    =
+    \frac{d}{dz} \left[ (1 - z^2) \frac{dP_n}{dz} \right] P_k(z)
+      + (1 - z^2) \frac{dP_n}{dz} \frac{dP_k}{dz},
+  \end{equation*}
+  we can simplify the first term in
+  \eqref{kugel:thm:legendre-poly-ortho:proof:1} to get
+  \begin{gather*}
+    \int_{-1}^1 \left\{
+      \frac{d}{dz} \left[ (1 - z^2) \frac{dP_k}{dz} P_n(z) \right]
+        - \cancel{(1 - z^2) \frac{dP_n}{dz} \frac{dP_k}{dz}}
+        - \frac{d}{dz} \left[ (1 - z^2) \frac{dP_n}{dz} P_k(z) \right]
+        + \cancel{(1 - z^2) \frac{dP_k}{dz} \frac{dP_n}{dz}}
+    \right\} \, dz \\
+    = \int_{-1}^1 \frac{d}{dz} \left\{ (1 - z^2) \left[
+      \frac{dP_k}{dz} P_n(z) - \frac{dP_n}{dz} P_k(z)
+    \right] \right\} \, dz
+    = (1 - z^2) \left[
+      \frac{dP_k}{dz} P_n(z) - \frac{dP_n}{dz} P_k(z)
+    \right] \Bigg|_{-1}^1,
+  \end{gather*}
+  which always equals 0 because the product contains $1 - z^2$ and the bounds
+  are at $\pm 1$. Thus, of \eqref{kugel:thm:legendre-poly-ortho:proof:1} only
+  the second term remains and the equation becomes
+  \begin{equation*}
+    \left[ n(n+1) - k(k+1) \right] \int_{-1}^1 P_k(z) P_n(z) \, dz = 0.
+  \end{equation*}
+  By dividing by the constant in front of the integral we have our first result.
+  Now we need to show that when $n = k$ the integral equals $2 / (2n + 1)$.
+  % \begin{equation*}
+  % \end{equation*}
+  \kugeltodo{Finish proof. Can we do it without the generating function of
+  $P_n$?}
+\end{proof}
+
+In a similarly algebraically tedious fashion, we can also continue to check for
+orthogonality for the Ferrers functions $P^m_n(z)$, since they are related to
+$P_n(z)$ by a $m$-th derivative, and obtain the following result.
+
+\begin{lemma} For the associated Legendre functions
+  \label{kugel:thm:associated-legendre-ortho}
+  \begin{equation*}
+    \int_{-1}^1 P^m_n(z) P^{m'}_{n'}(z) \, dz
+    = \frac{2(m + n)!}{(2n + 1)(n - m)!} \delta_{nn'}
+    = \begin{cases}
+      \frac{2(m + n)!}{(2n + 1)(n - m)!} & \text{if } n = n', \\
+      0 & \text{otherwise}.
+    \end{cases}
+  \end{equation*}
+\end{lemma}
+\begin{proof}
+  \kugeltodo{Is it worth showing? IMHO no, it is mostly the same as Lemma
+  \ref{kugel:thm:legendre-poly-ortho} with the difference that the $m$-th
+  derivative is a pain to deal with.}
+\end{proof}
+
+An interesting fact to observe in lemma
+\ref{kugel:thm:associated-legendre-ortho} is that the orthogonality is only
+affected in the lower index, while varying $m$ only changes the constant in
+front of the Kronecker delta. By having the orthogonality relations of the
+Legendre functions we can finally show that spherical harmonics are also
+orthogonal.
+
+\begin{lemma} For the spherical harmonics
+  \kugeltodo{Fix horizontal spacing, inner product definition is missing.}
+  \label{kugel:thm:spherical-harmonics-ortho}
+  \begin{equation*}
+    \langle Y^m_n, Y^{m'}_{n'} \rangle
+    = \int_{-\pi}^\pi \int_0^{2\pi}
+      Y^m_n(\vartheta, \varphi) \overline{Y^{m'}_{n'}(\vartheta, \varphi)}
+      \sin \vartheta \, d\varphi \, d\vartheta
+    = \frac{-4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} \delta_{nn'}
+    = \begin{cases}
+      \frac{-4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} & \text{if } n = n', \\
+      0 & \text{otherwise}.
+    \end{cases}
+  \end{equation*}
+\end{lemma}
+\begin{proof}
+  We will begin by doing a bit of algebraic maipulaiton:
+  \begin{align*}
+    \int_{-\pi}^\pi \int_0^{2\pi}
+      Y^m_n(\vartheta, \varphi) \overline{Y^{m'}_{n'}(\vartheta, \varphi)}
+      \sin \vartheta \, d\varphi \, d\vartheta
+    &= \int_{-\pi}^\pi \int_0^{2\pi}
+      e^{im\varphi} P^m_n(\cos \vartheta)
+      e^{-im'\varphi} P^{m'}_{n'}(\cos \vartheta)
+      \, d\varphi \sin \vartheta \, d\vartheta
+    \\
+    &= \int_{-\pi}^\pi
+      P^m_n(\cos \vartheta) P^{m'}_{n'}(\cos \vartheta)
+      \int_0^{2\pi} e^{i(m - m')\varphi}
+      \, d\varphi \sin \vartheta \, d\vartheta
+      .
+  \end{align*}
+  First, notice that the associated Legendre polynomials are assumed to be real,
+  and are thus unaffected by the complex conjugation. Then, we can see that when
+  $m = m'$ the inner integral simplifies to $\int_0^{2\pi} 1 \, d\varphi$ which
+  equals $2\pi$, so in this case the expression becomes
+  \begin{equation*}
+    2\pi \int_{-\pi}^\pi
+      P^m_n(\cos \vartheta) P^{m'}_{n'}(\cos \vartheta)
+    \sin \vartheta \, d\vartheta
+    = -2\pi \int_{-1}^1 P^m_n(z) P^{m'}_{n'}(z) \, dz
+    = \frac{-4\pi(m + n)!}{(2n + 1)(n - m)!} \delta_{nn'},
+  \end{equation*}
+  where in the second step we performed the substitution $z = \cos\vartheta$;
+  $d\vartheta = \frac{d\vartheta}{dz} dz= - dz / \sin \vartheta$, and then we
+  used lemma \ref{kugel:thm:associated-legendre-ortho}. Now we just need look at
+  the case when $m \neq m'$. Fortunately this is easy: the inner integral is
+  $\int_0^{2\pi} e^{i(m - m')\varphi} d\varphi$, or in other words we are
+  integrating a complex exponetial over the entire period, which always results
+  in zero. Thus, we do not need to do anything and the proof is complete.
+\end{proof}
+
 \subsection{Normalization}
 
 \kugeltodo{Discuss various normalizations.}
@@ -403,8 +590,6 @@ Ora, visto che la soluzione dell'eigenfunction problem è formata dalla moltipli
 
 \section{Series Expansions in $C(S^2)$}
 
-\subsection{Orthogonality of $P_n$, $P^m_n$ and $Y^m_n$}
-
-\subsection{Series Expansion}
+\subsection{Spherical Harmonics Series}
 
 \subsection{Fourier on $S^2$}
-- 
cgit v1.2.1


From c3261041f9bcf77a90ee0aa3e2dc73bf71edb923 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Thu, 18 Aug 2022 17:23:40 +0200
Subject: kugel: Corrections in orthogonality

---
 buch/papers/kugel/spherical-harmonics.tex | 65 +++++++++++++++++++++++--------
 1 file changed, 49 insertions(+), 16 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 2a00754..4f393d4 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -220,7 +220,7 @@ and $\lambda = n(n+1)$, we obtain what is known in the literature as the
 \emph{associated Legendre equation of order $m$}:
 \nocite{olver_introduction_2013}
 \begin{equation} \label{kugel:eqn:associated-legendre}
-  (1 - z^2)\frac{d^2 Z}{dz}
+  (1 - z^2)\frac{d^2 Z}{dz^2}
   - 2z\frac{d Z}{dz}
   + \left( n(n + 1) - \frac{m^2}{1 - z^2} \right) Z(z) = 0,
   \quad
@@ -236,7 +236,7 @@ This reduces the problem because it removes the double pole, which is always
 tricky to deal with. In fact, the reduced problem when $m = 0$ is known as the
 \emph{Legendre equation}:
 \begin{equation} \label{kugel:eqn:legendre}
-  (1 - z^2)\frac{d^2 Z}{dz}
+  (1 - z^2)\frac{d^2 Z}{dz^2}
   - 2z\frac{d Z}{dz}
   + n(n + 1) Z(z) = 0,
   \quad
@@ -275,7 +275,7 @@ Further, there are a few more interesting but not very relevant forms to write
 $P_n(z)$ such as \emph{Rodrigues' formula} and \emph{Laplace's integral
 representation} which are
 \begin{equation*}
-  P_n(z) = \frac{1}{2^n} \frac{d^n}{dz^n} (x^2 - 1)^n,
+  P_n(z) = \frac{1}{2^n n!} \frac{d^n}{dz^n} (z^2 - 1)^n,
   \qquad \text{and} \qquad
   P_n(z) = \frac{1}{\pi} \int_0^\pi \left(
     z + \cos\vartheta \sqrt{z^2 - 1}
@@ -312,8 +312,8 @@ obtain the \emph{associated Legendre functions}.
   \label{kugel:def:ferrers-functions}
   The functions
   \begin{equation}
-    P^m_n (z) = \frac{1}{n!2^n}(1-z^2)^{\frac{m}{2}}\frac{d^{m}}{dz^{m}} P_n(z)
-      = \frac{1}{n!2^n}(1-z^2)^{\frac{m}{2}}\frac{d^{m+n}}{dz^{m+n}}(1-z^2)^n 
+    P^m_n (z) = (1-z^2)^{\frac{m}{2}}\frac{d^{m}}{dz^{m}} P_n(z)
+      = \frac{1}{2^n n!}(1-z^2)^{\frac{m}{2}}\frac{d^{m+n}}{dz^{m+n}}(1-z^2)^n 
   \end{equation}
   are known as Ferrers or associated Legendre functions.
 \end{definition}
@@ -486,7 +486,8 @@ $P_n(z)$ by a $m$-th derivative, and obtain the following result.
     \int_{-1}^1 P^m_n(z) P^{m'}_{n'}(z) \, dz
     = \frac{2(m + n)!}{(2n + 1)(n - m)!} \delta_{nn'}
     = \begin{cases}
-      \frac{2(m + n)!}{(2n + 1)(n - m)!} & \text{if } n = n', \\
+      \frac{2(m + n)!}{(2n + 1)(n - m)!}
+        & \text{if } n = n' \text{ and } m = m', \\
       0 & \text{otherwise}.
     \end{cases}
   \end{equation*}
@@ -497,16 +498,26 @@ $P_n(z)$ by a $m$-th derivative, and obtain the following result.
   derivative is a pain to deal with.}
 \end{proof}
 
-An interesting fact to observe in lemma
-\ref{kugel:thm:associated-legendre-ortho} is that the orthogonality is only
-affected in the lower index, while varying $m$ only changes the constant in
-front of the Kronecker delta. By having the orthogonality relations of the
-Legendre functions we can finally show that spherical harmonics are also
-orthogonal.
+By having the orthogonality relations of the Legendre functions we can finally
+show that spherical harmonics are also orthogonal under the following inner
+product:
 
-\begin{lemma} For the spherical harmonics
-  \kugeltodo{Fix horizontal spacing, inner product definition is missing.}
+\begin{definition}[Inner product in $S^2$]
+  For 2 complex valued functions $f(\vartheta, \varphi)$ and $g(\vartheta,
+  \varphi)$ on the surface of the sphere the inner product is defined to be
+  \begin{equation*}
+    \langle f, g \rangle
+    = \int_{-\pi}^\pi \int_0^{2\pi}
+      f(\vartheta, \varphi) \overline{g(\vartheta, \varphi)}
+      \sin \vartheta \, d\varphi \, d\vartheta.
+  \end{equation*}
+\end{definition}
+
+
+\begin{theorem} For the (unnormalized) spherical harmonics
   \label{kugel:thm:spherical-harmonics-ortho}
+  \kugeltodo{Why do I get a minus in front of $4\pi$??? It should not be there
+  right?}
   \begin{equation*}
     \langle Y^m_n, Y^{m'}_{n'} \rangle
     = \int_{-\pi}^\pi \int_0^{2\pi}
@@ -518,7 +529,7 @@ orthogonal.
       0 & \text{otherwise}.
     \end{cases}
   \end{equation*}
-\end{lemma}
+\end{theorem}
 \begin{proof}
   We will begin by doing a bit of algebraic maipulaiton:
   \begin{align*}
@@ -558,7 +569,29 @@ orthogonal.
 
 \subsection{Normalization}
 
-\kugeltodo{Discuss various normalizations.}
+At this point we have shown that the spherical harmonics form an orthogonal
+system, but in many applications we usually also want a normalization of some
+kind. For example the most obvious desirable property could be for the spherical
+harmonics to be ortho\emph{normal}, by which we mean that $\langle Y^m_n,
+Y^{m'}_{n'} \rangle = \delta_{nn'}$. To obtain orthonormality, we simply add a
+normalization factor in front of the previous definition
+\ref{kugel:def:spherical-harmonics} as follows.
+
+\begin{definition}[Orthonormal spherical harmonics]
+  \label{kugel:def:spherical-harmonics-orthonormal}
+  The functions
+  \begin{equation*}
+    Y^m_n(\vartheta, \varphi)
+    = \sqrt{\frac{2n + 1}{4\pi} \frac{(n-m)!}{(m+n)!}}
+      P^m_n(\cos \vartheta) e^{im\varphi}
+  \end{equation*}
+  where $m, n \in \mathbb{Z}$ and $|m| < n$ are the orthonormal spherical
+  harmonics.
+\end{definition}
+
+Orthornomality is very useful indeed, but it is not the only common
+normalization that is found in the literature. In physics, quantum mechanics to
+be more specific, it is common to use the so called Schmidt semi-normalization.
 
 \if 0
 As explained in the chapter \ref{}, the concept of orthogonality is very important and at the practical level it is very useful, because it allows us to develop very powerful techniques at the mathematical level.\newline 
-- 
cgit v1.2.1


From 6cc8d6c445305aa571f439d1945f53aac486ca72 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Fri, 19 Aug 2022 01:50:32 +0200
Subject: kugel: More corrections

---
 buch/papers/kugel/spherical-harmonics.tex | 45 ++++++++++++++++---------------
 1 file changed, 24 insertions(+), 21 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 4f393d4..9d055e0 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -394,7 +394,7 @@ will be our starting point.
   \end{equation*}
 \end{lemma}
 \begin{proof}
-  To start, consider the fact that that the Legendre equation
+  To start, consider the fact that the Legendre equation
   \eqref{kugel:eqn:legendre}, of which two distinct Legendre polynomials
   $P_n(z)$ and $P_k(z)$ are a solution ($n \neq k$), can be rewritten in the
   following form:
@@ -483,19 +483,19 @@ $P_n(z)$ by a $m$-th derivative, and obtain the following result.
 \begin{lemma} For the associated Legendre functions
   \label{kugel:thm:associated-legendre-ortho}
   \begin{equation*}
-    \int_{-1}^1 P^m_n(z) P^{m'}_{n'}(z) \, dz
+    \int_{-1}^1 P^m_n(z) P^{m}_{n'}(z) \, dz
     = \frac{2(m + n)!}{(2n + 1)(n - m)!} \delta_{nn'}
     = \begin{cases}
       \frac{2(m + n)!}{(2n + 1)(n - m)!}
-        & \text{if } n = n' \text{ and } m = m', \\
+        & \text{if } n = n', \\
       0 & \text{otherwise}.
     \end{cases}
   \end{equation*}
 \end{lemma}
 \begin{proof}
-  \kugeltodo{Is it worth showing? IMHO no, it is mostly the same as Lemma
-  \ref{kugel:thm:legendre-poly-ortho} with the difference that the $m$-th
-  derivative is a pain to deal with.}
+  \kugeltodo{Is this correct? And Is it worth showing? IMHO no, it is mostly the
+  same as Lemma \ref{kugel:thm:legendre-poly-ortho} with the difference that the
+  $m$-th derivative is a pain to deal with.}
 \end{proof}
 
 By having the orthogonality relations of the Legendre functions we can finally
@@ -507,7 +507,7 @@ product:
   \varphi)$ on the surface of the sphere the inner product is defined to be
   \begin{equation*}
     \langle f, g \rangle
-    = \int_{-\pi}^\pi \int_0^{2\pi}
+    = \int_{0}^\pi \int_0^{2\pi}
       f(\vartheta, \varphi) \overline{g(\vartheta, \varphi)}
       \sin \vartheta \, d\varphi \, d\vartheta.
   \end{equation*}
@@ -520,12 +520,12 @@ product:
   right?}
   \begin{equation*}
     \langle Y^m_n, Y^{m'}_{n'} \rangle
-    = \int_{-\pi}^\pi \int_0^{2\pi}
+    = \int_{0}^\pi \int_0^{2\pi}
       Y^m_n(\vartheta, \varphi) \overline{Y^{m'}_{n'}(\vartheta, \varphi)}
       \sin \vartheta \, d\varphi \, d\vartheta
-    = \frac{-4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} \delta_{nn'}
+    = \frac{4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} \delta_{nn'} \delta_{mm'}
     = \begin{cases}
-      \frac{-4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} & \text{if } n = n', \\
+      \frac{4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} & \text{if } n = n', \\
       0 & \text{otherwise}.
     \end{cases}
   \end{equation*}
@@ -533,15 +533,15 @@ product:
 \begin{proof}
   We will begin by doing a bit of algebraic maipulaiton:
   \begin{align*}
-    \int_{-\pi}^\pi \int_0^{2\pi}
+    \int_{0}^\pi \int_0^{2\pi}
       Y^m_n(\vartheta, \varphi) \overline{Y^{m'}_{n'}(\vartheta, \varphi)}
       \sin \vartheta \, d\varphi \, d\vartheta
-    &= \int_{-\pi}^\pi \int_0^{2\pi}
+    &= \int_{0}^\pi \int_0^{2\pi}
       e^{im\varphi} P^m_n(\cos \vartheta)
       e^{-im'\varphi} P^{m'}_{n'}(\cos \vartheta)
       \, d\varphi \sin \vartheta \, d\vartheta
     \\
-    &= \int_{-\pi}^\pi
+    &= \int_{0}^\pi
       P^m_n(\cos \vartheta) P^{m'}_{n'}(\cos \vartheta)
       \int_0^{2\pi} e^{i(m - m')\varphi}
       \, d\varphi \sin \vartheta \, d\vartheta
@@ -552,19 +552,22 @@ product:
   $m = m'$ the inner integral simplifies to $\int_0^{2\pi} 1 \, d\varphi$ which
   equals $2\pi$, so in this case the expression becomes
   \begin{equation*}
-    2\pi \int_{-\pi}^\pi
+    2\pi \int_{0}^\pi
       P^m_n(\cos \vartheta) P^{m'}_{n'}(\cos \vartheta)
     \sin \vartheta \, d\vartheta
-    = -2\pi \int_{-1}^1 P^m_n(z) P^{m'}_{n'}(z) \, dz
-    = \frac{-4\pi(m + n)!}{(2n + 1)(n - m)!} \delta_{nn'},
+    = -2\pi \int_{1}^{-1} P^m_n(z) P^{m'}_{n'}(z) \, dz
+    = \frac{4\pi(m + n)!}{(2n + 1)(n - m)!} \delta_{nn'},
   \end{equation*}
   where in the second step we performed the substitution $z = \cos\vartheta$;
   $d\vartheta = \frac{d\vartheta}{dz} dz= - dz / \sin \vartheta$, and then we
-  used lemma \ref{kugel:thm:associated-legendre-ortho}. Now we just need look at
-  the case when $m \neq m'$. Fortunately this is easy: the inner integral is
-  $\int_0^{2\pi} e^{i(m - m')\varphi} d\varphi$, or in other words we are
-  integrating a complex exponetial over the entire period, which always results
-  in zero. Thus, we do not need to do anything and the proof is complete.
+  used lemma \ref{kugel:thm:associated-legendre-ortho}. We are allowed to use
+  the lemma because $m = m'$.
+
+  Now we just need look at the case when $m \neq m'$. Fortunately this is easy:
+  the inner integral is $\int_0^{2\pi} e^{i(m - m')\varphi} d\varphi$, or in
+  other words we are integrating a complex exponetial over the entire period,
+  which always results in zero. Thus, we do not need to do anything and the
+  proof is complete.
 \end{proof}
 
 \subsection{Normalization}
-- 
cgit v1.2.1


From 4e29e512c4f4f0f1244cbe38c804e46bafda225d Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Fri, 19 Aug 2022 21:57:24 +0200
Subject: kugel: Corrections and normalizations

---
 buch/papers/kugel/spherical-harmonics.tex | 104 ++++++++++++++++++------------
 1 file changed, 63 insertions(+), 41 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 9d055e0..72f7402 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -493,9 +493,12 @@ $P_n(z)$ by a $m$-th derivative, and obtain the following result.
   \end{equation*}
 \end{lemma}
 \begin{proof}
-  \kugeltodo{Is this correct? And Is it worth showing? IMHO no, it is mostly the
-  same as Lemma \ref{kugel:thm:legendre-poly-ortho} with the difference that the
-  $m$-th derivative is a pain to deal with.}
+  To show that the expression equals zero when $n \neq n'$ we can perform
+  exactly the same steps as in the proof of lemma
+  \ref{kugel:thm:legendre-poly-ortho}, so we will not repeat them here and prove
+  instead only the case when $n = n'$.
+  \kugeltodo{Finish proof, or not? I have to look and decide if it is
+  interesting enough.}
 \end{proof}
 
 By having the orthogonality relations of the Legendre functions we can finally
@@ -516,19 +519,19 @@ product:
 
 \begin{theorem} For the (unnormalized) spherical harmonics
   \label{kugel:thm:spherical-harmonics-ortho}
-  \kugeltodo{Why do I get a minus in front of $4\pi$??? It should not be there
-  right?}
-  \begin{equation*}
+  \begin{align*}
     \langle Y^m_n, Y^{m'}_{n'} \rangle
-    = \int_{0}^\pi \int_0^{2\pi}
+    &= \int_{0}^\pi \int_0^{2\pi}
       Y^m_n(\vartheta, \varphi) \overline{Y^{m'}_{n'}(\vartheta, \varphi)}
       \sin \vartheta \, d\varphi \, d\vartheta
-    = \frac{4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} \delta_{nn'} \delta_{mm'}
+    \\
+    &= \frac{4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} \delta_{nn'} \delta_{mm'}
     = \begin{cases}
-      \frac{4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!} & \text{if } n = n', \\
+      \frac{4\pi}{2n + 1} \frac{(m + n)!}{(n - m)!}
+        & \text{if } n = n' \text{ and } m = m', \\
       0 & \text{otherwise}.
     \end{cases}
-  \end{equation*}
+  \end{align*}
 \end{theorem}
 \begin{proof}
   We will begin by doing a bit of algebraic maipulaiton:
@@ -563,38 +566,15 @@ product:
   used lemma \ref{kugel:thm:associated-legendre-ortho}. We are allowed to use
   the lemma because $m = m'$.
 
-  Now we just need look at the case when $m \neq m'$. Fortunately this is easy:
-  the inner integral is $\int_0^{2\pi} e^{i(m - m')\varphi} d\varphi$, or in
-  other words we are integrating a complex exponetial over the entire period,
-  which always results in zero. Thus, we do not need to do anything and the
-  proof is complete.
+  Now we just need look at the case when $m \neq m'$. Fortunately this is
+  easier: the inner integral is $\int_0^{2\pi} e^{i(m - m')\varphi} d\varphi$,
+  or in other words we are integrating a complex exponetial over the entire
+  period, which always results in zero. Thus, we do not need to do anything and
+  the proof is complete.
 \end{proof}
 
-\subsection{Normalization}
-
-At this point we have shown that the spherical harmonics form an orthogonal
-system, but in many applications we usually also want a normalization of some
-kind. For example the most obvious desirable property could be for the spherical
-harmonics to be ortho\emph{normal}, by which we mean that $\langle Y^m_n,
-Y^{m'}_{n'} \rangle = \delta_{nn'}$. To obtain orthonormality, we simply add a
-normalization factor in front of the previous definition
-\ref{kugel:def:spherical-harmonics} as follows.
-
-\begin{definition}[Orthonormal spherical harmonics]
-  \label{kugel:def:spherical-harmonics-orthonormal}
-  The functions
-  \begin{equation*}
-    Y^m_n(\vartheta, \varphi)
-    = \sqrt{\frac{2n + 1}{4\pi} \frac{(n-m)!}{(m+n)!}}
-      P^m_n(\cos \vartheta) e^{im\varphi}
-  \end{equation*}
-  where $m, n \in \mathbb{Z}$ and $|m| < n$ are the orthonormal spherical
-  harmonics.
-\end{definition}
-
-Orthornomality is very useful indeed, but it is not the only common
-normalization that is found in the literature. In physics, quantum mechanics to
-be more specific, it is common to use the so called Schmidt semi-normalization.
+\kugeltodo{Briefly mention that we could have skipped the tedious proofs by
+showing that the (associated) Legendre equation is a Sturm Liouville problem.}
 
 \if 0
 As explained in the chapter \ref{}, the concept of orthogonality is very important and at the practical level it is very useful, because it allows us to develop very powerful techniques at the mathematical level.\newline 
@@ -620,7 +600,49 @@ Inoltre, possiamo provare l'ortogonalità di $\Theta(\vartheta)$ utilizzando \eq
 Ora, visto che la soluzione dell'eigenfunction problem è formata dalla moltiplicazione di $\Phi_m(\varphi)$ e $P_{m,n}(x)$
 \fi
 
-\subsection{Properties}
+
+\subsection{Normalization and the Phase Factor}
+
+At this point we have shown that the spherical harmonics form an orthogonal
+system, but in many applications we usually also want a normalization of some
+kind. For example the most obvious desirable property could be for the spherical
+harmonics to be ortho\emph{normal}, by which we mean that $\langle Y^m_n,
+Y^{m'}_{n'} \rangle = \delta_{nn'}$. To obtain orthonormality, we simply add an
+ugly normalization factor in front of the previous definition
+\ref{kugel:def:spherical-harmonics} as follows.
+
+\begin{definition}[Orthonormal spherical harmonics]
+  \label{kugel:def:spherical-harmonics-orthonormal}
+  The functions
+  \begin{equation*}
+    Y^m_n(\vartheta, \varphi)
+    = \sqrt{\frac{2n + 1}{4\pi} \frac{(n-m)!}{(m+n)!}}
+      P^m_n(\cos \vartheta) e^{im\varphi}
+  \end{equation*}
+  where $m, n \in \mathbb{Z}$ and $|m| < n$ are the orthonormal spherical
+  harmonics.
+\end{definition}
+
+Orthornomality is very useful, but it is not the only common normalization that
+is found in the literature. In physics, geomagnetism to be more specific, it is
+common to use the so called Schmidt semi-normalization (or sometimes also called
+quasi-normalization).
+
+\begin{definition}[Schmidt semi-normalized spherical harmonics]
+  \label{kugel:def:spherical-harmonics-schmidt}
+  The Schmidt semi-normalized spherical harmonics are
+  \begin{equation*}
+    Y^m_n(\vartheta, \varphi)
+    = \sqrt{2 \frac{(n - m)!}{(n + m)!}}
+      P^m_n(\cos \vartheta) e^{im\varphi}
+  \end{equation*}
+  where $m, n \in \mathbb{Z}$ and $|m| < n$.
+\end{definition}
+
+However, for our purposes we will mostly only need the orthonormal spherical
+harmonics.  So from now on, unless specified otherwise, when we say spherical
+harmonics or write $Y^m_n$, we mean the orthonormal spherical harmonics of
+definition \ref{kugel:def:spherical-harmonics-orthonormal}.
 
 \subsection{Recurrence Relations}
 
-- 
cgit v1.2.1


From d2ae59bb9d2affc07bcb541d37a8f88fd009c167 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Sat, 20 Aug 2022 19:49:13 +0200
Subject: kugel: mention Condon-Shortley phase factor

---
 buch/papers/kugel/spherical-harmonics.tex | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 72f7402..5d394a9 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -639,8 +639,17 @@ quasi-normalization).
   where $m, n \in \mathbb{Z}$ and $|m| < n$.
 \end{definition}
 
-However, for our purposes we will mostly only need the orthonormal spherical
-harmonics.  So from now on, unless specified otherwise, when we say spherical
+Additionally, there is another quirk in the literature that should be mentioned.
+In some other branches of physics such as seismology there is a so called
+Condon-Shortley phase factor $(-1)^m$ in front of the square root in the
+definition of the normalized spherical harmonics. It is yet another
+normalization that is added for reasons that are not very relevant to our
+discussion, but we are mentioning its existence since many numerical packages
+(such as \texttt{SHTOOLS} \kugeltodo{Reference}) offer an option to add or
+remove it from the computation.
+
+Though, for our purposes we will mostly only need the orthonormal spherical
+harmonics, so from now on, unless specified otherwise when we say spherical
 harmonics or write $Y^m_n$, we mean the orthonormal spherical harmonics of
 definition \ref{kugel:def:spherical-harmonics-orthonormal}.
 
-- 
cgit v1.2.1


From f05ad8165a516c7932a8137a51b247484c38403b Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Sat, 20 Aug 2022 23:25:12 +0200
Subject: kugel: Orthogonality using Sturm-Liouville

---
 buch/papers/kugel/spherical-harmonics.tex | 92 +++++++++++++++++++++++++++----
 1 file changed, 82 insertions(+), 10 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 5d394a9..5a17b99 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -506,6 +506,7 @@ show that spherical harmonics are also orthogonal under the following inner
 product:
 
 \begin{definition}[Inner product in $S^2$]
+  \label{kugel:def:inner-product-s2}
   For 2 complex valued functions $f(\vartheta, \varphi)$ and $g(\vartheta,
   \varphi)$ on the surface of the sphere the inner product is defined to be
   \begin{equation*}
@@ -573,8 +574,51 @@ product:
   the proof is complete.
 \end{proof}
 
-\kugeltodo{Briefly mention that we could have skipped the tedious proofs by
-showing that the (associated) Legendre equation is a Sturm Liouville problem.}
+These proofs for the various orthogonality relations were quite long and
+algebraically tedious, mainly because they are ``low level'', by which we mean
+that they (arguably) do not rely on very abstract theory. However, if we allow
+ourselves to use the more abstract Sturm Liouville theory discussed in chapters
+\ref{buch:integrale:subsection:sturm-liouville-problem} and \kugeltodo{reference
+to chapter 17 of haddouche and Löffler} the proofs can become ridiculously
+short. Let's do for example lemma \ref{kugel:thm:associated-legendre-ortho}.
+
+\begin{proof}[
+    Shorter proof of lemma \ref{kugel:thm:associated-legendre-ortho}
+  ]
+  The associated Legendre polynomials, of which we would like to prove an
+  orthogonality relation, are the solution to the associated Legendre equation,
+  which we can write as $LZ(z) = 0$, where
+  \begin{equation*}
+    L = \frac{d}{dz} (1 - z^2) \frac{d}{dz}
+      + n(n+1) - \frac{m^2}{1 - z^2}.
+  \end{equation*}
+  Notice that $L$ is in fact a Sturm-Liouville operator of the form
+  \begin{equation*}
+    L = \frac{1}{w(z)} \left[
+        \frac{d}{dz} p(z) \frac{d}{dz} - \lambda + q(z)
+      \right],
+  \end{equation*}
+  if we let $w(z) = 1$, $p(z) = (1 - z^2 )$, $q(z) = -m^2 / (1 - z^2)$, and
+  $\lambda = -n(n+1)$. By the theory of Sturm-Liouville operators, we know that
+  the each solution of the problem $LZ(z) = 0$, namely $P^m_n(z)$, is orthogonal
+  to every other solution that has a different $\lambda$. In our case $\lambda$
+  varies with $n$, so $P^m_n(z)$ with different $n$'s are orthogonal to each
+  other.
+\end{proof}
+
+But that was still rather informative and had a bit of explanation, which is
+terrible. Real snobs, such as Wikipedia contributors, some authors and sometimes
+regrettably even ourselves, would write instead:
+
+\begin{proof}[
+    Pretentiously short proof of lemma \ref{kugel:thm:associated-legendre-ortho}
+  ]
+  The associated Legendre polynomials are solutions of the associated Legendre
+  equation which is a Sturm-Liouville problem and are thus orthogonal to each
+  other. The factor in front Kronecker delta is left as an exercise to the
+  reader.
+\end{proof}
+
 
 \if 0
 As explained in the chapter \ref{}, the concept of orthogonality is very important and at the practical level it is very useful, because it allows us to develop very powerful techniques at the mathematical level.\newline 
@@ -640,13 +684,13 @@ quasi-normalization).
 \end{definition}
 
 Additionally, there is another quirk in the literature that should be mentioned.
-In some other branches of physics such as seismology there is a so called
-Condon-Shortley phase factor $(-1)^m$ in front of the square root in the
-definition of the normalized spherical harmonics. It is yet another
-normalization that is added for reasons that are not very relevant to our
-discussion, but we are mentioning its existence since many numerical packages
-(such as \texttt{SHTOOLS} \kugeltodo{Reference}) offer an option to add or
-remove it from the computation.
+In some other branches of physics such as seismology and quantum mechanics there
+is a so called Condon-Shortley phase factor $(-1)^m$ in front of the square root
+in the definition of the normalized spherical harmonics. It is yet another
+normalization that is added for physical reasons that are not very relevant to
+our discussion, but mention its existence this potential source of confusion
+since many numerical packages (such as \texttt{SHTOOLS} \kugeltodo{Reference})
+offer an option to add or remove it from the computation.
 
 Though, for our purposes we will mostly only need the orthonormal spherical
 harmonics, so from now on, unless specified otherwise when we say spherical
@@ -655,8 +699,36 @@ definition \ref{kugel:def:spherical-harmonics-orthonormal}.
 
 \subsection{Recurrence Relations}
 
-\section{Series Expansions in $C(S^2)$}
+\section{Series Expansions in $L^2(S^2)$}
+
+We have now reached a point were we have all of the tools that are necessary to
+build something truly amazing: a general series expansion formula for functions
+on the surface of the sphere. Using the jargon: we will now see that the
+spherical harmonics together with the inner product of definition
+\ref{kugel:def:inner-product-s2}
+\begin{equation*}
+  \langle f, g \rangle
+  = \int_{0}^\pi \int_0^{2\pi}
+    f(\vartheta, \varphi) \overline{g(\vartheta, \varphi)}
+    \sin \vartheta \, d\varphi \, d\vartheta
+\end{equation*}
+form a Hilbert space over the space of complex valued $L^2$ functions $S^2 \to
+\mathbb{C}$. We will see later that this fact is very consequential and is
+extremely useful for many types of applications. If the jargon was too much, no
+need to worry, we will now go back to normal words and explain it again in more
+detail.
 
 \subsection{Spherical Harmonics Series}
 
+To talk about a \emph{series expansion} we first need a series, so we shall
+build one using the spherical harmonics.
+
+\begin{definition}[Spherical harmonic series]
+  \begin{equation*}
+    \hat{f}(\vartheta, \varphi) 
+    = \sum_{n \in \mathbb{Z}} \sum_{m \in \mathbb{Z}}
+      c_{m,n} Y^m_n(\vartheta, \varphi)
+  \end{equation*}
+\end{definition}
+
 \subsection{Fourier on $S^2$}
-- 
cgit v1.2.1


From 63dee97e79f65a967f7d6b34bb8141ccaa226e20 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Sat, 20 Aug 2022 23:40:29 +0200
Subject: kugel: Minor corrections

---
 buch/papers/kugel/spherical-harmonics.tex | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 5a17b99..54c8fa9 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -607,11 +607,11 @@ short. Let's do for example lemma \ref{kugel:thm:associated-legendre-ortho}.
 \end{proof}
 
 But that was still rather informative and had a bit of explanation, which is
-terrible. Real snobs, such as Wikipedia contributors, some authors and sometimes
-regrettably even ourselves, would write instead:
+terrible. Real snobs, such as Wikipedia contributors, some authors and
+regrettably sometimes even ourselves, would write instead:
 
 \begin{proof}[
-    Pretentiously short proof of lemma \ref{kugel:thm:associated-legendre-ortho}
+    Infuriatingly short proof of lemma \ref{kugel:thm:associated-legendre-ortho}
   ]
   The associated Legendre polynomials are solutions of the associated Legendre
   equation which is a Sturm-Liouville problem and are thus orthogonal to each
@@ -688,9 +688,9 @@ In some other branches of physics such as seismology and quantum mechanics there
 is a so called Condon-Shortley phase factor $(-1)^m$ in front of the square root
 in the definition of the normalized spherical harmonics. It is yet another
 normalization that is added for physical reasons that are not very relevant to
-our discussion, but mention its existence this potential source of confusion
-since many numerical packages (such as \texttt{SHTOOLS} \kugeltodo{Reference})
-offer an option to add or remove it from the computation.
+our discussion, but we mention this potential source of confusion since many
+numerical packages (such as \texttt{SHTOOLS} \kugeltodo{Reference}) offer an
+option to add or remove it from the computation.
 
 Though, for our purposes we will mostly only need the orthonormal spherical
 harmonics, so from now on, unless specified otherwise when we say spherical
-- 
cgit v1.2.1


From 288eb54f5089c48177434757b083309e05e30bf2 Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Sun, 21 Aug 2022 11:48:48 +0200
Subject: kugel: More on Sturm-Liouville

---
 buch/papers/kugel/spherical-harmonics.tex | 42 ++++++++++++-------------------
 1 file changed, 16 insertions(+), 26 deletions(-)

(limited to 'buch/papers/kugel/spherical-harmonics.tex')

diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex
index 54c8fa9..bff91ef 100644
--- a/buch/papers/kugel/spherical-harmonics.tex
+++ b/buch/papers/kugel/spherical-harmonics.tex
@@ -107,7 +107,7 @@ the surface of the unit sphere.
 Now that we have defined an operator, we can go and study its eigenfunctions,
 which means that we would like to find the functions $f(\vartheta, \varphi)$
 that satisfy the equation
-\begin{equation} \label{kuvel:eqn:eigen}
+\begin{equation} \label{kugel:eqn:eigen}
     \surflaplacian f = -\lambda f.
 \end{equation}
 Perhaps it may not be obvious at first glance, but we are in fact dealing with a
@@ -619,31 +619,21 @@ regrettably sometimes even ourselves, would write instead:
   reader.
 \end{proof}
 
-
-\if 0
-As explained in the chapter \ref{}, the concept of orthogonality is very important and at the practical level it is very useful, because it allows us to develop very powerful techniques at the mathematical level.\newline 
-Throughout this book we have been confronted with the Sturm-Liouville theory (see chapter \ref{}). The latter, among other things, carries with it the concept of orthogonality. Indeed, if we consider the solutions of the Sturm-Liouville equation, which can be expressed in this form
-\begin{equation}\label{kugel:eq:sturm_liouville}
-    \mathcal{S}f := \frac{d}{dx}\left[p(x)\frac{df}{dx}\right]+q(x)f(x)
-\end{equation}
-possiamo dire che formano una base ortogonale.\newline
-Adesso possiamo dare un occhiata alle due equazioni che abbiamo ottenuto tramite la Separation Ansatz (Eqs.\eqref{kugel:eq:associated_leg_eq}\eqref{kugel:eq:ODE_1}), le quali possono essere riscritte come:
-\begin{align*}
-    \frac{d}{dx} \left[ (1-x^2) \cdot \frac{dP_{m,n}}{dx} \right] &+ \left(n(n+1)-\frac{m}{1-x^2} \right) \cdot P_{m,n}(x) = 0, \\
-    \frac{d}{d\varphi} \left[ 1 \cdot \frac{ d\Phi }{d\varphi} \right] &+ 1 \cdot \Phi(\varphi) = 0. 
-\end{align*}
-Si può concludere in modo diretto che sono due casi dell'equazione di Sturm-Liouville. Questo significa che le loro soluzioni sono ortogonali sotto l'inner product con weight function $w(x)=1$, dunque:
-\begin{align}
-\int_{0}^{2\pi} \Phi_m(\varphi)\Phi_m'(\varphi) d\varphi &= \delta_{m'm}, \nonumber \\
-\int_{-1}^1 P_{m,m'}(x)P_{n,n'}(x) dx &= \delta_{m'm}\delta_{n'n}. \label{kugel:eq:orthogonality_associated_func}
-\end{align}
-Inoltre, possiamo provare l'ortogonalità di $\Theta(\vartheta)$ utilizzando \eqref{kugel:eq:orthogonality_associated_func}:
-\begin{align}
-    x
-\end{align}
-Ora, visto che la soluzione dell'eigenfunction problem è formata dalla moltiplicazione di $\Phi_m(\varphi)$ e $P_{m,n}(x)$
-\fi
-
+Lemma \ref{kugel:thm:legendre-poly-ortho} has a very similar
+proof, while the theorem \ref{kugel:thm:spherical-harmonics-ortho} for the
+spherical harmonics is proved by the following argument. The spherical harmonics
+are the solutions to the eigenvalue problem $\surflaplacian f = -\lambda f$,
+which as discussed in the previous section is solved using separation. So to
+prove their orthogonality using the Sturm-Liouville theory we argue that
+\begin{equation*}
+  \surflaplacian = L_\vartheta L_\varphi \iff
+  \surflaplacian f(\vartheta, \varphi)
+    = L_\vartheta \Theta(\vartheta) L_\varphi \Phi(\varphi),
+\end{equation*}
+then we show that both $L_\vartheta$ and $L_\varphi$ are both Sturm-Liouville
+operators (we just did the former in the shorter proof above). Since both are
+Sturm-Liouville operators their combination, the surface spherical Laplacian, is
+also a Sturm-Liouville operator, which then implies orthogonality.
 
 \subsection{Normalization and the Phase Factor}
 
-- 
cgit v1.2.1

