# 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
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 5, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/423711/differential-equation-change-of-variables/424862", "fetch_time": 1585432798000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2020-16/segments/1585370493120.15/warc/CC-MAIN-20200328194743-20200328224743-00146.warc.gz", "warc_record_offset": 595027982, "warc_record_length": 31857, "token_count": 802, "char_count": 1902, "score": 4.09375, "int_score": 4, "crawl": "CC-MAIN-2020-16", "snapshot_type": "latest", "language": "en", "language_score": 0.6633994579315186, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00058-of-00064.parquet"}