# Differential equation change of variables

I have a differential equation $$xy''(x) +(n+1-x)y'(x) + ay(x)=0.$$ If I set $$x=r^t$$ then how to plug in this and how to use change of variable to get the differential equation for $$r$$ instead of $$x,$$ i.e. the following equation:

$$\frac{dy}{dx}=\frac{dy}{dr}\frac{dr}{dx}$$

• You sure that last term is $ay'(x)$ and not just $ay(x)$? – Kaster Jun 18 '13 at 16:15
• Sorry it's a typo, it should be y(x) – Keith Jun 18 '13 at 16:16
• Anyway, you have a good start. As for the sub I'd recommend to find $y_x$ through $y_r = y_x x_r$, not if that matters, just might cause less confusion. – Kaster Jun 18 '13 at 16:20

By chain rule $$\frac{dy}{dx}=\frac{dy}{dr}\frac{dr}{dx}$$ $$\frac{d^2y}{dx^2}=\frac{d^2y}{dr^2}\bigg(\frac{dr}{dx}\bigg)^2+\frac{dy}{dr}\frac{d^2r}{dx^2}$$ where $$x=r^t\Rightarrow dx=tr^{t-1}dr\Rightarrow\frac{dr}{dx}=\frac 1{tr^{t-1}}$$ $$dx^2=t(t-1)r^{t-2}dr^2\Rightarrow\frac{d^2r}{dx^2}=\frac 1{t(t-1)r^{t-2}}$$ By plugging into original equation $$r^t \Bigg(\frac{d^2y}{dr^2}\bigg(\frac 1{tr^{t-1}}\bigg)^2+\frac{dy}{dr}\frac 1{t(t-1)r^{t-2}} \Bigg)+(n+1-r^t)\frac{dy}{dr}\frac 1{tr^{t-1}} + ay=0$$
---- Addition for chain rule ---- $$\frac{d}{dx}\bigg(\frac{dy}{dx}\bigg)=\frac{d}{dx}\bigg(\frac{dy}{dr}\frac{dr}{dx}\bigg)$$ $$\frac{d^2y}{dx^2}=\frac{d}{dx}\bigg(\frac{dy}{dr}\bigg)\frac{dr}{dx}+\frac{dy}{dr}\frac{d}{dx}\bigg(\frac{dr}{dx}\bigg)$$ $$\frac{d^2y}{dx^2}=\frac{d^2y}{dr^2}\frac{dr}{dx}\frac{dr}{dx}+\frac{dy}{dr}\frac{d^2r}{dx^2}$$
• how does $\frac{d^2y}{dx^2}= \frac{d^2y}{dr^2}\bigg(\frac{dr}{dx}\bigg)^2+\frac{dy}{dr}\frac{d^2r}{dx^2}$ follow from the chain rule? – Michael Angelo Mar 26 '16 at 15:22
• @MichaelAngelo By applying $\frac{d}{dx}=(\frac{dr}{dx})\frac{d}{dr}$ to both sides of the chain rule equation above, and using the product rule on the right hand side. – Travis Bemrose Aug 9 '18 at 19:16