Harmonic Functions and the Mean-Value Theorem
Take the potential of a point charge — the most lopsided, asymmetric function in electrostatics when viewed from anywhere but the charge itself — and average it over the surface of a sphere that doesn't contain the charge. The lumpy values, large on the near side, small on the far side, conspire to average out to exactly the potential at the sphere's center. Not approximately. Not to leading order. Exactly, for any sphere size, any charge position outside. Superpose such charges and the conclusion sweeps all of electrostatics: wherever there is no charge, the potential at a point equals its average over any surrounding sphere. This is the mean-value theorem for harmonic functions, and the E1 article on Laplace's equation already proved it once (by the divergence theorem) and spent its corollaries: no interior extrema, Earnshaw's ban on electrostatic traps. This article is the theorem's own home, and it earns its keep three new ways. First, a second, independent proof — the direct sphere-average of , a two-line integral with a famous bonus: Newton's shell theorem falls out of the same calculation. Second, the quantitative version: for a non-harmonic function the sphere average misses the center value by , which turns the mean-value property from a yes/no test into a measuring instrument — and proves the converse, that averaging behavior defines harmonicity. Third, the modern payoff: the theorem is a probability statement in disguise, and "walk on spheres" — bouncing a random walker from sphere to sphere until it hits the boundary — is today solving industrial boundary-value problems on GPUs with no mesh at all. The chapter's machinery leans on this theorem constantly: relaxation converges because of it, uniqueness is its corollary, and every guessed solution inherits its smoothness. Time to know it properly.
- A function is harmonic in a region if there; electrostatic potentials are harmonic wherever .
- Mean-value theorem: for a harmonic function, the value at any point equals its unweighted average over any sphere centered there (and over the enclosed ball) — exact at all radii that fit in the region.
- Direct proof by averaging the point-charge potential: a charge outside the sphere averages to the center value; a charge inside averages to — the second case is Newton's shell theorem.
- Quantitative refinement: — the average-deficit measures the Laplacian, so the mean-value property is equivalent to harmonicity (Koebe's converse).
- Probabilistic reading: is the expected boundary value at the point where a random walker released from first exits — the engine of modern mesh-free "walk on spheres" solvers.
- KEY IDEA: harmonic = mean-value obeying, exactly and at every radius; the deficit from the mean is , so averaging is not just a property of the potential — it is a complete characterization and a solver.
A harmonic function equals its average over every sphere (and ball) centered at the point — exactly, at all admissible radii — and conversely, the sphere-average deficit of any smooth function is , making the mean-value property equivalent to Laplace's equation.
Where this lives today
The theorem's most vigorous modern life is probabilistic. Kakutani proved in 1944 that harmonic functions are expectations over Brownian motion — the potential at a point is the average boundary value seen by random walkers released there — and Muller's 1956 "walk on spheres" turned that into an algorithm: from the current point, jump to a uniformly random point on the largest sphere that fits inside the domain (legal by the mean-value property, sphere by sphere), repeat until the walker lands within tolerance of the boundary, record the boundary value there, and average over many walkers. Sixty years later this became one of computer graphics' favorite tools: mesh-free Monte Carlo solvers now compute potentials, diffusion, and steady heat in CAD geometry with billions of faces — scenes no mesher survives — one independent, embarrassingly parallel walker per GPU thread. Every jump in those kernels is equation (1) being trusted at full radius. The instrument reading of equation (3) is equally alive: finite-volume and lattice methods are discrete ball averages, solver test suites verify implementations by checking the deficit against known , and in numerical relativity and lattice QCD the same "average-minus-center" stencils estimate Laplacians of fields far removed from electrostatics. When a simulation physicist says "check the residual," they are asking, at bottom, whether the mean-value property holds to tolerance.
Origins · 1 minCarl Friedrich Gauss and how this was discovered
Gauss came to potential theory the way he came to everything — sideways, from an applied problem he then rebuilt from the foundations. Terrestrial magnetism was the trigger: mapping the Earth's field with Weber in the 1830s, he needed the general theory of inverse-square potentials, and his 1840 Allgemeine Lehrsätze (General Theorems on attractive and repulsive forces acting in inverse proportion to the square of the distance) delivered it — among its results, the first explicit statement and proof of the mean-value theorem, along with the surface-integral relations that anglophone textbooks would later file under his name via "Gauss's law." Characteristically, he also anticipated the variational approach to existence (what Riemann would call the Dirichlet principle) and, just as characteristically, published none of his doubts about its rigor. The prince of mathematicians kept a motto, pauca sed matura — few things, but ripe. The mean-value theorem is a perfect specimen: one sentence, one identity, and half a chapter of consequences hanging from it.
The physical picture
Steady-state temperature is the honest analogy: with no heat sources inside, every point's temperature must equal the average of its surroundings, or heat would still be flowing. But the electrostatic theorem is stronger than the analogy suggests — the equality holds not just for infinitesimal neighborhoods (that much is the differential equation itself, the E0 chapter's averaging-meter reading of ) but for spheres of any radius, as long as the sphere and its interior stay inside the charge-free region. Local balance globalizes into an exact long-range accounting identity. That promotion from local to global is what gives the chapter its rigidity theorems: a function whose every value is an average of far-away values has no room for private behavior.
The figure's left panel is the theorem; its right panel is the price of breaking the theorem's condition. Put the charge inside the averaging sphere and the average stops caring about position entirely: it reads wherever the charge hides. Run backwards, that is Newton's shell theorem — a uniform shell of charge (or mass) attracts an exterior point as if collapsed to its center — because averaging the potential of one charge over a sphere is the same integral as evaluating the potential of a uniform shell at one point. One law-of-cosines integral, two celebrated theorems; Derivation A does it. The second big idea is to ask how much the average misses by when the function is not harmonic. The answer — Derivation B — is beautifully clean: the deficit is to leading order. Read it as an instrument: a tiny averaging sphere is a Laplacian meter, and Poisson's equation calibrates it in charge units — the average sits below the center value by inside positive charge. Read it as logic: if a function passes the mean-value test at every point for all small radii, its Laplacian has nowhere to hide and must vanish — the mean-value property doesn't just follow from harmonicity, it is harmonicity. The third idea reads the theorem as probability. "Value at center = average over sphere" is precisely the statement that equals the expected value of at a random point of the sphere. Iterate: jump to the biggest sphere that fits, land somewhere random, jump again from there. The sequence is a random walk that eventually hugs the boundary, and at the starting point equals the expected boundary value where the walk first arrives. No grid, no mesh, no matrix — just dice. This "walk on spheres" is not a curiosity; it is how a growing family of modern solvers handles geometry too messy to mesh.
The theorem, in surface and volume form
The statement being celebrated, with its fine print:
where: — any function harmonic throughout the closed ball of radius about ; — area element on the sphere. The fine print does real work: the whole ball must be charge-free, not just the shell. The E1 twin proved (1) by showing the average is radius-independent (divergence theorem); Derivation A below proves it a second way, from Coulomb's law upward, which is the version that hands you the shell theorem for free. Averaging the shells over radius immediately gives the solid-ball version:
where: the integral runs over the full ball. Each spherical shell inside the ball averages to by (1), and a weighted average of equal numbers is that number. The ball form is the one discrete solvers actually approximate — a grid node's neighbor-average is a crude ball average — and the one the probabilistic reading uses when walkers overshoot. And the quantitative refinement, valid for any smooth function, harmonic or not:
where: — the sphere average at radius . Equation (3) is the article's Swiss-army knife. Set : the mean-value theorem to (and exactly, by either full proof). Impose exact averaging for all small : forced — the converse. Substitute Poisson's equation: the average dips below center by inside positive charge — the membrane picture of the previous article, quantified.
We average (distance measured from the charge) over a sphere of radius , with the charge a distance from the sphere's center. The plan is direct integration with the law of cosines, splitting at the end into the two cases (charge outside — mean-value theorem) and (charge inside — shell theorem). One integral, evaluated honestly, carries the whole load; superposition then upgrades the single charge to any charge distribution outside the sphere.
Step 1. Set up: center the sphere at the origin, put on the -axis at distance . A surface point at polar angle sits at distance from the charge (law of cosines). The average is
Step 2. Substitute , :
Why the absolute value is the whole story: , and which way it resolves is exactly the inside/outside dichotomy.
Step 3. Charge outside (): , numerator , so
The average over the sphere is the value at its center — the mean-value theorem for one exterior charge. Any harmonic potential in the ball is a superposition of potentials of charges outside it, and the average of a sum is the sum of averages, so (1) holds in general.
Step 4. Charge inside (): , numerator , so
independent of — the sphere has no idea where the interior charge sits. Reciprocity turns this into Newton's shell theorem: the average of 's potential over the shell is, up to the constant factor , the potential that a uniformly charged shell of radius and total charge produces at the charge's location; since that potential is for any interior point and for any exterior point, a uniform shell is constant-potential inside and point-charge-like outside. Why this proof route earns its keep: the divergence-theorem proof (E1) certifies the theorem; this one computes it, shows exactly where the inside/outside condition enters, and delivers the shell theorem — the case the other proof never visits. Note: as a self-consistency check, the limits of the two cases (charge just outside and charge just inside) must agree — and they do, both giving , as required by continuity.
Go deeper · Derivation B · 1 minThe averaging meter — the deficit formula and the converse
We prove equation (3): for any smooth , the small-sphere average exceeds the center value by . The tool is a Taylor expansion under the average, and the only technology needed is the angular average of direction cosines. The payoff is double: the mean-value property becomes an if-and-only-if characterization of harmonic functions, and the sphere becomes a calibrated charge detector via Poisson's equation.
Step 1. Taylor-expand about the center ( the unit vector to a surface point):
summation over repeated indices.
Step 2. Average over the sphere. Odd powers of average to zero (every direction cancels its antipode). The quadratic average is isotropy's classic:
since and the three sum to .
Step 3. Assemble:
Why and not : the cubic term died with the other odd powers, so the first correction beyond the Laplacian is quartic — the formula is more accurate than it has any right to be, which is why coarse averaging spheres work so well as meters.
Step 4. The converse (Koebe). Suppose at some point for all small . Then for all small ; divide by and let : . A function with the mean-value property throughout a region is harmonic there — averaging behavior is Laplace's equation, and either can be taken as the definition.
Step 5. Calibrate with Poisson's equation, :
A millimeter-scale averaging sphere reading a 94-millivolt deficit is measuring five microcoulombs per cubic meter (worked example 2). This is also the identity the loaded relaxation stencil discretizes — the grid version, with its (2D) source term, was built in the two preceding articles. Self-check: on , where , the exact sphere average is ; the deficit formula gives , reproducing this exactly with zero higher corrections — the terms vanish identically for a quadratic function (worked example 1 runs the numbers).
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| harmonic in the ball | exactly, all admissible | the theorem; both proofs |
| Sphere encloses charge | , position-blind | shell theorem regime — MVP's stated condition violated |
| Small sphere in smooth | deficit | Laplacian meter, Poisson-calibrated |
| One dimension | value = average of the two points | harmonic = linear; the trivial case |
| Two dimensions | value = average over circles | same theorem, potentials, deficit |
| Exact MVP at all small radii | Koebe converse: averaging defines harmonicity |
Worked examples
1 · Auditing the theorem on explicit functions (confidence builder)
Test the machinery on three functions over a sphere of radius centered at the origin: (a) (volts, coordinates in meters, unit coefficients), (b) , (c) the point-charge potential of at distance .
Step 1. (a) Harmonicity check: — harmonic. Sphere average using :
— the anisotropic saddle averages out perfectly, at any radius.
Step 2. (b) — not harmonic. Exact average: , versus . Deficit formula: ✓ — and the terms are identically zero for a quadratic, so meter and reality agree to all digits.
Step 3. (c) Charge outside the sphere (): the average must equal the center value,
though on the sphere ranges from (near point) down to (far point). A 2.3-to-1 spread of values averaging to exactly the center's — the cancellation the theorem promises.
2 · Getting answers without solving anything (exam level)
(a) Six faces of a hollow cubical box are held at volts. Find the potential at the center. (b) A probe averages the potential over a sphere of radius deep inside the charged duct of the previous article () and compares to the center value. What deficit does it read?
Step 1. (a) Superposition of boundary data (the previous articles' preprocessor): the given problem is one of six "one-hot-face" problems. Adding all six gives a box with every face at 90 V, whose interior solution is the constant 90 V (it matches the boundary and is harmonic; uniqueness does the rest).
Step 2. By the cube's symmetry, each one-hot problem contributes the same center potential , so :
No series, no grid — symmetry, linearity, and the rigidity theorems carried the whole calculation. (Only the center is this cheap: off-center points genuinely need the separation-of-variables machinery ahead.)
Step 3. (b) The deficit formula with Poisson calibration:
Step 4. Read it as an instrument: a 94 mV average-deficit on a millimeter sphere certifies of positive charge at the probe — average below center, because positive charge makes potential hills. Double the sphere radius and the reading quadruples; that scaling is the signature that distinguishes true volume charge from a stray harmonic background, which produces no deficit at all.
Going further
References. Griffiths, Introduction to Electrodynamics, 4th ed., §3.1.4–3.1.5 · Jackson, Classical Electrodynamics, 3rd ed., §1.7–1.10 · Purcell & Morin, Electricity and Magnetism, 3rd ed., §2.12 · Zangwill, Modern Electrodynamics, §7.3 · Kellogg, Foundations of Potential Theory, Ch. VIII. Four internal consistency checks underpin the results: (1) the surface-average derivative argument ; (2) the angular averages , which produce the coefficient in equation (3); (3) the volume-form normalization in equation (2); and (4) the point-charge surface average . No empirical constants are used beyond .
Builds on: Laplace's Equation (E2) · Poisson's Equation (E2) · Laplace's Equation (E1) · The Laplacian and Second Derivatives
Leads to: Uniqueness Theorems for the Potential · Method of Images · Separation of Variables in Spherical Coordinates
The E1 Laplace article already proved the mean-value theorem. What does this article add?
Three things the E1 proof cannot give. A second, independent proof route (direct sphere-averaging of the Coulomb potential) whose branch is Newton's shell theorem — the E1 divergence-theorem route never touches that case. The quantitative deficit formula , which turns the property into a measuring instrument and proves the converse (averaging behavior defines harmonicity). And the probabilistic reading that powers modern walk-on-spheres solvers. E1 also owns the corollaries — no interior extrema and Earnshaw — which we deliberately do not re-derive; uniqueness gets its own article next.
Why is the equality exact for large spheres? Intuitively far-away values shouldn't know about my point.
They "know" through the equation, which holds at every point between them and you. One clean way to see the exactness is Derivation A: for a single outside charge the average is a closed-form integral that comes out to precisely the center value, with no residue at any radius; a general harmonic function in the ball is a superposition of such exterior-charge potentials. Alternatively (E1's route): the average's derivative with respect to radius is the outward flux of through the sphere, which vanishes shell by shell. Either way, "local balance everywhere" compounds into exact global accounting — rigidity, not coincidence.
What happens to the mean-value property if my averaging sphere encloses some charge?
The hypothesis fails and the conclusion changes in a precise, useful way. Each enclosed charge contributes its shell-theorem value to the average — position-independent — while all exterior charge still contributes its center value. So . For smoothly distributed charge, shrinking the sphere recovers the deficit formula . The failure mode is as informative as the theorem: comparing an average to a center value detects and weighs enclosed charge.
Is the mean-value property really equivalent to being harmonic, or just implied by it?
Fully equivalent, and Derivation B's Step 4 is the easy half of the proof: exact averaging at all small radii forces point by point. (Koebe's 1906 theorem sharpens this: continuity plus the mean-value property implies smoothness and harmonicity — you don't even need to assume two derivatives exist.) The equivalence is why analysts often define harmonic functions by averaging, and why the discrete world transfers so cleanly: "equal to the neighbor average" is the grid-native form of the same definition.
Does the theorem hold in two dimensions and one dimension?
Yes, with the sphere demoted to match: in 2D the average runs over circles (and the deficit coefficient becomes , since there); in 1D "the sphere about " is the two points , and the property says — which forces the straight lines that are 1D's only harmonic functions. The dimension changes the geometry and the constants, never the principle: value at center equals unweighted average over the surrounding "sphere."
How literally should I take the random-walk story? There are no walkers in electrostatics.
As mathematics, completely literally: Kakutani's theorem says the harmonic function with given boundary data equals the expected exit value of Brownian motion, and each walk-on-spheres jump is exactly equation (1) read as a probability statement. As physics, it is a reformulation, not a mechanism — nothing diffuses in a static field. The value of the reformulation is computational and conceptual: it explains the locality of influence (boundary regions a walker rarely reaches barely affect — they subtend little "harmonic measure") and it yields estimators for at a single point without solving anywhere else, something no deterministic method offers.
Why do relaxation methods converge to the right answer rather than drifting forever?
Because the update rule is the (discrete) mean-value property, and the property pins the solution rigidly. The grid solution — every node equal to its neighbor average, boundary nodes fixed — exists and is unique (a discrete maximum principle: the difference of two solutions is average-obeying with zero boundary values, and its extremes live on the boundary, so it vanishes). Each sweep is a contraction toward that fixed point, monotone in the right norm. The full algorithmic story — stencils, error orders, source terms, over-relaxation — lives in the two preceding articles; this article supplies the theorem that guarantees their target exists and is the only one.