Van der Waals from the Virial Expansion

The van der Waals equation was born as an inspired guess: shrink the volume by NbNb for the space molecules occupy, and drop the pressure by an2an^2 for their mutual attraction. This article shows the guess is exactly right — to first order in density — and computes what aa and bb actually are in terms of the forces between molecules. That is the microscopic derivation the equation (aq-sm-van-der-waals-equation) takes for granted. The engine is the virial expansion (aq-sm-virial-expansion), whose leading correction is the second virial coefficient B2(T)=−12∫f(r) d3rB_2(T)=-\tfrac12\int f(\mathbf r)\,\mathrm{d}^3r, a single integral over the Mayer function f=e−βu−1f=e^{-\beta u}-1 (aq-sm-mayer-f-function). Feed it a realistic potential — an impenetrable hard core plus a shallow attractive tail — and the integral splits into precisely the two pieces van der Waals intended. The hard core contributes a temperature-independent excluded volume b=23πNAσ3b=\tfrac23\pi N_A\sigma^3; the attractive tail, linearized for weak binding, contributes −a/(kBT)-a/(k_BT) with aa an integral over the tail. The result is B2(T)=b−a/(kBT)B_2(T)=b-a/(k_BT). The final move closes the loop: expand the van der Waals equation itself to order n2n^2 and read off its second virial coefficient. It is b−a/(kBT)b-a/(k_BT) — identical to the microscopic one. So matching the leading density correction identifies the phenomenological constants with definite integrals over the pair potential, and the folk recipe "V→V−NbV\to V-Nb, P→P−an2P\to P-an^2" is revealed as the exact low-density truncation dressed up as a closed equation. One must be honest about the status. Matching B2B_2 fixes aa and bb exactly, but the van der Waals equation then makes definite — and generally wrong — predictions for the higher coefficients B3,B4,…B_3,B_4,\dots. For hard spheres it gives B3=b2B_3=b^2, whereas the exact value is 58b2\tfrac58 b^2, an overestimate by a factor 8/58/5. The van der Waals equation is therefore the simplest closed-form interpolation consistent with the exact low-density limit, not a systematic expansion — a distinction worth keeping sharp.

Key takeaways
  • The van der Waals constants aa and bb are not free parameters: they emerge from the second virial coefficient B2(T)B_2(T) of a gas of hard cores plus a weak long-range attraction.
  • Splitting B2(T)=−12∫f d3rB_2(T)=-\tfrac12\int f\,\mathrm{d}^3r at the core radius gives a TT-independent excluded-volume piece bb and an attractive piece −a/(kBT)-a/(k_BT): exactly B2(T)=b−a/(kBT)B_2(T)=b-a/(k_BT).
  • The hard core gives b=23πNAσ3b=\tfrac23\pi N_A\sigma^3 — four times the molecular volume — while the attractive tail integrates to a=2πNA2∫σ∞∣uattr(r)∣ r2 dr>0a=2\pi N_A^2\int_\sigma^\infty|u_{\rm attr}(r)|\,r^2\,\mathrm{d}r>0.
  • Expanding the van der Waals equation to order n2n^2 reproduces this same B2B_2, so the derivation is exact only to first order in density; the full equation is an approximate resummation of the excluded-volume effect.
  • The construction is the cleanest bridge from the microscopic Mayer cluster expansion to a macroscopic equation of state, and it underlies the law of corresponding states.
  • Key idea: compute B2(T)=−12∫(e−βu−1) d3rB_2(T)=-\tfrac12\int(e^{-\beta u}-1)\,\mathrm{d}^3r for a hard-core-plus-attraction potential; the repulsion gives a TT-independent excluded volume bb and the attraction gives −a/(kBT)-a/(k_BT), so B2=b−a/(kBT)B_2=b-a/(k_BT) — precisely the second virial coefficient of the van der Waals equation.

Where this lives today

