Exercise 2 (Problem 2.1 from Binney & Tremaine)
Question: Show that the gravitational potential energy of a spherical system of finite mass in
which the density satisfies
$\lim_{r\to 0} \rho(r) r^{5/2} = 0$,
can be written
$W = -\frac{G}{2} \int_0^{\infty} dr \frac{M^2(r)}{r^2}$,
where
$M(r) = \int_0^r dr' 4\pi\rho(r')r'^2$,
is the mass interior to radius $r$.
Hint: start from the expression for the potential energy of a spherical body and integrate by
parts.
$W = -4\pi G \int_0^{\infty} drr\rho(r)M(r)$.