I was just wondering how the following equation is derived:$$-G\frac{Mm}{r_1}+G\frac{Mm}{r_2}=\frac{1}{2}mv_1^2-\frac{1}{2}mv^2_2~?$$
I already understand why the work $W$ done in moving an object with mass $m$ by a force exerted by a mass $M$ from point $r_1$ to $r_2$ is given by
$$\Delta U = -G\frac{Mm}{r_1}+G\frac{Mm}{r_2}$$
yet the couple of proofs I've seen for $W=-\Delta KE$ assume that the acceleration is constant. How could one prove the equation in its more general form?