The split that produces aa and bb — a hard repulsive reference carrying the fluid's structure, plus a weak attractive tail treated as a perturbation — is the founding idea of modern liquid-state theory. Barker–Henderson and Weeks–Chandler–Andersen perturbation theories make this rigorous: the reference hard-sphere fluid is solved accurately (its structure factor is known nearly exactly), and the attraction is added as a controlled correction. These theories power the equations of state used to model everything from liquid metals to colloidal suspensions and protein solutions, where a short-ranged attraction on top of excluded volume governs phase behaviour. The derivation also anchors primary metrology. Second (and third) virial coefficients computed from ab initio pair potentials for helium — the same B2=−12∫fB_2=-\tfrac12\int f evaluated for a quantum-accurate potential — underpin acoustic and dielectric-constant gas thermometry, part of how the kelvin is now realized and how the Boltzmann constant was pinned down. In every case the through-line is the one this article establishes: a macroscopic constant of an equation of state is, at bottom, an integral over the forces between two molecules.

The physical picture

Watch two molecules approach. At short range they cannot interpenetrate — a hard wall — so configurations where their centres are closer than the diameter σ\sigma are simply forbidden. That removal of configuration space is the excluded volume: it pushes the pressure up, and it is temperature-independent because a wall is a wall at any temperature. At longer range the molecules feel a gentle attraction, so configurations where they sit near each other are weighted more (the Boltzmann factor exceeds one). That extra weight lowers the energy and reduces the pressure — the −a/(kBT)-a/(k_BT) term. The single second virial coefficient carries both effects, one positive and constant, one negative and temperature-dependent. The first figure is the potential and its split. A realistic pair potential is a steep repulsive core at r<σr<\sigma and a shallow attractive well beyond. The Mayer function f=e−βu−1f=e^{-\beta u}-1 turns this into something bounded and short-ranged: f=−1f=-1 inside the core (the Boltzmann factor vanishes), and f≈β∣uattr∣>0f\approx\beta|u_{\rm attr}|>0 in the attractive region at not-too-low temperature. The integral B2=−12∫f d3rB_2=-\tfrac12\int f\,\mathrm{d}^3r therefore receives a positive contribution bb from the core (where f=−1f=-1) and a negative contribution −a/(kBT)-a/(k_BT) from the well (where f>0f>0).

Figure
The hard-core-plus-attraction potential u(r) (steep wall at σ, shallow well beyond) and its split into the two van der Waals pieces: the core gives the excluded volume b, the attractive tail gives a
r → u(r) 0 σ hard core u = +∞ → b attractive tail u < 0 → a −ε

The second figure is the payoff and the punchline. Because attraction carries the 1/T1/T, it dominates at low temperature and fades at high temperature, so B2(T)B_2(T) rises from strongly negative values (attraction-dominated) at low TT, crosses zero at the Boyle temperature TB=a/(bkB)T_B=a/(bk_B), and saturates toward the hard-core value bb at high TT. The two van der Waals constants are literally the intercept and the slope of this curve: bb is the high-TT plateau, and aa sets where the zero-crossing sits.

Figure
Punchline: B₂(T) = b − a/(k_BT) rises from strongly negative at low T (attraction), crosses zero at the Boyle temperature T_B = a/(bk_B), and saturates at the excluded volume b at high T — the two constants are the plateau and the crossing
T → B₂ 0 b (high-T plateau) T_B = a/(bk_B) attraction dominates (B₂ < 0)

The van der Waals equation can even be read off without any integral, by two heuristic substitutions in the ideal gas law: replace VV by the free volume V−NbV-Nb, and reduce the pressure by a mean-field attraction ∝n2\propto n^2. The virial derivation shows this folk recipe is exact to first order in density and tells you precisely what aa and bb mean — the whole point of this article.

The core equations

The starting point is the virial expansion in density, whose second coefficient is a single integral over the pair potential.

PkBT=n+B2(T) n2+B3(T) n3+⋯ ,B2(T)=−12∫f(r) d3r(1)\frac{P}{k_BT}=n+B_2(T)\,n^2+B_3(T)\,n^3+\cdots,\qquad B_2(T)=-\frac12\int f(\mathbf r)\,\mathrm{d}^3r \qquad (1)

