Correct way of changing variables in differential equation

75 Views Asked by At

I have the differential equation $$ \dfrac{d}{dx} \left( p(x) \dfrac{df}{dx} \right) + \dots = 0 $$ and I want to perform a generic change of variable from $x$ to $y = y(x)$.

Let $f(x) = F(y(x))$, thus $$ \dfrac{df}{dx} = \dfrac{dF}{dy} \dfrac{dy}{dx} $$ and $$ \dfrac{d}{dx} \left( p(x) \dfrac{dF}{dy} \dfrac{dy}{dx} \right)\ . $$

How should I transform the other derivative? Following the same reasoning, I get $$ \dfrac{d}{dy} \left(p(x) \dfrac{dF}{dy} \dfrac{dy}{dx}\right) \dfrac{dy}{dx} $$ and now I see two options:

  1. Since the outer derivative is done with respect to $y$, treat functions of $x$ as constants and get $$ p(x) \left( \dfrac{dy}{dx} \right)^2 \dfrac{d^2F}{dy^2}\ . $$ This looks a bit weird (ilegal movement?) for me, but apparently this works later when working other things with the differential equation and checking the results.

  2. Define $P(y(x)) = p(x)$ and $Y(y(x)) = dy/dx$ and get $$ Y(y) \dfrac{d}{dy} \left(P(y) Y(y) \dfrac{dF}{dy}\right) $$ which looks like the correct way of doing this for me, but this form of the new differential equation seems to be wrong later.

What is the correct way of doing this?

2

There are 2 best solutions below

0
On

It is correct that $$\frac{\mathrm{d}}{\mathrm{d}x}\left[p\cdot\frac{\mathrm{d}f}{\mathrm{d}x}\right]=\frac{\mathrm{d}}{\mathrm{d}y}\left[p\cdot\frac{\mathrm{d}F}{\mathrm{d}y}\cdot\frac{\mathrm{d}y}{\mathrm{d}x}\right]\cdot\frac{\mathrm{d}y}{\mathrm{d}x}.$$ Here, you must use the product rule: $$\frac{\mathrm{d}}{\mathrm{d}y}\left[p\cdot\frac{\mathrm{d}F}{\mathrm{d}y}\cdot\frac{\mathrm{d}y}{\mathrm{d}x}\right]\cdot\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{\mathrm{d}}{\mathrm{d}y}\left[p\cdot\frac{\mathrm{d}F}{\mathrm{d}y}\right]\left(\frac{\mathrm{d}y}{\mathrm{d}x}\right)^2+p\cdot\frac{\mathrm{d}F}{\mathrm{d}y}\cdot\frac{\mathrm{d}y}{\mathrm{d}x}\cdot\frac{\mathrm{d}}{\mathrm{d}y}\left(\frac{\mathrm{d}y}{\mathrm{d}x}\right).$$ The secret here is that $$\frac{\mathrm{d}}{\mathrm{d}y}\left(\frac{\mathrm{d}y}{\mathrm{d}x}\right)=\frac{\mathrm{d}}{\mathrm{d}y}\left(\frac1{\frac{\mathrm{d}x}{\mathrm{d}y}}\right)=-\frac{\frac{\mathrm{d}^2x}{\mathrm{d}y^2}}{\left(\frac{\mathrm{d}y}{\mathrm{d}x}\right)^2}.$$

The problem here is that, in actuality, you really cannot do such arbitrary changes of variable without accounting for $y'$ in the change of variables.

0
On

It may be illuminating to work using functional notation rather than Leibniz notation. The expression you are concerned with rewriting is $$(p\cdot{f'})'=p'\cdot{f'}+p\cdot{f''}.$$ Let $p=P\circ{y}$ and $f=F\circ{y}.$ Thus $p'=(P'\circ{y})\cdot{y'},$ and $f'=(F'\circ{y})\cdot{y'},$ and $f''=(F'\circ{y})'\cdot{y'}+(F'\circ{y})\cdot{y''}=(F''\circ{y})\cdot(y')^2+(F'\circ{y})\cdot{y''}.$ As such, $$(p\cdot{f'})'=(P'\circ{y})\cdot{y'}\cdot(F'\circ{y})\cdot{y'}+(P\circ{y})\cdot(F''\circ{y})\cdot(y')^2+(P\circ{y})\cdot(F'\circ{y})\cdot{y''}.$$