First derivative of Legendre Polynomial

legendre polynomialsquadrature

Legendre polynomials ($P_n$) are defined as a particular solution to the ODE.
$$(1-x^2)P_n^{''}-2xP_n^{'}+n(n+1)P_n=0$$

It is expressed by Rodrigues’ formula.
$$P_n=\frac{1}{2^nn!}\frac{d^n}{dx^n}((x^2-1)^n)$$

I was given this formula for its first derivative (yet to prove).

$$P_n^{'}=\frac{n(P_{n-1}-xP_n)}{1-x^2}$$

Tried to tackle this starting from the Bonnet recursion formula,

$$(n+1)P_n=(2n+1)xP_n-nP_{n-1}$$

and Rodrigues’ formula with generalized binomial theorem for derivatives. But didn't get any meaningful results. I'm not quite familiar with the generating function for Legendre polynomials. Maybe it is useful here (hindsight: turns out it does).

The Rodrigues’ formula and the recursion formula both have well formulated proofs online, but it seems like it is not the case for the derivative formula. I would like to know how could it be proven. Thanks in advance.

Edit:
Saw a slick proof for another formula $nP_n(x)=x{P_n^\prime(x)} – P^\prime_{n-1}(x)$ by generating function of Legendre polynomials. It goes like:

If $f(x,t)=\sum P_n(x)t^n=(1-2tx+t^2)^{-1/2}$ is the generating function then you want to show that
$$t\frac{\partial}{\partial t}f=x\frac{\partial}{\partial x}f-t\frac{\partial}{\partial x}f$$
and it is true:
$$(t\frac{\partial}{\partial t}+(t-x)\frac{\partial}{\partial x})(1-2tx+t^2)=0.$$

Credit to user8268. I replaced the $(1-2tx+t^2)$ with $(1-2tx+t^2)^{-\frac{1}{2}}$. The result also turned out true. I tried to prove my formula here in a similar manner, but didn't quite work out.

Best Answer

Differentiating the generating function $$ g(x,t)=(1-2xt+t^2)^{-1/2}=\sum_{n=0}^\infty P_n(x)t^n,\ |t|<1 $$ with respect to $x$, one has $$ \frac{\partial g(x,t)}{\partial x}=\frac{t}{(1-2xt+t^2)^{3/2}}=\sum_{n=0}^\infty P_n’(x)t^n. $$ From this we obtain $$ (1-2xt+t^2)\sum_{n=0}^\infty P_n’(x)t^n-t\sum_{n=0}^\infty P_n(x)t^n=0 $$ which leads to $$P_{n+1}’(x)+P_{n-1}’(x)=2xP_n’(x)+P_n(x)\tag 1$$ Differentiating the following recurrence relation (Bonnet’s recursion formula) $$ (2n+1)xP_n(x)=(n+1)P_{n+1}(x)+nP_{n-1}(x)\tag 2 $$ with respect to $x$, and adding 2 times $\frac{\operatorname{d}}{\operatorname{d}x}$(2) to $(2n+1)$ times (1), we get $$ (2n+1)P_n=P_{n+1}’(x)-P_{n-1}’(x).\tag 3 $$ $\frac{1}{2}[(1)-(3)]$ gives $$ P_{n+1}’(x)=(n+1)P_n(x)+xP_n’(x).\tag 4 $$ $\frac{1}{2}[(1)+(3)]$ gives $$ P_{n-1}’(x)=-nP_n(x)+xP_n’(x).\tag 5 $$ From (4) and (5) we obtain the linear system $$ n\begin{bmatrix} P_{n-1}\\ P_n \end{bmatrix} = \begin{bmatrix} 1 & -x\\ x & -1 \end{bmatrix} \begin{bmatrix} P_n^{\prime}\\ P_{n-1}^{\prime} \end{bmatrix} \tag 6 $$

Inverting the matrix this takes the form $$ \begin{bmatrix} P_n^{\prime}\\ P_{n-1}^{\prime} \end{bmatrix}= \frac{n}{x^2-1} \begin{bmatrix} -1 & x\\ -x & 1 \end{bmatrix} \begin{bmatrix} P_{n-1}\\ P_n \end{bmatrix} \tag 7 $$

Finally, we have $$ (1-x^2)P_n^{\prime}=n(P_{n-1}-xP_n) \\ \text{and}\\ (1-x^2)P_{n}^{\prime} = (n+1)(xP_{n}-P_{n+1}) $$