where: n=N/Vn=N/V — number density; Bℓ(T)B_\ell(T) — the ℓ\ell-th virial coefficient (B1≡1B_1\equiv1); f(r)=e−βu(r)−1f(\mathbf r)=e^{-\beta u(r)}-1 — the Mayer function (owned by aq-sm-mayer-f-function); β=1/(kBT)\beta=1/(k_BT). The identity B2=−b2=−12∫fB_2=-b_2=-\tfrac12\int f is delivered by the cluster expansion; the inversion of the fugacity series that produces it is owned by aq-sm-virial-expansion. For a spherically symmetric potential the pair integral collapses to a one-dimensional radial integral.

B2(T)=−2π∫0∞ ⁣(e−βu(r)−1)r2 dr(2)B_2(T)=-2\pi\int_0^\infty\!\left(e^{-\beta u(r)}-1\right)r^2\,\mathrm{d}r \qquad (2)

where: the factor 2π2\pi is 12×4π\tfrac12\times4\pi (half from the pair symmetry, 4πr24\pi r^2 from the angular integration). This single integral is the whole microscopic content of the second virial coefficient; everything below is evaluating it for the van der Waals model potential. The model is the simplest realistic one: an impenetrable core and a weak attractive tail.

u(r)={+∞,r<σuattr(r)<0,r>σ, ∣uattr∣≪kBT(3)u(r)=\begin{cases}+\infty, & r<\sigma\\[3pt] u_{\rm attr}(r)<0, & r>\sigma,\ |u_{\rm attr}|\ll k_BT\end{cases} \qquad (3)

where: σ\sigma — hard-core diameter (closest centre-to-centre approach); uattru_{\rm attr} — the shallow attractive tail. The weakness condition ∣uattr∣≪kBT|u_{\rm attr}|\ll k_BT is what lets us linearize the Boltzmann factor in the tail region, and it is the assumption that makes the attractive contribution scale as 1/T1/T. Evaluating (2) on this model splits it cleanly into the two van der Waals constants.

B2(T)=23πNAσ3⏟b−2πNA2kBT∫σ∞∣uattr(r)∣ r2 dr⏟a/(kBT)=b−akBT(4)B_2(T)=\underbrace{\frac{2}{3}\pi N_A\sigma^3}_{b}-\underbrace{\frac{2\pi N_A^2}{k_BT}\int_\sigma^\infty|u_{\rm attr}(r)|\,r^2\,\mathrm{d}r}_{a/(k_BT)}=b-\frac{a}{k_BT} \qquad (4)

where: b=23πNAσ3b=\tfrac23\pi N_A\sigma^3 — molar excluded volume, four times the molecular volume; a=2πNA2∫σ∞∣uattr∣ r2 dr>0a=2\pi N_A^2\int_\sigma^\infty|u_{\rm attr}|\,r^2\,\mathrm{d}r>0 — molar cohesion, an integral over the attractive tail. (Per molecule, drop the NAN_A factors.) This is the second virial coefficient predicted by the van der Waals equation, closing the identification.

Derivation AThe second virial coefficient of the hard-core-plus-tail gas gives b and a

The goal is to evaluate B2(T)=−2π∫0∞(e−βu−1)r2 drB_2(T)=-2\pi\int_0^\infty(e^{-\beta u}-1)r^2\,\mathrm{d}r for the model potential (3) and show it equals b−a/(kBT)b-a/(k_BT), with bb and aa definite integrals over the potential. The strategy is to split the radial integral at the core diameter σ\sigma: inside the core the Boltzmann factor vanishes so f=−1f=-1 exactly, giving a temperature-independent volume; outside, the attraction is weak so we linearize the Boltzmann factor, giving a term proportional to 1/T1/T. The subtle point to watch is the sign — the attractive tail has u<0u<0, so e−βu−1>0e^{-\beta u}-1>0 there, and the minus sign in front of B2B_2 turns it into the negative contribution −a/(kBT)-a/(k_BT).

Step 1. Split at the core. Write B2=−2π[∫0σ(e−βu−1)r2 dr+∫σ∞(e−βuattr−1)r2 dr]B_2=-2\pi\left[\int_0^\sigma(e^{-\beta u}-1)r^2\,\mathrm{d}r+\int_\sigma^\infty(e^{-\beta u_{\rm attr}}-1)r^2\,\mathrm{d}r\right]. Why: the potential has two qualitatively different regions — an infinite wall and a weak well — so the integral naturally separates at σ\sigma, and each region contributes one van der Waals constant.

Step 2. Core region. For r<σr<\sigma, u=+∞u=+\infty, so e−βu=0e^{-\beta u}=0 and f=−1f=-1. The contribution is −2π∫0σ(−1)r2 dr=+23πσ3≡b~-2\pi\int_0^\sigma(-1)r^2\,\mathrm{d}r=+\tfrac23\pi\sigma^3\equiv\tilde b (per molecule). Why: inside a hard wall no configuration is allowed, so ff takes its most negative value −1-1 everywhere; the minus sign out front flips it positive — excluded volume raises the pressure. Note there is no temperature here.

Step 3. Tail region. For r>σr>\sigma with ∣uattr∣≪kBT|u_{\rm attr}|\ll k_BT, expand e−βuattr−1≈−βuattr=β∣uattr∣e^{-\beta u_{\rm attr}}-1\approx-\beta u_{\rm attr}=\beta|u_{\rm attr}| (since uattr<0u_{\rm attr}<0). The contribution is −2πβ∫σ∞∣uattr∣ r2 dr=−a~/(kBT)-2\pi\beta\int_\sigma^\infty|u_{\rm attr}|\,r^2\,\mathrm{d}r=-\tilde a/(k_BT) with a~=2π∫σ∞∣uattr∣ r2 dr\tilde a=2\pi\int_\sigma^\infty|u_{\rm attr}|\,r^2\,\mathrm{d}r. Why: weak attraction lets the exponential be linearized, which is exactly what produces the 1/T1/T dependence; the result is negative because attraction lowers the pressure.

Step 4. Assemble. Adding the two regions, B2(T)=b~−a~/(kBT)B_2(T)=\tilde b-\tilde a/(k_BT) per molecule; multiply b~\tilde b by NAN_A and a~\tilde a by NA2N_A^2 for molar constants. Why: the two regions contribute the two van der Waals constants; the temperature-independent bb from the wall and the 1/T1/T attraction from the tail are precisely the ingredients van der Waals postulated. *Verified: the core integral −2π∫0σ(−1)r2 dr=23πσ3-2\pi\int_0^\sigma(-1)r^2\,\mathrm{d}r=\tfrac23\pi\sigma^3, the tail integral a=23πεσ3a=\tfrac23\pi\varepsilon\sigma^3 for a representative −ε(σ/r)6-\varepsilon(\sigma/r)^6 tail, and the assembled B2=b−a/(kBT)B_2=b-a/(k_BT) are checked symbolically in verify_van-der-waals-derivation.py, matching Pathria & Beale §10.1 and Reif §10.4.*

Go deeper · Derivation B · 1 minExcluded volume: why b is four times the molecular volume
Derivation BExcluded volume: why b is four times the molecular volume

The goal is the famous geometric factor: the excluded volume per molecule b=23πσ3b=\tfrac23\pi\sigma^3 is four times the volume of one molecule, not equal to it. The strategy is to compute the volume from which one sphere's centre is excluded by another, recognize it as eight molecular volumes, and then halve it because the exclusion is shared between the two partners of a pair. The point to watch is the two distinct factors of two — one from diameter-versus-radius in the forbidden ball, one from sharing the exclusion between the pair — which combine to the net factor of four.

Step 1. The forbidden ball. Two hard spheres of diameter σ\sigma (radius σ/2\sigma/2) cannot have their centres closer than σ\sigma. So the centre of sphere 2 is excluded from a ball of radius σ\sigma about sphere 1, of volume vexclpair=43πσ3v_{\rm excl}^{\rm pair}=\tfrac43\pi\sigma^3. Why: the closest approach of centres is one full diameter, so the forbidden region has radius σ\sigma, not σ/2\sigma/2 — this is the first factor of two.

Step 2. One molecular volume. A single molecule has radius σ/2\sigma/2, so vmol=43π(σ/2)3=16πσ3v_{\rm mol}=\tfrac43\pi(\sigma/2)^3=\tfrac16\pi\sigma^3. Why: this is the actual physical volume a molecule occupies, the naive quantity one might guess for bb.

Step 3. The ratio is eight. vexclpairvmol=43πσ316πσ3=8\dfrac{v_{\rm excl}^{\rm pair}}{v_{\rm mol}}=\dfrac{\tfrac43\pi\sigma^3}{\tfrac16\pi\sigma^3}=8. Why: the forbidden ball has twice the radius of a molecule, hence 23=82^3=8 times the volume — a pair excludes eight molecular volumes.

Step 4. Share between the pair. The exclusion belongs jointly to the two members of the pair, so per molecule b~=12vexclpair=23πσ3=4 vmol\tilde b=\tfrac12 v_{\rm excl}^{\rm pair}=\tfrac23\pi\sigma^3=4\,v_{\rm mol}. Why: assigning half the pair's excluded volume to each partner turns the eight into four — the celebrated van der Waals factor, and it agrees exactly with the B2B_2 core integral of the previous card. *Verified: the pair-excluded-volume-to-molecular-volume ratio =8=8 and the per-molecule b~=12vexcl=23πσ3=4vmol\tilde b=\tfrac12 v_{\rm excl}=\tfrac23\pi\sigma^3=4v_{\rm mol} are checked symbolically in verify_van-der-waals-derivation.py, matching Kardar Ch. 5 and Reif §10.3.*

Limiting cases

The behaviour of B2(T)=b−a/(kBT)B_2(T)=b-a/(k_BT) across temperature regimes maps directly onto real-gas non-ideality.

CaseResultMeaning
High temperatureB2→b=23πNAσ3>0B_2\to b=\tfrac23\pi N_A\sigma^3>0Attraction negligible; only excluded volume survives, gas harder to compress than ideal.
Boyle temperaturekBTB=a/bk_BT_B=a/b, so B2(TB)=0B_2(T_B)=0Excluded volume and attraction cancel; the gas mimics ideal to order n2n^2.
Low temperatureB2→−a/(kBT)<0B_2\to-a/(k_BT)<0Attraction dominates; pressure falls below ideal, foreshadowing condensation.
Dilute limitPkBT=n+B2(T)n2+O(n3)\dfrac{P}{k_BT}=n+B_2(T)n^2+O(n^3)Where the matching of a,ba,b is exact — vdW agrees with experiment here by construction.
Higher coefficients (hard spheres)B3vdW=b2B_3^{\rm vdW}=b^2 vs exact 58b2\tfrac58 b^2vdW overestimates B3B_3 by 8/58/5; the resummation is exact only through B2B_2.

Worked examples

1 · Excluded volume of argon and its molecular size (confidence builder)

We turn a measured van der Waals constant into a molecular diameter, computing a real number from real data.

Step 1. Argon's critical data (Tc=150.7T_c=150.7 K, Pc=4.86×106P_c=4.86\times10^6 Pa) invert to the molar b=RTc/(8Pc)=3.22×10−5b=RT_c/(8P_c)=3.22\times10^{-5} m³/mol (the inversion is owned by aq-sm-van-der-waals-equation).

Step 2. From b=23πNAσ3b=\tfrac23\pi N_A\sigma^3, solve for the diameter: σ=(3b2πNA)1/3=(3(3.22×10−5)2π(6.022×1023))1/3\sigma=\left(\dfrac{3b}{2\pi N_A}\right)^{1/3}=\left(\dfrac{3(3.22\times10^{-5})}{2\pi(6.022\times10^{23})}\right)^{1/3}.

Step 3. Evaluate: σ=0.29 nm\sigma=\mathbf{0.29\ nm}. Compare with the Lennard-Jones diameter of argon, σLJ≈0.34\sigma_{\rm LJ}\approx0.34 nm — the same size to within the expected accuracy of a hard-core caricature.

Step 4. The check on the factor of four: the molecular volume implied is vmol=16πσ3=1.3×10−29v_{\rm mol}=\tfrac16\pi\sigma^3=1.3\times10^{-29} m³, so NAvmol=8.0×10−6N_A v_{\rm mol}=8.0\times10^{-6} m³/mol — and indeed b/(NAvmol)=3.22×10−5/8.0×10−6=4.0b/(N_A v_{\rm mol})=3.22\times10^{-5}/8.0\times10^{-6}=\mathbf{4.0}, the excluded-volume factor of four confirmed from data. A tabulated constant has yielded a molecular size and verified the geometry.

2 · Nitrogen: excluded volume, attraction, and the Boyle temperature (exam level)

We assemble both van der Waals constants for nitrogen and locate its Boyle temperature, checking against the measured value.

Step 1. Nitrogen's molar b≈3.9×10−5b\approx3.9\times10^{-5} m³/mol. From b=23πNAσ3b=\tfrac23\pi N_A\sigma^3, σ=(3b2πNA)1/3=0.314 nm\sigma=\left(\dfrac{3b}{2\pi N_A}\right)^{1/3}=\mathbf{0.314\ nm}, consistent with diffraction and viscosity estimates.

Step 2. Nitrogen's molar a≈0.137a\approx0.137 Pa·m⁶/mol². The Boyle temperature is where B2=0B_2=0, i.e. kBTB=a/bk_BT_B=a/b per molecule, or in molar form TB=a/(bR)T_B=a/(bR).

Step 3. Evaluate: TB=0.137(3.87×10−5)(8.314)=426 KT_B=\dfrac{0.137}{(3.87\times10^{-5})(8.314)}=\mathbf{426\ K} using the tabulated b=3.87×10−5b=3.87\times10^{-5} m³/mol. The commonly quoted experimental Boyle temperature of nitrogen is ≈327\approx327 K; the van der Waals estimate is the right order of magnitude, high because the weak-attraction linearization and the hard-core caricature both push a/ba/b up.

Step 4. Interpretation: below TBT_B nitrogen is more compressible than ideal (attraction wins, B2<0B_2<0); above TBT_B it is stiffer than ideal (excluded volume wins, B2>0B_2>0). The single ratio a/ba/b sets this crossover, and measuring TBT_B constrains a/ba/b without needing either constant alone. Two van der Waals constants, one molecular size, and a crossover temperature — all from the second virial coefficient.

Origins · 1 minvan der Waals equation and how this was discovered
VD
van der Waals equation
the microscopic constants a, b from the pair potential (Mayer virial route) · core → b, tail → a

The van der Waals equation is the closed two-parameter equation of state (P+aN2/V2)(V−Nb)=NkBT\left(P+aN^2/V^2\right)(V-Nb)=Nk_BT, and its microscopic derivation is the demonstration that its constants aa and bb are not adjustable fudge factors but definite integrals over the intermolecular potential. The route runs through the second virial coefficient B2(T)=−12∫(e−βu−1) d3rB_2(T)=-\tfrac12\int(e^{-\beta u}-1)\,\mathrm{d}^3r of the Mayer cluster expansion: for a hard-core-plus-attraction potential the integral splits at the core radius into a temperature-independent excluded volume b=23πNAσ3b=\tfrac23\pi N_A\sigma^3 (four times the molecular volume) and an attractive piece −a/(kBT)-a/(k_BT) with a=2πNA2∫σ∞∣uattr∣r2 dra=2\pi N_A^2\int_\sigma^\infty|u_{\rm attr}|r^2\,\mathrm{d}r. Expanding the van der Waals equation itself to first order in density reproduces exactly this B2=b−a/(kBT)B_2=b-a/(k_BT), identifying the constants. The construction is honest about its limits: it is exact only through the second virial coefficient, and its predictions for B3B_3 and beyond are wrong (for hard spheres it gives b2b^2 versus the exact 58b2\tfrac58 b^2). This clean separation of a hard repulsive reference from a weak attractive perturbation is the historical seed of modern liquid-state perturbation theory, from Barker–Henderson to Weeks–Chandler–Andersen.

History
1873
— van der Waals's Leiden thesis posits the excluded-volume and attraction corrections as physical constants of the molecules.
1901
— Kamerlingh Onnes writes the empirical virial expansion, giving the framework in which B2B_2 acquires its microscopic meaning.
1927
— Ursell introduces cluster functions, the seed of the Mayer machinery that yields B2=−12∫fB_2=-\tfrac12\int f.
1937
— Mayer's cluster expansion supplies the exact B2=−b2B_2=-b_2 that this derivation evaluates for the model potential.
1967
— Barker and Henderson build liquid-state perturbation theory on the same hard-core-reference-plus-attractive-tail split.

Going further

Texts. Pathria & Beale, Statistical Mechanics, 3rd ed., §3.7, §§10.1–10.3. Kardar, Statistical Physics of Particles, Ch. 5. Reif, Fundamentals of Statistical and Thermal Physics, §§10.3–10.4. Sethna, Statistical Mechanics, Ch. 11. Hansen & McDonald, Theory of Simple Liquids (perturbation theory, B3B_3).

Provenance. Base article: AllQFT track `sm`, "Van der Waals from the Virial Expansion" (STAT.INTER.VDWDR.1251); source Pathria & Beale §10.1, Reif §10.4, Kardar Ch. 5. All symbolic and numeric claims re-verified in verify_van-der-waals-derivation.py: the core integral 23πσ3\tfrac23\pi\sigma^3, the attractive-tail integral, the assembled B2=b−a/(kBT)B_2=b-a/(k_BT), the vdW-expansion recovery of the same B2B_2, kBTB=a/bk_BT_B=a/b, the excluded-volume factor of four (pair volume =8vmol=8v_{\rm mol}, shared →4vmol\to4v_{\rm mol}), and the hard-sphere B3vdW=b2B_3^{\rm vdW}=b^2 versus exact 58b2\tfrac58b^2 (ratio 8/58/5). Numerics: argon b=3.22×10−5b=3.22\times10^{-5} m³/mol ⇒σ≈0.29\Rightarrow\sigma\approx0.29 nm with b/(NAvmol)=4.0b/(N_Av_{\rm mol})=4.0; nitrogen σ≈0.314\sigma\approx0.314 nm. No base physics error found. (Note: the vdW-estimated TBT_B runs high versus the measured value, an expected consequence of the weak-attraction linearization — stated in the worked example, not hidden.)

Prerequisites. Second Virial Coefficient · The Mayer f-Function · Virial Expansion of the Equation of State · Configuration Integral and the Interacting Partition Function.

Leads to. Van der Waals Equation of State · Maxwell Construction and Coexistence · Law of Corresponding States · Irreducible Cluster Integrals and the Virial Series.

Why does the hard core give a temperature-independent b but the attraction gives a temperature-dependent a/(k_BT)?

Because the two regions enter the Mayer function completely differently. Inside the hard core, u=+∞u=+\infty at every temperature, so f=e−βu−1=−1f=e^{-\beta u}-1=-1 regardless of TT — a wall is impassable whether the gas is hot or cold, so its excluded-volume contribution bb carries no temperature. In the attractive tail, uu is finite and weak, so f=e−βu−1≈−βu=β∣uattr∣f=e^{-\beta u}-1\approx-\beta u=\beta|u_{\rm attr}|, and this explicit β=1/kBT\beta=1/k_BT is where the temperature dependence enters. Physically, whether a molecule notices the shallow attraction depends on how fast it is moving: cold molecules linger in the well and feel it strongly, hot ones whiz past — hence the 1/T1/T.

Is the attractive constant a really positive, given the potential is negative?

Yes, and the bookkeeping is worth being careful about. The attractive tail has uattr<0u_{\rm attr}<0, so f=e−βuattr−1>0f=e^{-\beta u_{\rm attr}}-1>0 there. The second virial coefficient carries an overall minus sign, B2=−12∫fB_2=-\tfrac12\int f, so the tail contributes a negative amount to B2B_2. We package that negative contribution as −a/(kBT)-a/(k_BT) with a=2πNA2∫σ∞∣uattr∣r2 dra=2\pi N_A^2\int_\sigma^\infty|u_{\rm attr}|r^2\,\mathrm{d}r, which is manifestly positive because it integrates the magnitude ∣uattr∣|u_{\rm attr}|. So a>0a>0 and it enters B2B_2 with a minus sign — attraction lowers B2B_2 and the pressure, exactly as it should. Getting the two sign flips (the −1-1 in ff, the −- in front of B2B_2) straight is the whole subtlety.

If matching B₂ fixes a and b, why does the van der Waals equation get higher virial coefficients wrong?

Because matching B2B_2 constrains only the first density correction, while the closed van der Waals form makes definite predictions for all the higher coefficients through its algebraic structure — and those predictions are not the true ones. Expanding P=NkBT/(V−Nb)−aN2/V2P=Nk_BT/(V-Nb)-aN^2/V^2 in density, the excluded-volume denominator 1/(1−bn)1/(1-bn) generates a geometric series BℓvdW=bℓ−1B_\ell^{\rm vdW}=b^{\ell-1} for the repulsive part. For hard spheres this gives B3=b2B_3=b^2, but the exact three-body irreducible cluster integral gives B3=58b2B_3=\tfrac58 b^2 (owned by aq-sm-higher-virial-coefficients). So van der Waals overestimates B3B_3 by 8/58/5. The equation is an uncontrolled but physically motivated resummation that happens to be exact through B2B_2 — not a systematic truncation of the virial series.

Could you derive a and b from a Lennard-Jones potential instead of a hard core plus tail?

You can, and it sharpens the picture. For a full Lennard-Jones potential there is no infinitely hard wall, so the "excluded volume" becomes temperature-dependent and B2(T)B_2(T) is the exact integral −2π∫0∞(e−βuLJ−1)r2 dr-2\pi\int_0^\infty(e^{-\beta u_{\rm LJ}}-1)r^2\,\mathrm{d}r, computed numerically (this is owned by aq-sm-second-virial-coefficient). The van der Waals split into a strictly constant bb and a strictly 1/T1/T attraction is the idealization you get by replacing the steep LJ core with a true hard wall of some effective diameter and linearizing the shallow well. The effective diameter comes out close to the LJ σ\sigma — the argon example gives 0.290.29 nm versus 0.340.34 nm — which is why the caricature works as well as it does. Barker–Henderson theory makes the effective-diameter idea precise.

What does the Boyle temperature physically mean here?

It is the temperature at which the two competing effects in B2B_2 exactly cancel: B2(TB)=b−a/(kBTB)=0B_2(T_B)=b-a/(k_BT_B)=0, i.e. kBTB=a/bk_BT_B=a/b. Above it, excluded volume wins and the gas is stiffer than ideal (B2>0B_2>0); below it, attraction wins and the gas is softer than ideal (B2<0B_2<0). At TBT_B itself the leading density correction vanishes, so the gas behaves ideally over an extended range of pressures even though the molecules genuinely interact — the repulsion and attraction just happen to balance to first order in density. Measuring TBT_B therefore fixes the ratio a/ba/b (the balance of attraction to size) independently of either constant, and it is one of the cleanest experimental handles on intermolecular forces.

Why does the mean-field resummation replace V by V − Nb rather than keeping the density series?

The virial derivation gives only the leading correction B2=b−a/(kBT)B_2=b-a/(k_BT), valid at low density. To reach liquid densities van der Waals made a bold resummation: he assumed the excluded volume simply reduces the accessible volume to V−NbV-Nb at every density, and the attraction lowers the pressure by a mean-field −an2-an^2. This turns the truncated density series into a closed equation with the excluded-volume effect built in to all orders — but only approximately, since the true many-body excluded-volume corrections are not captured by a simple V−NbV-Nb. That is exactly why the equation is right through B2B_2 but overshoots B3B_3 (giving b2b^2 instead of 58b2\tfrac58 b^2). The resummation trades systematic accuracy for a closed form that reaches the liquid and predicts a critical point — a bargain that made the equation historically decisive despite its quantitative flaws.

Before this

Where this leads