# Recursion relation for the Legendre equation

I am studying Quantum mechanics and in particular angular momentum. At one point, one needs to solve a DE (the Legendre equation) in power series to get a recursion relation (Legendre polynomials). Consider the Legendre differential equation:

$$\frac{d}{dx}((1-x^2)\frac{dP_l}{dx}) +l(l+1) P_l = 0$$

We attempt a power series solution with the form $$P_l(x) = \sum_0^{\infty} a_k x^k$$. The recursion relation is supposed to give $$\frac{a_{k+2}}{a_k}=-\frac{l(l+1)-k(k+1)}{(k+1)(k+2)}$$. Substituting the series into the equation we get:

$$\frac{d}{dx}((1-x^2)\frac{d}{dx}\sum_{k=0}^{\infty} a_k x^k) +l(l+1)\sum_{k=0}^{\infty} a_k x^k = 0$$

Performing the first derivative and multiplying by $$1-x^2$$: $$\frac{d}{dx}(\sum_{k=1}^{\infty} ka_k x^{k-1}-ka_k x^{k+1}) +\sum_{k=0}^{\infty}l(l+1) a_k x^k = 0$$ Take the remaining derivative: $$\sum_{k=2}^{\infty} (k(k-1)a_k x^{k-2}-k(k+1)a_k x^{k})+\sum_{k=0}^{\infty}l(l+1) a_k x^k=0$$ Now we need to shift the lower bounds of the first sum. For the first term do a substitution $$k'\rightarrow k-2$$ and for the second one, the only off term will be a term $$2a_1x$$. Thus:

$$\sum_{k=0}^{\infty} [(k+1)(k+2)a_{k+2}-k(k+1)a_k+l(l+1) a_k ]x^k +2a_1 x= 0$$

If the off-term $$2a_1 x$$ weren't there, then demanding each coefficient of $$x^k$$ to vanish for the equation to hold would give the desired recursion relation. However, since it is there, the recursion would not be correct for odd $$k$$ values. Which step of the substitution into the equation is wrong?

Looking at the recursion relation obtained through assuming a series solution, we have that;

$$c_{n+2}=\frac{-(l-n)(l+n+1)}{(n+2)(n+1)}c_n$$

Taking a look at the first few terms $$n=0,1,..,6$$;

$$c_2=\frac{-l(l+1)}{2*1}c_0,$$ $$c_4=\frac{(-1)^2l(l+1)(l-2)(l+3)}{4*3*2*1}c_0,$$ $$c_6=\frac{(-1)^3l(l+1)(l-2)(l+3)(l-4)(l+5)}{6*5*4*3*2*1}c_0$$

$$c_3=\frac{-(l-1)(l+2)}{3*2}c_1,$$ $$c_5=\frac{(-1)^2(l-1)(l+2)(l-3)(l+4)}{5*4*3*2*1}c_1,$$ $$c_7=\frac{(-1)^3(l-1)(l+2)(l-3)(l+4)(l-5)(l+6)}{7*6*5*4*3*2*1}c_1$$

And we may observe that;

$$c_{2n}=\frac{(-1)^nl(l+1)(l-2)...(l-n)(l+n+1)}{(2n)!}c_0$$

$$c_{2n+1}=\frac{(-1)^n(l-1)(l+2)(l-3)...(l-n)(l+n+1)}{(2n+1)!}c_1$$

We may therefore write the series solution as;

$$\sum_{n=0}^{\infty} c_nx^n = \sum_{n=0}^{\infty} c_{2n}x^{2n}+\sum_{n=0}^{\infty} c_{2n+1}x^{2n+1}$$

Also notice that for $$l=2k$$ where $$k=0,1,2..$$ the sequence $$c_{2n}$$ will terminate at a finite number of terms for $$n=k$$ (or equivalently $$l=n$$) and the sequence for $$c_{2n+1}$$ will not terminate and contain infinitely many terms. Thus to satisfy the requirement that our solution be finite, for even $$l$$ we require $$c_1=0$$

Similarly, for $$l=2k+1$$ where $$k=0,1,2..$$ the sequence $$c_{2n+1}$$ will terminate at a finite number of terms for $$n=k$$ (or equivalently $$l=n$$) and the sequence for $$c_{2n}$$ will not terminate and contain infinitely many terms. Thus to satisfy the requirement that our solution be finite, for odd $$l$$ we require $$c_0=0$$

Taking these into account, before substituting into the equation, you should express the solution as a sum of series with even and odd indexed coefficients respectively. From here, depending on your choice of even or odd $$l$$, one series will be zero and the other series should satisfy the substitution.