# Integrating each side of an equation w.r.t. to a different variable?

Say I have

$\frac{dy}{dt} = a$, for some constant $a$

So

$dy = a dt$

$\int_{y0}^y dy = \int_{t0}^t a dt$

$y - y_0 = at - at_0$

How come I am allowed to integrate each side with respect to a different variable?

If I had an equation $y = 5x$ and I differentiated the LHS w.r.t. to y, and the RHS w.r.t. x I would get $1 = 5$...so differentiating both sides w.r.t. to different variables doesn't work. Yet integrating does?

-
What does the notation $dy = a\,dt$ mean? –  wj32 Oct 18 '12 at 5:18

This is often a bit subtle to people beginning differential equations, but in reality you are just applying integration by substitution. Recall that for integration by substitution we have $$\int_{x_0}^{x_1} f(u(x))u'(x)\ dx = \int_{u(x_0)}^{u(x_1)} f(u)\ du$$ We can write this in the more familiar Leibniz notation, abbreviating $u(x_i)$ as $u_i$, in the following form $$\int_{x_0}^{x_1} f(u(x))\frac{du}{dx}\ dx = \int_{u_0}^{u_1} f(u)\ du$$ If we apply this to the differential equation $$\frac{dy}{dt} = a$$ then we integrate both sides with respect to $t$ $$\int_{t_0}^{t_1}1 \frac{dy}{dt}\ dt = \int_{t_0}^{t_1} a\ dt$$ You can recognize the left-hand side from the integration by subsitution equation with $f(y) = 1$. We therefore have $$\int_{y(t_0)}^{y(t_1)}1\ dy=\int_{y_0}^{y_1}dy$$ And this gives the illusion of integration with respect to different variables. In the end, it's just a clever mnemonic. If you keep this process in mind, it really is more intuitive to just manipulate the differentials however, so there's really nothing wrong with what you did (and I'm sure we all do it anyways). Just make sure you understand the underlying mechanics behind the separation of variables.