# What am I doing when I separate the variables of a differential equation?

I see an equation like this:

and solve it by “separating variables” like this:

What am I doing when I solve an equation this way? Because $\textrm{d}y/\textrm{d}x$ actually means

they are not really separate entities I can multiply around algebraically.

I can check the solution when I’m done this procedure, and I’ve never run into problems with it. Nonetheless, what is the justification behind it?

What I thought of to do in this particular case is write

then by the fundamental theorem of calculus

Is this correct? Will such a procedure work every time I can find a way to separate variables?

The basic justification is that integration by substitution works, which in turn is justified by the chain rule and the fundamental theorem of calculus.

More specifically, suppose you have:
Rewrite as:
Add the implicit dependency of $y$ on $x$ to obtain

Now, integrate both sides with respect to $x$:
If we do a variable substitution of $y$ for $x$ on the left-hand side (i.e., use the integration by substitution technique), we replace $\frac{dy}{dx} dx$ with $dy$. Thus we have
which is the separation of variables formula.

So if you believe integration by substitution, then separation of variables is valid.