Solution to Legendre's Differential Equation

Equation
Legendre's differential equation is a second order ODE of the form:
 * $\displaystyle \left({1 - x^2}\right) \frac{\mathrm d^2 y} {\mathrm d x^2} - 2 x \frac{\mathrm d y} {\mathrm d x} + p \left({p + 1}\right) y = 0$

The parameter $p$ may be any arbitrary real or complex number.

Solution
The solution of the Legendre Differential Equation can be obtained by Power Series Solution method.

Let:
 * $\displaystyle y = \sum_{n \mathop = 0}^\infty a_n x^{k - n}$

such that:
 * $a_0 \ne 0$

Differentating $x$:


 * $\displaystyle \dot y = \sum_{n \mathop = 0}^\infty a_n \left({k - n}\right) x^{k - n - 1}$


 * $\displaystyle \ddot y = \sum_{n \mathop = 0}^\infty a_n \left({k - n}\right) \left({k - n - 1}\right) x^{k - n - 2}$

Substituting in the original equation:

The summations are dependent upon $n$ and not $x$.

Therefore it is a valid operation to multiply the $x$'s into the summations, thus:

Increasing the summation variable $n$ to $n + 2$:

Taking the first 2 terms of the second summation out:

Equating each term to $0$:

Take equation $(1)$:
 * $a_0 x^k \left({p \left({p + 1}\right) - k \left({k + 1}\right)}\right) = 0$

It is assumed that $a_0 \ne 0$ and $x^k$ can never be zero for any value of $k$.

Thus:

Take equation $(2)$:
 * $a_1 x^{k - 1} \left({p \left({p + 1}\right) - k \left({k - 1}\right)}\right) = 0$

As before, it is assumed that $x^{k - 1}$ can never be zero for any value of $k$.

Thus:

Take equation $(3)$:
 * $\displaystyle \sum_{n \mathop = 2}^\infty x^{k - n} \left({a_{n - 2} \left({k - n - 2}\right) \left({k - n + 1}\right) + a_n \left({p \left({p + 1}\right) - \left({k - n}\right) \left({k - n + 1}\right)}\right)}\right) = 0$

As before, it is assumed that $x^{k - n}$ can never be zero for any value of $k$.

Thus:

Since Legendre's Differential Equation is a second order ODE, it has two independent solutions.

Solution 1 (for $k = p$)
Thus:

Similarly:

Also:
 * $a_3 = a_5 = a_7 = \dotsb = a_{2 n + 1} = a_1 = 0$

Substituting for $a_n$:

Solution 2 (for $k = p - 1$)
Thus:

Similarly:

Also:
 * $a_3 = a_5 = a_7 = \dotsb = a_{2 n + 1} = a_1 = 0$

$\displaystyle y= a_0 x^{ -k-1 }\left[ 1+\frac { \left({p + 1}\right) \left({p + 2}\right)}{ 2 \left({2 p + 3}\right) } x^{ -2 }+\frac { \left({p + 1}\right) \left({p + 2}\right) \left({p + 3}\right) \left({p + 4}\right)}{ 2\cdot 4 \left({2 p + 3}\right) \left({2 p + 5}\right)} x^{ -4 }+\dots +{ (-1) }^n \frac { \left({p + 1}\right) \left({p + 2}\right) \left({p + 3}\right)...(p+2n) }{ \{ 2\cdot 4\cdot 6\dots 2n\} \left({2 p + 3}\right) \left({2 p + 5}\right)\dots (p-2n) } x^{ -2n }+\dots \right]$

Finally the two solution are,

$\displaystyle\Rightarrow y = a_0 x^k \left[ 1+\frac { -p \left({p - 1}\right) }{ 2 \left({2 p - 1}\right) } x^{ -2 }+\frac { p \left({p - 1}\right) \left({p - 2}\right) \left({p - 3}\right) }{ 2\cdot 4 \left({2 p - 1}\right) \left({2 p - 3}\right) } x^{ -4 }+\dots +{ (-1) }^n \frac { -p \left({p - 1}\right) \left({p - 2}\right)...(p-2n+1) }{ \{ 2\cdot 4\cdot 6\dots 2n\} \left({2 p - 1}\right) \left({2 p - 3}\right)\dots (p-2n+1) } x^{ -2n }+\dots  \right] $

and,

$\displaystyle y = a_0 x^{ -k-1 }\left[ 1+\frac { \left({p + 1}\right) \left({p + 2}\right) }{ 2 \left({2 p + 3}\right)} x^{ -2 }+\frac { \left({p + 1}\right) \left({p + 2}\right) \left({p + 3}\right) \left({p + 4}\right)}{ 2\cdot 4 \left({2 p + 3}\right) \left({2 p + 5}\right)} x^{ -4 }+\dots +{ (-1) }^n \frac { \left({p + 1}\right) \left({p + 2}\right) \left({p + 3}\right)...(p+2n) }{ \{ 2\cdot 4\cdot 6\dots 2n\} \left({2 p + 3}\right) \left({2 p + 5}\right)\dots (p-2n) } x^{ -2n }+\dots \right]$

Also presented as
Legendre's differential equation can also be written in the form:


 * $\left({1 - x^2}\right) \ddot y - 2 x \dot y + p \left({p + 1}\right) y = 0$

Also see
The solutions of Legendre's Differential Equation are known as Legendre polynomials, which are functions of the parameter $p$.