% vim:ts=2 sw=2 et spell tw=80: \section{Long Proofs} Here, we will give the long and tedious proofs we skipped earlier. \subsection{Legendre Polynomials} \label{kugel:sec:proofs:legendre} \begin{proof}[Proof of lemma \ref{kugel:thm:legendre-poly}] It was stated that the polynomial function \begin{equation*} 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} \end{equation*} is the only finite solution of the Legendre equation \begin{equation} \label{kugel:eqn:legendre-bis} (1 - z^2)\frac{d^2 Z}{dz^2} - 2z\frac{d Z}{dz} + n(n + 1) Z(z) = 0, \end{equation} when $n \in \mathbb{Z}$ and $z \in [-1; 1]$. In order to prove this fact, we begin with the power series \emph{Ansatz} \begin{equation*} Z(x) = \sum_{k=0}^\infty a_k z^k, \quad\text{from which follows that}\quad \frac{dZ}{dz} = \sum_{k=0}^\infty k a_k z^{k-1}, \qquad \frac{d^2 Z}{dz^2} = \sum_{k=0}^\infty k (k-1) a_k z^{k-2}. \end{equation*} Since the power series method converges only up to the nearest singularity, which is at $z=1$ (and $z=-1$), we shall remark that we will find a solution only for $|z|<1$. The Legendre equation \eqref{kugel:eqn:legendre-bis} can be therefore rewritten as \begin{align} 0 &= (1-z^2) \sum_{k=0}^\infty k (k-1) a_k z^{k-2} - 2z\sum_{k=0}^\infty k a_k z^{k-1} + n(n+1)\sum_{k=0}^\infty a_k z^k \nonumber \\ &= \sum_{k=0}^\infty k (k-1) a_k z^{k-2} - \sum_{k=0}^\infty k (k-1) a_k z^{k} - 2z\sum_{k=0}^\infty k a_k z^{k-1} + n(n+1)\sum_{k=0}^\infty a_k z^k. \label{kugel:eqn:legendre-ansatz} \end{align} Considers that by shifting the index $k$ in the sum of first term \begin{equation*} \sum_{k=0}^\infty k (k-1) a_k z^{k-2} = \sum_{k=-2}^\infty (k+2)(k+1) a_{k+2} z^k = \sum_{k=0}^\infty (k+2)(k+1) a_k z^k, \end{equation*} since when $k = -1$ or $-2$ the summand is zero. This means that \eqref{kugel:eqn:legendre-ansatz} becomes \begin{align*} \sum_{k=0}^\infty &(k+1)(k+2) a_{k+2} z^{k} - \sum_{k=0}^\infty k (k-1) a_k z^{k} - 2\sum_{k=0}^\infty k a_k z^k + n(n+1)\sum_{k=0}^\infty a_k z^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] z^k \stackrel{!}{=} 0, \end{align*} which is equivalent to saying that \begin{equation*} (k+1)(k+2) a_{k+2} - k (k-1) a_k - 2 k a_k + n(n+1) a_k = 0, \end{equation*} so we can derive a recurrence relation for $a_{k+2}$: \begin{equation} \label{kugel:eqn:coeff-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} Following the relation \eqref{kugel:eqn:coeff-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 &= \left( -\frac{(n-4)(5+n)}{6 \cdot 5} \right) \left( -\frac{(n-2)(n+3)}{4 \cdot 3} \right) a_2 \\ &= \left( -\frac{(n-4)(n+5)}{6 \cdot 5} \right) \left( -\frac{(n-2)(n+3)}{4 \cdot 3} \right) \left( -\frac{n(n+1)}{2 \cdot 1} \right) 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 ($i = 2k$) coefficient and obtain \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*} and a similar expression can also be written for the odd coefficients $a_{2k-1}$. In the latter case, the equation starts from $a_1$ and to find the pattern we can write the recursion for an odd coefficient, for example for $a_7$: \begin{align*} a_{7} = -\frac{(n-5)(n+6)}{7\cdot 6} a_5 &= \left( -\frac{(n-5)(n+6)}{7 \cdot 6} \right) \left( -\frac{(n-3)(n+4)}{5 \cdot 4} \right) a_3 \\ &= \left( -\frac{(n-5)(n+6)}{7 \cdot 6} \right) \left( -\frac{(n-3)(n+4)}{5 \cdot 4} \right) \left( -\frac{(n-1)(n+2)}{3 \cdot 2} \right) 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 ($i = 2k+1$) coefficient and get \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*} Now, if we let \begin{align*} Z_\text{e}^K(z) &:= \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)!} z^{2k}, \\ Z_\text{o}^K(z) &:= \sum_{k=0}^K(-1)^k \frac{ (n + 2k)(n+2k-2)\hdots \color{blue} (n-(2k-1)+2)(n-(2k-1)) }{(2k+1)!} z^{2k+1}, \end{align*} the solution to the Legendre equation \eqref{kugel:eqn:legendre-bis} can be written as \begin{equation}\label{eq:solution} Z(z) = \lim_{K \to \infty} \left[ a_0 Z_\text{e}^K(z) + a_1 Z_\text{o}^K(z) \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} \subsection{Associated Legendre Equation} \label{kugel:sec:proofs:associated-legendre} \begin{lemma}\label{kugel:lemma:sol_associated_leg_eq} If $Z_n(z)$ is a solution of the Legendre equation \eqref{kugel:eqn:legendre}, then \begin{equation*} P^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}. \end{lemma} % \begin{proof} [TODO: modificare la $m$ (è già usata come costante di separazione) o forse è giusta (?)] \begin{proof} 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} \subsection{Orthogonality}