Change of variables for an ODE Question: Use the substitution $u = 2 \sqrt{x}$ to show that the equation:
$$x^2\frac{d^2y}{dx^2}+x\frac{dy}{dx}-(1-x)y=0$$
becomes:
$$u^2\frac{d^2y}{du^2}+u\frac{dy}{du}-(u^2-u)y = 0$$
My attempt:
$$x^2\left[\frac{d^2y}{du^2}\left(\frac{du}{dx} \right)^2+\frac{dy}{du}\left(\frac{d^2u}{dx^2}\right)\right]+x\frac{dy}{du}\frac{du}{dx}-(1-x)y=0$$
simplifying with
$$\frac{du}{dx}=\frac{1}{\sqrt{x}},\ \frac{d^2u}{dx^2}=-\frac{1}{2\sqrt{x}^3}$$
yielding:
$$x\frac{d^2y}{du^2}+\frac{1}{2}\sqrt{x}\frac{dy}{du}-(1-x)y = 0$$
now using $\sqrt{x}=\frac{1}{2}u$, $x = \frac{1}{4}u^2$ and multiplying across by $4$:
$$\implies u^2\frac{d^2y}{du^2}+u\frac{dy}{du}-(4-u^2)y= 0$$
Which disagrees with the proposed solution. Have I made an error somewhere here so far or is there a further manipulation possible?
Attempting the substitution in reverse I find:
$$ x^2\frac{d^2y}{dx^2}+x\frac{dy}{dx}-(x-\frac{1}{2}\sqrt{x})y=0$$
in disagreement with the starting equation.
 A: You must write everything in terms of $u$.
First derivative is easy, noting that $x=\frac{u^2}{4}$:
$$\frac{dy}{dx}=\frac{\frac{dy}{du}}{\frac{dx}{du}}=\frac{\frac{dy}{du}}{\frac{u}{2}}=\frac{2}{u}\frac{dy}{du}$$
Second derivative is difficult and key step:
$$\frac{d^2y}{dx^2}=\frac{\frac{d^2y}{du^2}-\frac{d^2x}{du^2}\frac{dy}{dx}}{(\frac{dx}{du})^2}=\frac{\frac{d^2y}{du^2}-\frac{1}{2}\frac{2}{u}\frac{dy}{du}}{(\frac{u}{2})^2}=\frac{4}{u^2}\frac{d^2y}{du^2}-\frac{4}{u^3}\frac{dy}{du}.$$
Then we substitute in the equation $x^2y''+xy'-(1-x)y=0$ and it becomes:
$$(\frac{u^2}{4})^2(\frac{4}{u^2}\frac{d^2y}{du^2}-\frac{4}{u^3}\frac{dy}{du})+(\frac{u^2}{4})(\frac{2}{u}\frac{dy}{du})-(1-\frac{u^2}{4})y=0$$
$$(\frac{u^4}{16})(\frac{4}{u^2}\frac{d^2y}{du^2}-\frac{4}{u^3}\frac{dy}{du})+(\frac{u}{2})(\frac{dy}{du})+(\frac{u^2}{4}-1)y=0$$
$$\frac{u^2}{4}\frac{d^2y}{du^2}-\frac{u}{4}\frac{dy}{du}+\frac{u}{2}\frac{dy}{du}+(\frac{u^2}{4}-1)y=0$$
$$\frac{u^2}{4}\frac{d^2y}{du^2}+\frac{u}{4}\frac{dy}{du}+(\frac{u^2}{4}-1)y=0$$
$$u^2\frac{d^2y}{du^2}+u\frac{dy}{du}+(u^2-4)y=0.$$
You wrongly wrote $u$ for $4$... $u^2-u$???
