Let consider the system: $$\begin{cases}\dot x=x\\ \dot y=-y+x^2.\end{cases}$$
To solve this system, my teacher made: $$\frac{dy}{dx}=\frac{dy}{dt}\frac{dt}{dx}=(-y+x^2)\frac{1}{dx/dt}=(-y+x^2)\frac{1}{x}.$$
And thus $y(x)=\frac{x^2}{3}+\frac{c}{x}.$
Question: Does this method always work? And if yes why?
Because I have the impression that it really simplify the problem, and I know that: $$\frac{dy}{dt}\frac{dt}{dx}=\frac{dy}{dx}$$ is not always true as this can show.
So why does it work here ?
It does always work, and it is called Chain Rule