# Chain rule and x =cos(θ) substitution on the Legendre ODE

I am having difficulties with a question where I am required to use the chain rule, and then use the substitution x = cos(θ), on the Legendre differential equation, which is

$$(1-x^2)y'' - 2xy' + l(l+1)y = 0.$$

The resultant expression should be

$$\frac1{\sin\theta} \frac{\mathrm d}{\mathrm d\theta} \left(\sin\theta \frac{\mathrm d}{\mathrm d\theta} P_n(\cos\theta)\right) + l(l+1) P_n(\cos\theta) = 0.$$

However, I am unsure of how to get from the first equation to the second, even with the instructions given.

I have attempted to solve the problem, with steps such as the substitution of cosθ, but I am having trouble going from there. The substitution (as I see it) yields:

$$sin^2θy'' - 2cosθy' + l(l+1)y = 0.$$

although I am not even sure if this step happens before or after any use of the chain rule.

Many thanks.

EDIT: I have come across the follwing information from another website, but I do not understand how they have moved between their two uses of the chain rule. They have:

"$$(1−x^2)P′′_n(x)−2xP′_n(x)+n(n+1)P_n(x)=0. (11)$$

The linear second-order differential equation (11) is called Legendre’s differential equation and as seen Pn(x) satisfies (11). This is why Pn(x) is called a Legendre polynomial.

In physics (11) is often expressed in terms of differentiation with respect to θ. Let x=cosθ. Then by the chain rule, $${dP_n(cosθ) \over dθ}=−sinθ*{dP_n(x) \over dx} , (12)$$ $${d^2P_n(cosθ) \over dθ^2}=−x{dP_n(x) \over dx}+(1−x^2){d^2P_n(x) \over dx^2}, (13)$$.

Using (12) and (13), Legendre’s differential equation (11) can be written as $${1 \over sinθ}{d \over dθ}\left(sinθ{dP_n(cosθ) \over dθ}\right)+n(n+1)P_n(cosθ)=0$$. "

How did they do this?

• Any help at all would be great, thanks – user2768428 Oct 20 '14 at 8:58

\begin{align} y'&=\frac{dy}{dx}=\frac{dy}{d\theta}\frac{d\theta}{dx}=\frac{dy}{d\theta}\frac{1}{dx/d\theta}=-\frac{1}{\sin\theta}\frac{dy}{d\theta},\\ y''&=\frac{1}{\sin\theta}\frac{d}{d\theta}\Bigl(\frac{1}{\sin\theta}\frac{dy}{d\theta}\Bigr). \end{align}