TITLE: Integrating both sides of an equation with respect to different variables
QUESTION [7 upvotes]: So im reading a book called "Ordinary Differential Equations" (Tenenbaum & Pollard) and in the introduction(ish) they are doing an example using a carbon dating problem, represented as:
$\frac{dx}{dt} = -kx$
Which they change to
$\frac{dx}{x} = -k dt$
And then integrate to 
$ \log x = -kt + c$
But doesn't that imply integrating with respect to x in the left side and integrating with respect to t on the right? Is there a proof that says that is okay? I would imagine it is related to the Fundamental Theorem of Calculus, but i didnt see anything.

REPLY [5 votes]: This is a stealthy application of the chain rule.
See here for an explanation:
http://www.math-cs.gordon.edu/courses/ma225/handouts/sepvar.pdf
For convenience of future users I will summarize the argument here:
Suppose we have some differential equation $g(x)\frac{dx}{dt}=f(t)$ where we are trying to recover a function $x(t)$:
Then we can certainly integrate with respect to $t$ on both sides:
$\int g(x)\frac{dx}{dt}dt=\int f(t)dt$. But since $x(t)$ is a function of $t$, we have, by the chain rule and setting $G(x)$ s.t. $G'(x)=g(x)$
$\int g(x)\frac{dx}{dt}dt=G(x(t))=\int f(t)dt$, which you can check by differentiating.