According to this site the general form of the Gravitational Potential Energy of mass $m$ is

$$U=-\frac{GMm}{r}\tag{1}$$ where $G$ is the gravitation constant, $M$ is the mass of the attracting body, and $r$ is the distance between their centre's.

However, I am learning Astrophysics at the moment and in the derivation of the Virial Theorem I came across this alternate definition of the Gravitational Potential Energy $\Omega$

$$\Omega=-\int_{m=0}^M \frac{Gm}{r}\mathrm{d}m\tag{2}$$

So my question is as follows:

If I go ahead and integrate $(2)$ I find that $$\Omega=-\left[\frac{Gm^2}{2r}\right]_{m=0}^{m=M}=-\frac{GM^2}{2r}\ne U$$

But unless I'm mistaken, $\Omega$ must be equal to $U$.

Why are equations $(1)$ and $(2)$ apparently inconsistent due to giving different results?

I tried searching the internet for an explanation but all sites I found give the same result, like this one on page 6.

Therefore, could someone please explain to me why I am finding that $U\ne\Omega\,$?

  • 1
    $\begingroup$ The issue is that you're treating the $dm$ wrong. It's not a coordinate, you can't directly integrate over it just like it's $r$. I explain a basically identical situation (but with $I = \int r^2 dm$ instead of $U = \int (Gm/r) \, dm$) here. $\endgroup$ – knzhou Apr 30 '17 at 15:47
  • 2
    $\begingroup$ The logic is very similar to the moment of inertia case. If you pretend $m$ is a coordinate you can integrate over, independent of everything else, then $I = \int r^2 dm = r^2 \int dm = M r^2$, so the moment of inertia of every object is $Mr^2$. This is wrong for the same reason that your manipulations are: $r$ is really a function of $m$. $\endgroup$ – knzhou Apr 30 '17 at 16:04
  • 3
    $\begingroup$ The situation is slightly worse in this problem, because the equation uses ambiguous notation. Not only can you not integrate $dm$ as shown (as explained in the previous comment), but the $m$ in the integrand is totally unrelated to the $dm$! $m$ is the mass of the test body, and $dm$ represents a piece of mass of the other body, which has total mass $M$. It really should be the integral with respect to $dM$. Fixing this will remove an incorrect factor of $2$. $\endgroup$ – knzhou Apr 30 '17 at 16:06

There are two problems with the manipulations you've done.

First, the variables in equation (2) are ambiguously named. Equation (2) calculates the potential energy between a single mass $m$ and a mass distribution with total mass $M$. Then the equation should actually read $$\Omega = - Gm \int \frac{dM}{R}.$$ If we instead write the differential as $dm$, it looks like $m$ is being integrated as well. This results in a meaningless extra factor of $1/2$ when the integration is performed.

Next, the integral over $dM$ shouldn't be naively performed as if $R$ is constant, $$\int \frac{dM}{R} \neq \frac{M}{R}$$ in general. The issue is that every piece of mass $dM$ has its own radius $R$, so $R$ should be thought of as a function of $M$. If this doesn't make sense, just think about the discrete case, $$\sum_i \frac{m_i}{R_i}$$ where a radius $R_i$ is associated with every bit of mass $m_i$.

In your particular case, where we're thinking about two point masses separated by a distance $R$, the quantity $R$ in the integrand really is constant, so we can pull it out for $$\Omega = - \frac{Gm}{R} \int dM = -\frac{GMm}{R}$$ as expected. For a more general configuration, we would parametrize the masses and radii somehow to get a concrete integral, e.g. we could use the chain rule for $$\int \frac{dM}{R} = \int \frac{dM}{dR} \frac{dR}{R}$$ where $dM/dR$ tells us the amount of mass in thin spherical shells of radius $R$. I explain how to do this kind of integral a bit more in this answer.


These two formulas stand for two different things, the first one $$U = - \frac{GMm}{r}$$ computes the gravitational potential between two different bodies of mass $M$ and $m$.

The second formula $$\Omega = -\int_{m=0}^M \frac{G \,m \,\mathrm{d}m}{r}$$ gives you the gravitational potential energy that an extended object has, which is the energy difference between the state where all the parts of the object are infinitely far from each other and the state where the object is completely assembled.


[During the time I finished writing this answer and then posted it, two other answers had been posted. I'll leave this here even if it's late to the party.]

Equation (1) is the gravitational potential energy associated with two bodies, a body of mass $m$ at a distance $r$ in the gravitational field (outside) of a body of mass $M$. These bodies could be point masses.

