# Legendre Differential Equation
The Legendre differential equation is an equation that takes the following form:
\begin{equation}
\frac{d}{dx}\left[(1-x^2)\frac{dy}{dx}\right] + \ell(\ell+1)y = 0
\end{equation}
### Power series solution
By using power series method, one can show that the equation has the following linearly independent solutions if there is no restrictions:
\begin{equation}
\begin{cases}
y_1(x)= x - \dfrac{(\ell-1)(\ell+2)}{3!}x^3 + \dfrac{(\ell-1)(\ell+2)(\ell-3)(\ell+4)}{5!}x^5 + \cdots\\
y_2(x)= 1 - \dfrac{\ell(\ell+1)}{2!} x^2+ \dfrac{\ell(\ell+1)(\ell-2)(\ell+3)}{4!} x^4 + \cdots
\end{cases}
\end{equation}
Where the coefficients are given by the following recurrence relationship:
\begin{equation}
a_{n+2} = \frac{(n-\ell)(n-\ell+1)}{(n+1)(n+2)} a_n
\end{equation}
### Convergence properties
#### Ratio test
We would like to study the convergence properties of the solutions because no diverging solution is physical
First of all, let's try to apply ratio test:
Ratio test tells us that the radius of convergence is:
\begin{align*}
\lim_{n\to\infty}\left|\frac{a_{n+2}\,x^2}{a_n}\right| = |x^2| < 1
\end{align*}
Hence the series converges when $|x|<1$ but the convergence at $x=\pm 1$ is inconclusive
However, we would also like to study the convergence at $|x|=1$ because many time the legendre equation arises when solving laplace equation in spherical coordinates with $x=\cos \theta$ and those values corresponds to the poles. To do that, we use the Gauss test
#### Gauss test
The gauss test stated that if the coefficients of the series $a_n$ are all larger than zero, then write the ratio of coefficients in the following form:
\begin{align*}
\frac{a_n}{a_{n+1}} = 1 + \frac{h}{n} + \frac{B(n)}{n^2}
\end{align*}
Then the series converges if and only if $h>1$
Note that although the first few terms of $a_n$ might be negative, the coefficients are all positive once $n> \ell$. So the test can be safely applied.
By manipulating the terms a bit, one can show that at $x=\pm1$:
\begin{align*}
\frac{a_n}{a_{n+2}x^2} = \frac{a_n}{a_{n+2}} = 1 + \frac{1}{n} + O\left(\frac{1}{n^2}\right)
\end{align*}
Hence the series diverges if it does not terminate
Therefore, if we require $y_1$ or $y_2$ to be finite at $x=\pm 1$, we $\ell$ must be integers, and the solutions satisfying such boundary conditions are given by the unnormalized legendre polynomial $P_\ell(x)$