The Shell Theorem: A Gravitational Analogue of Gauss’s Law
From the archive (2023). Corrected in October 2026; see the note at the end.
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.
A dubious assumption?
The astute reader will notice that this assumes the gravitational force comes only from the enclosed mass. Why should the mass outside radius \(r\) exert no net force?
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:
\[\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}}.\]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\),
\[g(r) \cdot 4\pi r^2 = -4\pi G M_{\text{enc}}(r) \quad\Longrightarrow\quad \mathbf{g}(r) = -\frac{G M_{\text{enc}}(r)}{r^2}\,\hat{\mathbf{r}} .\]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)
Changes on 25 October 2026
What was wrong.
- 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)\).
What changed. 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”.