# Integrating both sides of an equation with respect to different variables [duplicate]

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.

## marked as duplicate by Git Gud, Strants, Milo Brandt, Henry Swanson, LeucippusMay 15 '16 at 1:50

• This is the chain rule in disguise! Used to bother me as well – qbert May 14 '16 at 23:58

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.