# Independent Variable Change

Summary:
How does one go from ##\phi## to ##x=\cos(\phi)##
I'm reading "Differential Equations with Applications and Historical Notes" by George F. Simmons and I am confused about something on pages 431-432

He has the second order ordinary differential equation

$$\frac {d^2v} {d\phi^2} + \frac {\cos(\phi)} {\sin(\phi)} \frac {dv} {d\phi} + n(n+1)v = 0 ~~~~~~~~~~~~~~~~~~~ eq. 1$$

And then using a change of independent variable from ## \phi ## to ## x = \cos(\phi) ## eq 1 is transformed into the Legendre equation

$$(1-x^2) \frac {d^2v} {dx^2} - 2x \frac {dv} {dx} + n(n+1)v = 0 ~~~~~~~~~~~~ eq. 2$$

But I don't see how he got from eq 1 to eq 2

Anyone feel like helping me out?

jedishrfu
Mentor
First you need to compute the ##dx/d\phi## given you know x in terms of ##\phi##

Ok, I think that makes sense. So just use the chain rule:

$$\frac {d^2v} {dx^2} \frac {dx^2} {d\phi^2}$$

With ##x=\cos(\phi)## the first term will have

$$\frac {d\cos(\phi)} {d\phi} = \frac {dx} {d\phi} = -\sin(\phi)$$
$$\frac {d^2x} {d\phi^2} = \sin^2(\phi)$$
$$\sin^2(\phi) = 1-\cos^2(\phi)$$

and with ##x=\cos(\phi)## it turns into ##(1-x^2)## and the second term will have

$$\frac {\cos(\phi)} {\sin(\phi)} \frac {dv} {dx} \frac {dx} {d\phi} = -\sin(\phi) \frac {\cos(\phi)} {\sin(\phi)} \frac {dv} {dx} = -\cos(\phi) \frac {dv} {dx}$$

$$-\cos(\phi) = -x$$

Though now I still can't account for the ##2## in the second term ##-2x \frac {dv} {dx} ##

##x = \cos \phi \rightarrow dx = - \sin \phi d \phi \rightarrow - \frac{dx}{-\sin \phi} = d \phi \rightarrow \frac{-dx}{d \phi} = \sin \phi##

Thus, we have ##\frac{\sin^2 \phi d^2 v}{dx^2} - \frac{d \phi x}{dx} \frac{dv}{d \phi} +n(n+1)v = 0 ## Making the substitutions you mention, we get ##(1-x^2)\frac{d^2 v}{dx^2} -x \frac{dv}{dx}+n(n+1)v = 0 ##

So, maybe a typo.

pasmith
Homework Helper
Ok, I think that makes sense. So just use the chain rule:

$$\frac {d^2v} {dx^2} \frac {dx^2} {d\phi^2}$$

With ##x=\cos(\phi)## the first term will have

$$\frac {d\cos(\phi)} {d\phi} = \frac {dx} {d\phi} = -\sin(\phi)$$
$$\frac {d^2x} {d\phi^2} = \sin^2(\phi)$$
$$\sin^2(\phi) = 1-\cos^2(\phi)$$

and with ##x=\cos(\phi)## it turns into ##(1-x^2)## and the second term will have

$$\frac {\cos(\phi)} {\sin(\phi)} \frac {dv} {dx} \frac {dx} {d\phi} = -\sin(\phi) \frac {\cos(\phi)} {\sin(\phi)} \frac {dv} {dx} = -\cos(\phi) \frac {dv} {dx}$$

$$-\cos(\phi) = -x$$

Though now I still can't account for the ##2## in the second term ##-2x \frac {dv} {dx} ##

Here $dx/d\phi = -\sin\phi$ is not constant; thus $$\frac{d^2v}{d\phi^2} = \frac{d}{d\phi}\left(\frac{dv}{d\phi}\right) = \frac{d}{d\phi}\left(\frac{dx}{d\phi} \frac{dv}{dx}\right) = \frac{d^2 x}{d\phi^2} \frac{dv}{dx} + \left(\frac{dx}{d\phi}\right)^2\frac{d^2v}{dx^2} = -x \frac{dv}{dx} + (1 - x^2)\frac{d^2v}{dx^2}.$$