Equation (2) is the gravitational potential energy associated with one extended body of mass $M$ and radius $r$, e.g., a star. From the 2nd link you provided:

The integral on the right hand side is the gravitational potential energy of the star, i.e., the energy required to assemble the star by bringing matter from infinity.

(emphasis mine).

  • $\begingroup$ Thank you for your answer, what do you mean by "extended body"? $\endgroup$ – BLAZE Apr 27 '17 at 11:46
  • 1
    $\begingroup$ @BLAZE, I mean not a point particle. For a point particle, $r = 0$ and then equation (2) is undefined (division by zero). $\endgroup$ – Hal Hollis Apr 27 '17 at 11:49
  • $\begingroup$ Hi there, I have now written an answer of my own; there is one problem though, the comment you have given above means that I can never integrate equation $(2)$ as I am assuming $m$ to be a point particle. Yet my lecturer says that this can be done as we are making an approximation. If we make the additional assumption that $r$ is constant and $\ne 0$ then is this answer plausible? Many thanks. $\endgroup$ – BLAZE May 7 '17 at 23:34

To find the potential energy of assembling a sphere of radius $R$ and mass $M$, ie equivalent to the energy released when a mass $M$ starts at infinity as infinitesimal masses and assembles as a sphere of radius $R$, you need to proceed as follows.

So you have assembled a mass $m = \dfrac 4 3 \pi \rho r^3$ and now add a shell of mass $4\pi r^2 \rho dr$ and thickness $dr$ which moves from infinity to radius $r$ and now change the limits of integration from $m=0$ and $m=M$ to $r = \infty$ and $r=R$ the final radius of the sphere.

$$\Omega=-\int _\infty^R\dfrac{G\left(\dfrac 4 3 \pi \rho r^3 \right)\left( 4\pi r^2 \rho dr\right)}{r} = - \dfrac {3GM^2}{5R}$$

$-\frac{GM^2}{2r}$ is the potential energy of two spherical masses each of mass $M$ and radius $r$ when their centre to centre separation is $2r$.

  • $\begingroup$ Many thanks for the answer. Forgive me if this sounds a little odd but if the centre to centre distance is $2r$ then this will mean that the two masses $M$ are in direct contact with each other. If that is the case does this not mean that the potential energy $U=0$? As I fail to see how two masses in contact with each other's surface can have any potential energy at all. $\endgroup$ – BLAZE Apr 27 '17 at 12:52
  • 1
    $\begingroup$ If the potential energy of particles was zero when they were at infinity it must be lower i.e. non zero, when they are separated by a centre to centre distance of $2r$. This must be true because work must be done to separate the masses. If the sphere were turned into liquid then the particles which make up the two masses would overall come closer to one another thus lowering the potential energy of the system even more. $\endgroup$ – Farcher Apr 27 '17 at 12:59
  • $\begingroup$ Yes because there is still scope for the masses to end up closer together. $\endgroup$ – Farcher Apr 27 '17 at 19:02
  • $\begingroup$ The first part of your answer is wrong; as mass is a function of radius (I'm not the downvoter). I should have never integrated the expression in the first place as the result it gives is meaningless. I understand this now; But in order to improve your (otherwise very good answer to the first part of my question) I would recommend removing the first part of your answer as it makes no sense. $\endgroup$ – BLAZE May 3 '17 at 17:32

After further research and some advice given by my lecturer I decided to write this as an answer to my own question (I considered editing my question but I think it makes more sense to write this one as an answer).

The way I evaluated $\Omega$ in my question is valid if and only if we make the implicit assumption that the mass $m$ in the integrand is a point mass and acknowledge that since $r \lt r_{\odot}$ $$\frac{1}{r}\gt \frac{1}{r_{\odot}}$$

then$$\Omega=-\int_{m=0}^{m=M_{\odot}} \frac{Gm}{r}\mathrm{d}m=-\int_{m=0}^{M_{\odot}} \frac{Gm}{r_{\odot}}\mathrm{d}m=-\frac{GM_{\odot}^2}{2r_{\odot}}$$ Where $r_{\odot}$ is the radius of the sun and $M_{\odot}$ is the mass of the sun.

Otherwise, since this integral is for an extended body/mass (as I learnt from the other answers) we should obtain the result

$$\Omega=- \frac {3GM^2}{5R}$$ as given in the answer by @Farcher.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.