Galactic potentials: Poisson, Plummer, Hernquist, isothermal and NFW
From Poisson's equation to the potential–density pairs used to model clusters, bulges and dark-matter halos, with their enclosed masses and rotation curves.
Derive Poisson's equation and Newton's theorems for spherical distributions.
Obtain, for the Plummer, Hernquist, singular isothermal and NFW models, the density, the enclosed mass, the potential and the circular velocity, verifying Poisson's equation in each case.
Relate the density profile to the shape of the rotation curve and to the total potential energy.
Implement the models numerically and check Poisson's equation with finite differences.
1. Motivation: the gravity of 10¹¹ stars
A galaxy contains on the order of 1011 stars, but none of them “feels” its neighbors one by one:
as we will see in lesson 3, the time it would take binary encounters to deflect an orbit exceeds the age of
the universe by many orders of magnitude. Each star moves, to an excellent approximation, in the
mean fieldΦ(x) created by the smooth mass distribution ρ(x). All of galactic
dynamics therefore rests on one question: given ρ, what is Φ? And on its converse, the one
dark matter answers: given the kinematics (and hence Φ), what is ρ?
In this lesson we build the mathematical tool, Poisson’s equation, and apply it to the four
spherical models that appear again and again in the literature: the Plummer model (globular clusters), the
Hernquist model (bulges and ellipticals), the isothermal sphere (flat rotation curves) and the
Navarro–Frenk–White profile (dark-matter halos in cosmological simulations).
2. Poisson’s equation
2.1 From the field of a point mass to that of a continuous distribution
Let ρ(x′) be the mass density. The force per unit mass at x is the sum of the
Newtonian contributions of each element ρ(x′)d3x′:
where G is the gravitational constant and Φ the gravitational potential (potential energy per unit
mass). To obtain a local equation we take the divergence:
∇⋅g=G∫ρ(x′)∇x⋅(∣x′−x∣3x′−x)d3x′.
The integrand vanishes for x=x′ (check it: it is the divergence of a radial field ∝1/r2)
and is singular at x=x′. Integrating over a ball Bϵ of radius ϵ
around x and applying the divergence theorem,
∫Bϵ∇x⋅(∣x′−x∣3x′−x)d3x=−∮∂Bϵϵ2n^⋅r^dS=−4π,
so that the divergence equals −4πδ3(x−x′) and
∇2Φ=4πGρ
This is Poisson’s equation. In empty regions it reduces to Laplace’s equation ∇2Φ=0.
Integrated over a volume V it gives the gravitational Gauss’s theorem:
∮∂V∇Φ⋅dS=4πGMV.
2.2 Spherical symmetry: Newton’s theorems
If ρ=ρ(r), the Laplacian reduces to its radial part and Poisson’s equation becomes
r21drd(r2drdΦ)=4πGρ(r).
Applying Gauss to a sphere of radius r: 4πr2Φ′(r)=4πGM(r), with
M(r)=4π∫0rρ(r′)r′2dr′ the enclosed mass. Thus:
drdΦ=r2GM(r),vc2(r)≡rdrdΦ=rGM(r),
where vc is the circular velocity: that of a circular orbit of radius r (centripetal force
vc2/r equal to the attraction GM(r)/r2). This is Newton’s first theorem (the field at r depends
only on the interior mass) and his second (the exterior mass exerts no net force). Integrating from infinity
with Φ(∞)=0 and splitting the integral into interior and exterior shells,
Φ(r)=−rGM(r)−4πG∫r∞ρ(r′)r′dr′.
The second term is the contribution of the exterior shells: they exert no force, but they do contribute to the
potential (a constant for each shell).
2.3 Total potential energy
With W=21∫ρΦd3x and an integration by parts one arrives at the useful form
W=−4πG∫0∞ρ(r)M(r)rdr=−∫0∞rGM(r)dM.
W is the energy required to disperse the system to infinity, and it will appear in the virial theorem
(lesson 3).
3. Four potential–density pairs
We demand the same of each model: given Φ, compute ρ via Poisson (or the reverse), obtain M(r) and
vc(r), and understand the asymptotic behavior. All the formulas are implemented in
src/lib/math/galaxias.ts, whose test numerically checks ∇2Φ=4πGρ in each case.
3.1 Plummer (1911)
Plummer proposed for globular clusters the potential of a point mass “softened” on a scale b:
ΦP(r)=−r2+b2GM.
Differentiating, Φ′=GMr/(r2+b2)3/2, hence r2Φ′=GMr3(r2+b2)−3/2 and
The density is finite at the center (ρ0=3M/4πb3) and falls off as r−5: the total mass converges to M.
The half-mass radius satisfies rh3/(rh2+b2)3/2=21, that is,
rh=b/22/3−1≈1.305b. The circular velocity grows linearly near the center (solid
body), reaches its maximum at r=2b and decays as Keplerian (r−1/2) at large distance. The potential
energy is W=−3πGM2/(32b) (problem 2).
Example. A globular cluster with M=5×105M⊙ and b=3pc has
ρ0=4.4×103M⊙pc−3 and vc,max=16.6km/s at r=4.2pc
(computed with densidadPlummer and velocidadCircularPlummer).
3.2 Hernquist (1990)
For ellipticals and bulges, whose light follows de Vaucouleurs’s R1/4 law, Hernquist found a model with
all of its dynamics in closed form:
Derivation.Φ′=GM/(r+a)2, hence r2Φ′=GMr2/(r+a)2 and
drd[r2Φ′]=GM[(r+a)22r−(r+a)32r2]=(r+a)32GMra;
dividing by 4πGr2 one obtains ρH. The enclosed mass follows from M(r)=r2Φ′/G. □
The density diverges as r−1 at the center (a cusp, integrable: M(r)∝r2) and falls off as
r−4 outside. The half-mass radius is rh=(1+2)a; the maximum circular velocity,
vc2(a)=GM/4a, is reached at r=a; and W=−GM2/6a.
Example. A bulge with M=1010M⊙ and a=0.7kpc has vc,max=124km/s at
r=0.7kpc and contributes only 67km/s at r=8kpc: the bulge does not sustain the
rotation curve at the Sun.
3.3 The singular isothermal sphere
If the velocity distribution is Maxwellian with one-dimensional dispersion σ (the same at every radius,
hence “isothermal”), the Jeans equation (lesson 3) gives ρ∝exp(−Φ/σ2) and Poisson’s equation becomes
a nonlinear (Emden) equation with no elementary solution. It does have a singular power-law solution,
which is checked by substitution:
Verification.M(r)=4π∫0r2πGσ2dr′=2σ2r/G; vc2=GM/r=2σ2;
Φ′=vc2/r=2σ2/r. And r21drd(r2⋅2σ2/r)=2σ2/r2=4πGρ. □
It is the simplest model of a flat rotation curve, but the mass diverges linearly: any real halo
must be truncated. What the isothermal sphere teaches is the correspondence vc=const⟺ρ∝r−2.
3.4 Navarro, Frenk and White (1996, 1997)
In N-body simulations of cold dark matter, Navarro, Frenk and White found that halos in equilibrium,
from the scales of dwarf galaxies up to clusters, are fitted by the same two-slope profile:
ρNFW(r)=x(1+x)2ρ0,x≡rsr,
with rs the scale radius and ρ0 a characteristic density. Like Hernquist, it has an r−1 cusp,
but it decays only as r−3: the mass diverges logarithmically and one must truncate at the virial radiusRvir. The enclosed mass is integrated with the substitution u=1+x:
where the simplification uses 1+xx⋅x1=1+x1. The circular velocity,
vc2=4πGρ0rs2g(x)/x, reaches its maximum where d[g(x)/x]/dx=0, that is, at
xmax=2.16258 (root of ln(1+x)=x(1+2x)/(1+x)2, problem 4). Halos are parametrized by
Mvir and the concentrationc≡Rvir/rs, with
ρ0=4πrs3g(c)Mvir.
Example with real data. Eilers et al. (2019, ApJ 871, 120) fit to the rotation curve of the Milky Way an
NFW halo with Mvir=(7.25±0.26)×1011M⊙, c=12.8±0.3 and Rvir=189.3±2.2kpc.
Then rs=14.8kpc, ρ0=1.05×107M⊙kpc−3 (the paper gives
1.06±0.09) and, at the solar radius R⊙=8.122kpc, the dark-matter density is
ρdm(R⊙)=0.30GeVcm−3, exactly the value they publish
(0.30±0.03). The halo contributes vc,halo(R⊙)=137km/s, which added in quadrature to the
stellar components reproduces the measured 229km/s (lesson 2). The test galaxias.test.ts verifies
these three numbers.
3.5 Comparative summary
Model
Central ρ
Outer ρ
M(∞)
Outer vc
Typical use
Plummer
finite
r−5
finite
Keplerian
globular clusters, softening in N-body
Hernquist
r−1
r−4
finite
Keplerian
bulges, ellipticals
Singular isothermal
r−2
r−2
diverges ∝r
flat
local fit of flat curves
NFW
r−1
r−3
diverges ∝lnr
decays slowly
dark-matter halos
The shape of vc(r) is the fingerprint of the profile: vc∝r if ρ is constant, vc= const if
ρ∝r−2 and vc∝r−1/2 outside all the mass. This is the bridge to the next lesson.
4. Numerical analysis: checking Poisson with finite differences
The function laplacianoRadial(Phi, r, h) in galaxias.ts evaluates r21drd(r2Φ′) with
nested centered differences. Each centered derivative has truncation error O(h2), but the round-off
error grows as ϵm∣Φ∣/h2 when two derivatives are nested. The total error,
E(h)≈C1h2+C2ϵm∣Φ∣/h2, is minimized at hopt∝ϵm1/4r:
in double precision (ϵm≈2×10−16), h/r∼10−4, which is the default value.
The test demands agreement with 4πGρ to five figures; with h/r=10−2 truncation dominates and with
h/r=10−7 round-off dominates (problem 6).
For the enclosed mass the test uses Simpson’s rule with n=2000 subintervals; its O(h4) error is
negligible except for cuspy profiles, where ρr2∝r near the origin is not smooth at r=0
and it is advisable to shift the lower limit or use the variable u=lnr.
5. Problems
1. Potential of a shell. Prove, from the general formula of §2.2, that a thin spherical shell of
mass m and radius R produces Φ=−Gm/R, constant, in its interior and −Gm/r outside.
Show solution
With ρ=4πR2mδ(r−R): for r less than R, M(r)=0 and
4π∫r∞ρr′dr′=m/R, hence Φ=−Gm/R. For r greater than R, M(r)=m and the exterior
integral vanishes: Φ=−Gm/r. This is Newton’s second theorem. ■
2. Potential energy of the Plummer model (proof). Prove that W=−32b3πGM2.
With x=tanθ, dx=sec2θdθ and 1+x2=sec2θ, the integral is
∫0π/2sin4θcos2θdθ=32π (Wallis’s formula:
∫0π/2sin4cos2=6⋅4⋅23⋅1⋅1⋅2π). Hence
W=−3πGM2/32b. ■
3. Virial velocity dispersion. Using 2K+W=0 with K=23M⟨σ2⟩ (isotropic),
compute ⟨σ2⟩ for the globular cluster of the example in §3.1 (M=5×105M⊙, b=3 pc).
Show solution
⟨σ2⟩=−W/3M=πGM/(32b). With GM⊙=1.327×1020 m³/s² and
b=9.26×1016 m: ⟨σ2⟩=π⋅6.64×1025/(32⋅9.26×1016)=7.0×107 m²/s²,
that is, σ1D≈8.4km/s, of the order observed in globular clusters (the most massive ones, such as ω Centauri, reach
15–20 km/s at the center, with larger M and b). ■
4. Maximum of the NFW curve. Prove that the NFW vc is maximal at the root of ln(1+x)=(1+x)2x(1+2x)
and solve it numerically by Newton–Raphson.
Show solution
vc2∝g(x)/x. Differentiating: dxdxg=x2g′x−g with
g′(x)=1+x1−(1+x)21=(1+x)2x. The condition g′x=g is
(1+x)2x2=ln(1+x)−1+xx, that is, ln(1+x)=(1+x)2x2+x(1+x)=(1+x)2x(1+2x).
Newton’s method on F(x)=ln(1+x)−x(1+2x)/(1+x)2 from x0=2 converges to x=2.16258 in three iterations.
Then vmax2=4πGρ0rs2⋅0.21622. ■
5. Mass of an NFW halo. For the halo of Eilers et al. (2019) compute M(r) at 8.122, 20 and 50 kpc and compare with the
total mass vc2R/G implied by vc(R⊙)=229 km/s.
Show solution
With masaNFW: M(8.122)=3.6×1010, M(20)=1.2×1011, M(50)=3.0×1011M⊙. The total
dynamical mass within R⊙ is vc2R⊙/G=(2.29×105)2⋅2.506×1020/6.674×10−11=9.9×1010M⊙:
within the solar radius the halo is only a third of the mass; the stars dominate. Beyond ∼14 kpc
dark matter dominates (Eilers et al. 2019, §5.3).
6. Computational: error of the discrete Laplacian. For the Hernquist potential with M=1011M⊙,
a=2 kpc and r=2 kpc, compute the relative error of laplacianoRadial against 4πGρ for
h/r=10−1,10−2,…,10−8 and plot logE against logh. Identify the slopes +2
(truncation) and −2 (round-off) and the optimum.
Show solution
import numpy as npG=6.6743e-11; Ms=1.98841e30; kpc=3.0857e19M=1e11*Ms; a=2*kpc; r=2*kpcPhi=lambda x: -G*M/(x+a)rho=lambda x: M/(2*np.pi)*a/(x*(x+a)**3)def lap(r,h): d=lambda x:(Phi(x+h)-Phi(x-h))/(2*h) f=lambda x:x*x*d(x) return (f(r+h)-f(r-h))/(2*h)/r**2for k in range(1, 9): h=r*10.0**-k print(k, abs(lap(r,h)/(4*np.pi*G*rho(r))-1))
One observes a decrease ∝h2 down to h/r≈10−4 (error ∼10−8) and then an increase
∝h−2: at h/r=10−8 the error is already of order unity. The optimum coincides with the estimate
h/r∼ϵm1/4 of §4.
7. Two-component model. Build vc(r) for a Hernquist bulge (1010M⊙, a=0.7 kpc) plus the
NFW halo of Eilers et al. and plot both contributions and their sum in quadrature between 0.1 and 100 kpc. What is missing to
reproduce 229 km/s at 8.1 kpc?
Show solution
At 8.1 kpc the bulge gives 67 km/s and the halo 137 km/s: 672+1372=153 km/s. About 170 km/s in
quadrature are missing: the stellar disk (and the gas), which is not spherical and requires the potential of an exponential
disk (Binney & Tremaine §2.6). Lesson 2 incorporates it.
6. Self-assessment
✦ Self-assessment
Answer all the questions to check.
7. Further reading
Binney & Tremaine (2008), Galactic Dynamics, §2.1 (potential theory, Newton’s theorems) and §2.2 (spherical models: Plummer, isochrone, Hernquist, NFW and the two-power family). The tables of chapter 2 collect the formulas of this lesson.
Sparke & Gallagher (2007), Galaxies in the Universe, ch. 3, §3.1–3.2.
Eilers, Hogg, Rix & Ness (2019), ApJ 871, 120, doi:10.3847/1538-4357/aaf648 (arXiv:1810.09466), §5.3 for the NFW fit used in the examples.
🍎 Teacher guide
Time
2 classes of 90 min + 2 h computational workshop
Learning outcome
On completion, the student derives Poisson's equation and Newton's theorems, obtains the density, enclosed mass and circular velocity of the Plummer, Hernquist, isothermal and NFW models, and numerically verifies Poisson's equation with control of the discretization error.
Evidence of learning
Submission of problems 2 (proof) and 6 (computational, with a log-log plot of the error and discussion of the optimal h), plus the two-component model of problem 7.
Materials
Python 3 with NumPy and Matplotlib (or the module src/lib/math/galaxias.ts with Node)
Binney & Tremaine, ch. 2
The paper by Eilers et al. (2019) for the halo parameters
Suggested sequence
Class 1. Poisson and Newton (90 min). Derive ∇2Φ=4πGρ from the divergence of the point
field (§2.1); Gauss’s theorem; Newton’s two theorems and the formula for Φ(r) with the two integrals.
Problem 1 in class. Close with the relation between ρ∝r−α and the shape of vc.
Class 2. The four models (90 min). Plummer and Hernquist derived on the board (§3.1–3.2); isothermal by
substitution; NFW with the integral of g(x). Discuss the comparative table. Problems 3 and 4.
Workshop (2 h). Implement the four profiles, reproduce the figures of Eilers et al. (2019) (ρ₀, ρ_dm(R☉),
v_halo(R☉)) and carry out the error study of problem 6. Bridge to lesson 2: which component is missing to
reach 229 km/s?
Common mistakes
Thinking that the exterior shells do not contribute to the potential because they exert no force: they contribute a constant, which is why Φ(r) has two terms.
Confusing the characteristic density ρ₀ of NFW with the central density: NFW diverges at r = 0; ρ₀ is a scale parameter.
Writing v_c² = GM_total/r instead of GM(r)/r: it only holds outside all the mass.
Forgetting that the masses of NFW and of the isothermal sphere diverge and that M_vir depends on the truncation convention (Δ = 200 ρ_crit in Eilers et al.).
Taking h too small in the finite differences, believing that "smaller is more precise": round-off dominates below h/r ≈ 10⁻⁴.
Key terms in this lesson (12)
Glossary terms that appear in the text. Each one links to its full entry.
Rotation curveA chart of how fast the stars of a galaxy move around its center as a function of their distance from it. It should fall off outward, as in the Solar System, but it stays flat: the main clue to dark matter.
Virial theoremA rule that relates the energy of motion of a group of stars to the energy of their gravity. It makes it possible to "weigh" a cluster of galaxies by measuring only the speed of its members.
Orbital velocityThe speed at which a body travels along its orbit. The Space Station goes around Earth at 7.7 km/s; Earth goes around the Sun at almost 30 km/s.
GravityThe force with which a planet pulls everything toward its center. On Earth it makes things fall 9.8 m/s faster every second; on Mars, with less mass and a smaller size, it is only 38 % of Earth's.
N-body problemSimulating many bodies that all attract one another: a star cluster, a galaxy, the universe. Since each body feels all the others, the computation grows very quickly with N; the Barnes–Hut trick groups the distant ones together.
Dark matterAn invisible kind of matter that neither emits nor reflects light, but whose gravity can be felt: it makes galaxies spin faster than expected. There is about five times more dark matter than normal matter, and we still do not know what it is.
GalaxyA city of stars: hundreds of billions of them, with gas, dust and dark matter, bound together by gravity. Ours is the Milky Way; the largest neighbor, Andromeda.
DerivativeHow fast something changes at an instant: the derivative of position is velocity, and the derivative of velocity is acceleration. It is the slope of the graph at each point.
OrbitThe path one body follows around another because of gravity: the Moon around Earth, Earth around the Sun. Almost all are ellipses, slightly flattened ovals.
Apparent magnitudeA number that says how bright a star looks from Earth. The smaller it is, the brighter the star: Sirius has −1.5, and the faintest stars you can see with the naked eye, 6.
Order of magnitudeThe power of ten closest to a number: saying "the Sun is a million times bigger than Earth" is talking in orders of magnitude. It is used to compare very different things without being exact.
ParsecThe distance unit astronomers use for stars: one parsec is about 3.26 light-years. It comes from measuring the tiny angle by which a star "moves" as Earth goes around the Sun.
Binney, J. & Tremaine, S. (2008). Galactic Dynamics, 2nd ed. Princeton University Press, §2.1–2.2 (potential theory; spherical models).
Sparke, L. S. & Gallagher, J. S. (2007). Galaxies in the Universe, 2nd ed. Cambridge University Press, ch. 3 (orbits and potentials).
Plummer, H. C. (1911). On the problem of distribution in globular star clusters. MNRAS 71, 460–470.
Hernquist, L. (1990). An analytical model for spherical galaxies and bulges. ApJ 356, 359–364. doi:10.1086/168845
Navarro, J. F., Frenk, C. S. & White, S. D. M. (1997). A universal density profile from hierarchical clustering. ApJ 490, 493–508. doi:10.1086/304888 (arXiv:astro-ph/9611107)
Navarro, J. F., Frenk, C. S. & White, S. D. M. (1996). The structure of cold dark matter halos. ApJ 462, 563. doi:10.1086/177173