# Help with applying chain rule to transformed variable

Given the linear homogeneous PDE

$$y'' + p(x)y' + q(x)y = 0$$

and the transformation

$$u = y\exp(\frac{1}{2}\int_{a}^{x} p(s) ds)$$

I need to show

$$u'' + r(x)u = 0$$

where

$$r = q - \frac{p'}{2} - \frac{p^2}{4}$$

I am trying to show this by calculating $y'$ and $y''$ via $u$ and plugging them into the first equation to get the second equation.

I use the fact that $y' = \frac{dy}{du} \frac{du}{dx}$ and $y''$ = $\frac{d^{2}u}{dx^2}(\frac{dx}{du})^2 + \frac{dy}{du} \frac{d^{2}u}{dx^2}$

$$y' = \frac{pu}{2\exp(\frac{1}{2}\int_{a}^{x} p(s) ds)}$$

and

$$y'' = \frac{p^{2}u}{4\exp(\frac{1}{2}\int_{a}^{x} p(s) ds)}$$

Transforming my equation into this (by plugging in $\frac{p^{2}u}{4}$ for $u''$):

$$u'' + \frac{p^{2}u}{2} + qu = 0$$

However, this is not the correct equation I am trying to show.

Can someone tell me where I made a mistake in my calculations? I suspect it involves my chain rule application.

• I think the use of the chain rule is wrong. You seem to assume that $$y(x) = y(u(x))$$ or something similar. But actually this is not the case, since $y$ depends also explicitly on the $x$ variable through $p$. – Kore-N Dec 5 '17 at 10:10

$$y'' + p(x)y' + q(x)y = 0.$$ $$u = y\exp(\frac{1}{2}\int_{a}^{x} p(s) ds)\Rightarrow y = \displaystyle ue^{-\frac{1}{2}\int_{a}^{x} p(s) ds}=uv,$$ where $v=-\frac{1}{2}\int_{a}^{x} p(s) ds$. Observe that $v'=-\frac{1}{2}pv$ and $v^{''}=-\frac{1}{2}p'v+\frac{1}{4}p^2v=(-\frac{1}{2}p'+\frac{1}{4}p^2)v$.
Since $y=uv$, differentiating we get $y'=u'v+uv'=(u'-\frac{1}{2}pu)v$ and $y^{''}=u{''}v+2u'v'+uv^{''}=(u{''}-\frac{1}{2}p'u-\frac{1}{2}pu')v-\frac{1}{2}p(u'-\frac{1}{2}pu)v=[u^{''}-\frac{1}{2}p'u-\frac{1}{2}pu'+\frac{1}{4}p^2u]v$.
Now substituting $y,y'$ and $y^{''}$ into the equation $$y'' + p(x)y' + q(x)y = 0$$ we get the desired transformed equation $$u'' + \big(q-\frac{1}{2}p'-\frac{1}{4}p^2\bigg)u = 0.$$
Let us write $$P(x) = \frac{1}{2}\int_0^x p(y) dy.$$ We evaluate the derivatives in the following order:
$$\partial_x u = \partial_x y e^P + y e^P\frac{1}{2}p,$$ as well as $$\partial_x^2 u = \underbrace{\partial_x^2 y e^P + 2\partial_xy e^P\frac{1}{2}p}_{-ye^P q} + y e^P \Big( \frac{1}{4}p^2 + \frac{1}{2}p' \Big).$$ So that substituting $u = y e^P$on the right hand-side you find the required identity.