# How to make sense of chain rule here

Context: We are currently on topic of 1st order linear differential equations, and below there are 2 substitutions we have to perform to obtain a differential equation in the form $$y'+ f(t)y = g(t)$$ in order to use integrating factor to solve:

For the first one I differentiated $$u$$ to obtain $$u' = \frac{-1}{y^2}\cdot y'$$ which yielded me the correct form, but for the second one, when I differentiate u, it seems that $$u' = y''$$ instead of $$u' = y'' \cdot y'$$ because only the former yields the appropriate format. Why is it the case that chain rule doesn't apply to give $$u' = y'' \cdot y'$$?

• Because $1/y$ is a function of $y$ but $y'$ is a function of $x$. – Peter Foreman Apr 11 '20 at 9:51
• To perhaps expand on Peter's comment above, in the first case you are defining a function $u$ by $u(y) = 1/y$, while in the second case you are defining a function $u$ by $u(x) = y'(x)$. In the first case, we have $u'(y) = \frac{d}{dy} 1/y$, while in the second case we have $u'(x) = \frac{d}{dx} y'(x) = y''(x)$. This sorta comes down to common abuse of notation – Brevan Ellefsen Apr 11 '20 at 9:53
• Answered, thanks. – korone Apr 11 '20 at 9:56

(1): It is also easy to see that the left side is a complete differential, so that $$(xy'(x))=\frac{(xy(x))^2}{x}$$ is a separable ODE in $$u(x)=xy(x)$$.
(2): In principle, the same applies here, the left side is $$(xy(x))''$$, so that one can directly integrate twice.
Contrary to the comments, in neither case you change the independent variable to $$y$$. If you want to formally apply the chain rule in (1), consider the function $$g(y)=\frac1y$$, then the substitution is the composite function $$u(x)=g(y(x))$$ and thus $$u'(x)=g'(y(x))y'(x)$$ which results in the formula you found and used (apparently correctly).
In the equation (2) you just change the differentiation order of the dependent variable by "hiding" one differentiation, writing out the arguments it is intended to be $$u(x)=y'(x)$$ so that consequently $$u'(x)=y''(x)$$ and you find the integrating factor $$x$$ to get $$(x^2u(x))'=12x^3$$, which can again be easily integrated.
It is only in autonomous second order DE, usually non-linear, that sometimes the change of independent variable from $$x$$ to $$y$$ provides a more clear insight into the necessary and possible transformations. Under the assumption that $$y$$ is non-constant and locally monotonous, one sets $$y'(x)=u(y(x))$$ with some new unknown function $$u$$. Then the derivative of that relation gives $$y''(x)=u'(y(x))y'(x)=u'(y)u=\frac12\frac{d(u^2)}{dy}$$, which transforms the DE into a first order non-autonomous DE for $$u(y)$$.