TITLE: Differential equations: how does separation of variables really work?
QUESTION [13 upvotes]: I'm trying to brush up my differential equations knowledge for an upcoming exam. I watched a set of videos and read few articles on how to solve differential equations via some different methods. One of them was variable separable. It includes separation of all y & x terms on each side of equals and then solving them by integrating both sides. 
However I remembered what I was taught in my high-school, that $dy/dx$ doesn't act like fraction, instead it is a combination of 
d/dx * y where y = f(x)
None of the videos explained it properly, or should I say - never even brought it up. So I tried to find an explanation via google and stumbled upon a very good one here.
The way author has written this article is perfect for my case, however problem is that equations don't render well which doesn't help me to understand it. There are missing operators, signs and other stuff which is making it quite difficult to understand. 

I would like to ask for a better or equal explanation for my question , even same article explained with proper equations would help.

REPLY [4 votes]: As I see it, the procedure can be described by the following steps
$$
\frac{dy}{dx}=\frac{g(x)}{h(y)}\tag1
$$
multiplying $h(y)$ and $dx$ on both sides as if both were regular real valued expressions
$$
h(y)dy=g(x)dx\tag2
$$
applying integration on both sides to have
$$
\int h(y)dy=\int g(x)dx\tag3
$$
and using antiderivatives to get to
$$
H(y)=G(x)+c\tag4
$$
and hopefully $H$ is injective so we can solve for $y$
$$
y=H^{-1}\left(G(x)+c\right)\tag5
$$
which may be subject to different constraints on its domain depending on the details in the steps above.

The problem is of course that $dx$ and $dy$ have not been defined as independent real valued expressions. Thus step $(2)$ above may contain an undefined non-sensical expression.
By definition $\frac{dy}{dx}=y'(x)$, but other than that we know little about $dx$ and $dy$. In a historical context, Leibniz and his followers used them and assigned meaning to them individually, but a struggle over their actual meaning and the foundations of calculus went on for centuries after that.

One way to resolve this is to replace $dx$ and $dy$ by $x'$ and $y'$ defined as $x'=1$ and $y'=y'(x)$. Then we have
$$
\frac{dy}{dx}=\frac{y'}{x'}
$$
where the right hand side is now a fraction between actual real valued expressions. Thus the first steps can be written as
$$
\frac{y'}{x'}=\frac{g(x)}{h(y)}\tag1
$$
and multiplying by $h(y)$ and $x'$ on both sides we get
$$
h(y)y'=g(x)x'\tag2
$$
which now is meaningful and leads to the intermediate step
$$
\int h(y)y' dx=\int g(x)x'dx\tag{2.5}
$$
and by applying the substitution $u=y$ on the LHS and noting that $g(x)x'=g(x)$ since $x'=1$ on the RHS this leads to the same step $(3)$ as the original version, namely
$$
\int h(y)dy=\int g(x)dx\tag3
$$
So by comparison, the original method is a shortcut to the exact same step $(3)$ as this more rigorous and detailed version.

The whole thing depends on the substituion method being correct, namely
$$
\int h(y)y'dx=\int h(y)dy
$$
The above is of course correct, since the RHS evaluates to $H(y)+c$ which has derivative $h(y)y'$ (by the chain rule) so both sides are in fact antiderivatives of the same integrand, which proves that the substitution method is valid.