## Why is Separation of Variables Valid?

One of the most confusing aspects of the calculus sequence concerns the Leibniz notation for the derivative: $\frac{dy}{dx}$.  It sure looks like a fraction.  But we tell our students it’s not really a fraction.  But then sometimes we treat $dy$ and $dx$ as if they are variables, so why wouldn’t $\frac{dy}{dx}$ be a fraction?  No wonder it’s confusing.

In my opinion, the technique of separation of variables, which is used for solving differential equations, is the most confusing topic on this issue in the calculus sequence.  In this post I will explain why separation of variables is valid.

Suppose you have the differential equation

$\displaystyle\frac{dy}{dx} = g(x) h(y).$

Rewrite it as

$\displaystyle \frac{1}{h(y)} \frac{dy}{dx} = g(x).$

We’re implicitly assuming that $y$ is a function of $x$ here when we write $\frac{dy}{dx}$, so let’s make that explicit:

$\displaystyle \frac{1}{h(y(x))} \frac{dy}{dx} = g(x).$

Now, integrate both sides with respect to $x$:

$\displaystyle \int \frac{1}{h(y(x))} \frac{dy}{dx} \, dx = \int g(x) \, dx.$

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$.  This produces

$\displaystyle \int \frac{1}{h(y)} \, dy = \int g(x) \, dx,$

which is the separation of variables formula.  So separation of variables really does follow in a straightforward way from integration by substitution.

The argument assumes that integration by substitution is valid.  Admittedly, integration by substitution is another one of those places where it looks like we treat $dx$ as a variable, but it doesn’t seem to cause as much suspicion as separation of variables.  (The justification of integration by substitution comes from the chain rule and the fundamental theorem of calculus.)

(This argument is basically lifted from from my answer to the math.SE question
“What am I doing when I separate the variables of a differential equation?”  I first saw the argument in Blanchard, Devaney, and Hall’s text [1] on differential equations.)

For a good discussion of the issues and history around the notation $\frac{dy}{dx}$, it’s hard to do better than Arturo Magidin’s magisterial answer to “Is $\frac{dy}{dx}$ not a ratio?” on math.SE.

References

1. Paul Blanchard, Robert L. Devaney, and Glen R. Hall, Differential Equations, 4th ed., Brooks-Cole, 2011.  (This is probably the leading text in the differential equations reform movement.  I’m a fan; the last two times I taught diff. eq. I did so out of this book.)