conservation of volume in phase space I was reading through a proof of Liouville's theorem on conservation of volume in phase space from David Tong's lecture notes (Chapter 4: "Hamiltonian formalism") and on page 89 it says that $\det(J)=1+\mathcal{O}(\mathrm{d}t)^2$ which then implies that the derivative of $\det(J)$ w.r.t. time is $0$.
Why shouldn't we get some function of order $\mathrm{d}t$ instead? Suppose that $\mathcal{O}(\mathrm{d}t^2)=3\mathrm{d}t^2$, then surely we get $6\mathrm{d}t$, right?
 A: With
$$ \tag{1} \det(J) = 1 + \mathcal{O}(dt^2)$$
he means that when $dt \to 0$ the quantity
$$ \tag{2} \frac{ \det J -1}{(dt)^2}$$
is bounded. Now what is the derivative of $\det J$? Using the definition we have
$$ \tag{3} \frac{d \det J}{dt}
= \lim_{dt \to 0} \frac{ \det J - 1}{dt}
= \lim_{dt \to 0} \frac{ \det J - 1}{(dt)^2} dt = 0,$$
because is the product of a finite term with an infinitesimal.
Also remember that in all the above $\det J$ is $t$-dependent, despite the fact that I omitted to write it explicitely.
Here is another way to show the statement in the text (or better, it's the same way, just with slightly different notation).
Denote with $V(t)$ the (infinitesimal!) phase space volume at time $t$. The (4.45) in the text then reads:
$$ \tag{4} V(t+dt) = | \det J(t) | V(t),$$
and proving the invariance of the space-space volume amounts to showing that
$$ \tag{5} \frac{dV}{dt}(t) = 0, \forall t.$$
Now from the definition of the derivative we have
$$ \tag{6} \frac{dV}{dt}(t)
\equiv \lim_{dt \to 0} \frac{V(t+dt) - V(t)}{dt}
= V(t) \lim_{dt \to 0} \frac{\det J(t) - 1}{dt} = 0,$$
where the last step again follows from the same reason than (3), given that
$$ \tag{7} \det J(t) = 1 + \mathcal{O}(dt^2).$$
