Skip to content
Henry Yip
Henry Yip

Henry Yip

MSc Physics student at ETH Zürich. Tropical cyclones, atmospheric modelling and machine learning for weather prediction.

The Shell Theorem: A Gravitational Analogue of Gauss's Law

The shell theorem greatly simplifies gravitational problems involving spherical mass distributions. To show why it matters, I start with a simple example and then derive the theorem from Gauss’s law for gravity.

Falling to the centre of the Earth

Imagine a tunnel drilled straight through the centre of the Earth. How long does a ball dropped into it take to reach the centre, and what happens afterwards?

Model the Earth as a uniform ball of mass \(M\) and radius \(R\). When the ball is at distance \(r\) from the centre, assume it is attracted only by the mass \(M'\) inside radius \(r\):

\[F=-G\frac{M'm}{r^2}, \qquad M'=M\frac{r^3}{R^3}.\]

Then

\[m\ddot{r}=-G\frac{Mm}{R^3}\,r \quad\Longrightarrow\quad \ddot{r}=-\frac{GM}{R^3}\,r,\]

which is simple harmonic motion with angular frequency and period

\[\omega=\sqrt{\frac{GM}{R^3}}, \qquad T=2 \pi \sqrt{\frac{R^3}{GM}} .\]

The ball oscillates back and forth through the tunnel. It reaches the centre after a quarter period, \(T/4 \approx 21\) minutes for the Earth, passing through at its maximum speed, and arrives at the far side after about \(42\) minutes.

The assumption

This calculation assumes that the gravitational force comes only from the enclosed mass. It is not obvious that the mass outside radius \(r\) exerts no net force, and the rest of the post proves it.

Gauss’s law for gravitation

Gauss’s law in electromagnetism (the first of Maxwell’s equations) is well known, but its gravitational counterpart is just as fundamental. It states that the divergence of the gravitational field \(\mathbf{g}\) is proportional to the mass density \(\rho\):

\[\nabla \cdot \mathbf{g} = -4\pi G \rho .\]

We can derive it from Newton’s law of gravitation. The field at position \(\mathbf{r}\) due to a mass distribution \(\rho(\mathbf{s})\) is

\[\mathbf{g}(\mathbf{r}) = -G \int \frac{\rho(\mathbf{s}) (\mathbf{r} - \mathbf{s})}{|\mathbf{r} - \mathbf{s}|^3} \, d^3\mathbf{s}.\]

Taking the divergence,

\[\begin{aligned} \nabla \cdot \mathbf{g}(\mathbf{r}) &= -G \int \rho(\mathbf{s}) \left[ \nabla \cdot \frac{\mathbf{r} - \mathbf{s}}{|\mathbf{r} - \mathbf{s}|^3} \right] d^3\mathbf{s} \\ &= -4\pi G \int \rho(\mathbf{s})\, \delta^3(\mathbf{r} - \mathbf{s}) \, d^3\mathbf{s} \\ &= -4\pi G \rho(\mathbf{r}), \end{aligned}\]

where we used the identity

\[\nabla \cdot \left(\frac{\mathbf{r} - \mathbf{s}}{|\mathbf{r} - \mathbf{s}|^3} \right) = 4 \pi\, \delta^3 ( \mathbf{r} - \mathbf{s}).\]

Integral form

Applying the divergence theorem over a region \(V\) gives the integral form:

\[\begin{aligned} \oint_{\partial V} \mathbf{g} \cdot d\mathbf{A} &= \int_V (\nabla \cdot \mathbf{g}) \, d^3\mathbf{r} \\ &= -4\pi G \int_V \rho(\mathbf{r}) \, d^3\mathbf{r} = -4\pi G M_{\text{enc}}. \end{aligned}\]

The total gravitational flux through a closed surface depends only on the mass enclosed by it, just as the electric flux depends only on the enclosed charge.

The shell theorem

Now suppose the mass distribution is spherically symmetric. By symmetry the field is radial and depends only on \(r\): \(\mathbf{g} = g(r)\,\hat{\mathbf{r}}\). Applying the integral form to a sphere of radius \(r\),

\[\begin{gathered} g(r) \cdot 4\pi r^2 = -4\pi G M_{\text{enc}}(r) \\ \Longrightarrow\quad \mathbf{g}(r) = -\frac{G M_{\text{enc}}(r)}{r^2}\,\hat{\mathbf{r}} . \end{gathered}\]

This is the shell theorem:

  • outside a spherically symmetric body, gravity is the same as if all its mass were concentrated at the centre;
  • the matter in spherical shells outside radius \(r\) exerts no net force at radius \(r\).

This is exactly the assumption we made for the tunnel through the Earth.

Exercises

  • Show that \(\nabla \cdot \left(\dfrac{\mathbf{r}}{\lVert\mathbf{r}\rVert^3}\right)=0\) for \(\mathbf{r} \neq \mathbf{0}\), using the divergence in spherical polar coordinates, \(\nabla \cdot \mathbf{A}=\frac{1}{r^2} \frac{\partial\left(r^2 A_r\right)}{\partial r}+\frac{1}{r \sin \theta} \frac{\partial}{\partial \theta}\left(A_\theta \sin \theta\right)+\frac{1}{r \sin \theta} \frac{\partial A_{\varphi}}{\partial \varphi}\). (Undergraduate, years 1–2)
  • Use the divergence theorem on a sphere of radius \(a\) to find what happens at \(\mathbf{r}=\mathbf{0}\), and hence justify the delta function. Recall that \(d \mathbf{A} = a^2\, \hat{\mathbf{r}} \, d \Omega\) with \(d \Omega = \sin \theta \, d \theta \, d \phi\), \(\theta \in [0, \pi]\) and \(\phi \in [0, 2 \pi)\). (Undergraduate, years 1–2)
  • Find the speed of the ball as it passes through the centre of the Earth. (Undergraduate, year 1)

Revised on 25 October 2026. The original had these errors:

  • Inside the Earth the force was written without its minus sign, which gives \(\ddot r = +\frac{GM}{R^3}\,r\). That equation describes runaway growth, not the oscillation the post goes on to describe.
  • A divergence was written \(\nabla\cdot\left(\mathbf{r}/\lVert\mathbf{r}\rVert\right)^3\) instead of \(\nabla\cdot\left(\mathbf{r}/\lVert\mathbf{r}\rVert^3\right)\).

Both are fixed. I added the travel time through the Earth (about 42 minutes) and the step from Gauss’s law to the field of a spherical mass. Previously titled “The Shell Theorem - A Gravitational Analog to Gauss’ Law”.

Filed under .