I have started reading a book on differential equations and it says something like:
$$\frac{dx}{x} = k \, dt$$
Integrating both sides gives
$$\log x = kt + c$$
How is it that I can 'integrate both sides here' when I am integrating one side with respect to $x$ yet I am integrating the other side with respect to $t$?
Best Answer
What is going on there is what is called an abuse of notation. What you really have there is an equation in $t$. $x=x(t)$ is a function dependent on $t$. So what we're doing is the following - I presume this is the original equation:
$$\frac{dx}{dt}=k x $$
This is the same as
$$x'(t)=k x(t) $$
$$\frac{x'(t)}{x(t)}=k $$
Now we integrate wrt to $t$
$$\int\frac{x'(t)}{x(t)}dt=kt+C $$
But we note letting $X=x(t)$ so $dX = x'(t) dt$ gives
$$\int\frac{dX}{X}=kt+C $$
$$\log X = kt+C$$
So switching back
$$\log x(t) = kt+C$$
$$x(t)=C e^{kt}$$
What we actually do, in some sense, is integrate with respect to "only" $t$ in one side, and "$x(t)$" in the other (which is done implicitly). The notation is very useful and suggestive, so we use it, understanding what we're doing is the above.