Volume Integrals

A volume integral is the three-dimensional cousin of the ordinary single integral and the surface integral. Where a line integral accumulates a quantity along a curve and a surface integral accumulates flux across a sheet, a volume integral accumulates a density throughout a solid region. The object integrated is a density — a quantity per unit volume — and the result is the total amount of the underlying extensive quantity contained in the region. Formally, one partitions the region V\mathcal{V} into tiny cells of volume dτ\mathrm{d}\tau, multiplies the local value of the integrand by that cell volume, and sums over the whole region in the limit dτ→0\mathrm{d}\tau\to 0. For a scalar integrand the result is a scalar; for a vector integrand each Cartesian component is integrated separately because the unit vectors x^,y^,z^\hat{\mathbf{x}},\hat{\mathbf{y}},\hat{\mathbf{z}} are constant and may be pulled outside the integral. In electromagnetism volume integrals are everywhere: total charge from charge density, total dipole moment, the energy stored in an electric or magnetic field, and the source terms of Coulomb's and the Biot–Savart laws. Mastery rests on two skills: writing the correct volume element for the coordinate system, and setting limits that sweep out exactly the desired region. Volume integrals are not isolated. Through the divergence (Gauss) theorem they are linked to surface integrals, and that link is the engine behind Gauss's law and the continuity equation. Understanding the geometry of dτ\mathrm{d}\tau in spherical and cylindrical coordinates is therefore the gateway to nearly every symmetric problem in the subject.

Key takeaways
  • A volume integral ∫Vf dτ\int_{\mathcal{V}} f\,\mathrm{d}\tau sums a scalar density ff over every infinitesimal chunk dτ\mathrm{d}\tau of a three-dimensional region V\mathcal{V}, returning a single number such as total charge or mass.
  • The volume element is dτ=dx dy dz\mathrm{d}\tau = \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z in Cartesian coordinates, r2sin⁡θ dr dθ dϕr^2\sin\theta\,\mathrm{d}r\,\mathrm{d}\theta\,\mathrm{d}\phi in spherical, and s ds dϕ dzs\,\mathrm{d}s\,\mathrm{d}\phi\,\mathrm{d}z in cylindrical.
  • Integrating a charge density gives Q=∫Vρ dτQ=\int_{\mathcal{V}}\rho\,\mathrm{d}\tau; integrating a vector field is done component by component, yielding a vector.
  • Choosing coordinates and limits to match the region's symmetry is the entire art: a sphere is trivial in spherical coordinates and painful in Cartesian.
  • The divergence theorem converts a volume integral of ∇ ⁣⋅F\nabla\!\cdot\mathbf{F} into a surface integral, tying volume integrals to flux through the boundary.
  • Key idea: A volume integral is a triple integral of a density over a solid region; the volume element dτ\mathrm{d}\tau carries the geometry (a Jacobian factor) of whatever coordinate system you choose, and you exploit symmetry by choosing coordinates so the limits become constants.

Where this lives today

Radiotherapy planning is volume integration with lives attached: the dose-volume histograms that oncologists sign off on are integrals of absorbed-dose density over tumour and organ volumes reconstructed from CT scans, computed by exactly the chop-into-cells logic of equation (1) — a few million voxels standing in for dτ\mathrm{d}\tau. In fusion energy, the headline number of a tokamak is a volume integral: the stored magnetic energy W=12μ0∫B2 dτW = \tfrac{1}{2\mu_0}\int B^2\,\mathrm{d}\tau. For ITER's ∼5.3 T\sim 5.3\ \mathrm{T} field over ∼840 m3\sim 840\ \mathrm{m^3} of plasma volume, the energy density B2/2μ0≈1.1×107 J/m3B^2/2\mu_0 \approx 1.1\times 10^7\ \mathrm{J/m^3} integrates to several gigajoules — the reason quench protection is engineered like crash safety. And wherever regions are too irregular to parametrize, Monte Carlo methods estimate volume integrals by random sampling — the algorithm behind every ray-traced film frame and much of quantitative finance, still equation (1) at heart, with randomness supplying the cells.

The physical picture

Picture filling the region with sugar whose density (grams per cubic centimetre) varies from place to place. The volume integral is the total mass: weigh each tiny grain by multiplying its local density times its tiny volume, then add up all grains. The integral is just that sum carried to the continuum limit.

Figure
Two ways to chop a ball — brute-force cells, or shells that ride the symmetry
generic chop: cells f(r) dτ sum every box: correct, painful spherical chop: shells 4πr² dr r one shell: 4πr² dr for ρ(r): Q = ∫ ρ(r) 4πr² dr — one integral, done outer shells carry more volume: the r² weighting is geometry, not physics

The volume element dτ\mathrm{d}\tau is the volume of one tiny cell of the coordinate grid. In Cartesian coordinates the cells are little boxes of size dx×dy×dz\mathrm{d}x\times\mathrm{d}y\times\mathrm{d}z. In spherical coordinates the cells are curved bricks: thicker far from the origin (the r2r^2) and squeezed near the poles (the sin⁡θ\sin\theta). Those geometric factors are exactly the Jacobian. Choosing coordinates is choosing a grid that hugs your region. A uniformly charged ball has constant ρ\rho and a boundary r=Rr = R; in spherical coordinates the limits are the constants 0≤r≤R0\le r\le R, 0≤θ≤π0\le\theta\le\pi, 0≤ϕ≤2π0\le\phi\le 2\pi, and the whole calculation collapses to a one-line integral over rr. The E&M payoff is direct: every QencQ_{\rm enc} that feeds Gauss's law, every superposition integral for VV, and the field-energy formulas of later chapters are volume integrals whose difficulty is set almost entirely by this choice. A vector volume integral is nothing new: because x^,y^,z^\hat{\mathbf{x}},\hat{\mathbf{y}},\hat{\mathbf{z}} point the same way everywhere, you integrate each component as a separate scalar volume integral and reassemble the vector at the end. Beware: r^,θ^,ϕ^\hat{\mathbf{r}},\hat{\boldsymbol{\theta}},\hat{\boldsymbol{\phi}} are not constant, so a vector cannot be integrated component-by-component in spherical coordinates without converting to Cartesian first.

The machinery

The definition is the sugar-weighing procedure formalized — partition, sample, weight, sum, refine:

∫Vf dτ  =  lim⁡dτ→0∑if(ri) dτi(1)\int_{\mathcal{V}} f\,\mathrm{d}\tau \;=\; \lim_{\mathrm{d}\tau\to 0}\sum_i f(\mathbf{r}_i)\,\mathrm{d}\tau_i \qquad (1)

where: ff — scalar density (integrand); V\mathcal{V} — the three-dimensional region; dτ\mathrm{d}\tau — infinitesimal volume element; ri\mathbf{r}_i — sample point in the ii-th cell. Everything that follows is about writing dτ\mathrm{d}\tau correctly. In Cartesian coordinates the cells are honest boxes:

dτ=dx dy dz(2)\mathrm{d}\tau = \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z \qquad (2)

where: dx,dy,dz\mathrm{d}x,\mathrm{d}y,\mathrm{d}z — edge lengths of the infinitesimal coordinate box; no correction factor, because Cartesian coordinates measure length directly. In spherical coordinates the cells are curved bricks and the Jacobian appears — derived honestly below:

dτ=r2sin⁡θ dr dθ dϕ(3)\mathrm{d}\tau = r^2\sin\theta\,\mathrm{d}r\,\mathrm{d}\theta\,\mathrm{d}\phi \qquad (3)

where: rr — radial distance; θ\theta — polar angle, 0≤θ≤π0\le\theta\le\pi; ϕ\phi — azimuth, 0≤ϕ<2π0\le\phi < 2\pi; r2sin⁡θr^2\sin\theta — the Jacobian: radial cells fatten as r2r^2, polar cells thin as sin⁡θ\sin\theta toward the poles. And in cylindrical coordinates:

dτ=s ds dϕ dz(4)\mathrm{d}\tau = s\,\mathrm{d}s\,\mathrm{d}\phi\,\mathrm{d}z \qquad (4)

where: ss — distance from the axis; the single factor of ss is the circumference effect: azimuthal cells at larger radius are wider.

Figure
The curved brick — three orthogonal edges whose product is the spherical volume element
z r θ dℓr = dr dℓθ = r dθ dℓφ = r sin θ dφ dτ = (dr)(r dθ)(r sin θ dφ) = r² sin θ dr dθ dφ — the Jacobian is just the brick's geometry
Derivation AThe spherical volume element from three orthogonal edges

We are deriving the Jacobian r2sin⁡θr^2\sin\theta of equation (3) — the factor whose omission is the most common volume-integral error in the course. The strategy is pure geometry: an infinitesimal spherical cell is a curved brick whose three edges are the displacements produced by incrementing each coordinate alone; because the spherical coordinate directions are mutually orthogonal, the cell's volume is simply the product of the three edge lengths. The step to watch is the third edge — the azimuthal circle at polar angle θ\theta has radius rsin⁡θr\sin\theta, not rr, which is where the sin⁡θ\sin\theta comes from and why cells collapse at the poles.

Step 1. Increment rr by dr\mathrm{d}r: the displacement is radial with length

dℓr=dr\mathrm{d}\ell_r = \mathrm{d}r

Why: the radial coordinate is an actual distance, so no conversion factor is needed.

Step 2. Increment θ\theta by dθ\mathrm{d}\theta: you sweep along a meridian arc of radius rr,

dℓθ=r dθ\mathrm{d}\ell_\theta = r\,\mathrm{d}\theta

Why: arc length is radius times angle — one radian of polar sweep covers more ground the farther out you are.

Step 3. Increment ϕ\phi by dϕ\mathrm{d}\phi: you sweep along a circle of latitude whose radius is the distance to the zz-axis, rsin⁡θr\sin\theta:

dℓϕ=rsin⁡θ dϕ\mathrm{d}\ell_\phi = r\sin\theta\,\mathrm{d}\phi

Why: near the pole (θ→0\theta\to 0) the latitude circle shrinks to nothing — a step in longitude there moves you almost nowhere, exactly as on a globe.

Step 4. Multiply the orthogonal edges:

dτ=dℓr dℓθ dℓϕ=r2sin⁡θ dr dθ dϕ\mathrm{d}\tau = \mathrm{d}\ell_r\,\mathrm{d}\ell_\theta\,\mathrm{d}\ell_\phi = r^2\sin\theta\,\mathrm{d}r\,\mathrm{d}\theta\,\mathrm{d}\phi

The same recipe with edges ds\mathrm{d}s, s dϕs\,\mathrm{d}\phi, dz\mathrm{d}z yields the cylindrical element (4). Two instant dividends: integrating the angular factors alone gives the full solid angle ∫02π ⁣∫0πsin⁡θ dθ dϕ=4π\int_0^{2\pi}\!\int_0^\pi \sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi = 4\pi, and integrating 11 over a ball gives ∫0Rr2 dr⋅4π=43πR3\int_0^R r^2\,\mathrm{d}r\cdot 4\pi = \tfrac{4}{3}\pi R^3 — the familiar sphere volume, the standard sanity check that your element and limits are right. Quick audit: setting f=1f=1 and integrating over a ball of radius RR returns 43πR3\tfrac{4}{3}\pi R^3 — the familiar sphere volume — confirming that the element and limits are correct; dimensionally, all three edges are lengths, so their product is indeed a volume.

With the element in hand, the physical integrals of the track follow. Total charge from a charge density:

Q=∫Vρ(r) dτ(5)Q = \int_{\mathcal{V}} \rho(\mathbf{r})\,\mathrm{d}\tau \qquad (5)

where: QQ — total charge in V\mathcal{V}; ρ\rho — volume charge density in C/m3\mathrm{C/m^3}. This innocuous formula is the right-hand side of Gauss's law: QencQ_{\rm enc} is always a volume integral, even when symmetry hides it. Vector integrands are handled one Cartesian component at a time:

∫VF dτ=x^ ⁣∫VFx dτ+y^ ⁣∫VFy dτ+z^ ⁣∫VFz dτ(6)\int_{\mathcal{V}} \mathbf{F}\,\mathrm{d}\tau = \hat{\mathbf{x}}\!\int_{\mathcal{V}} F_x\,\mathrm{d}\tau + \hat{\mathbf{y}}\!\int_{\mathcal{V}} F_y\,\mathrm{d}\tau + \hat{\mathbf{z}}\!\int_{\mathcal{V}} F_z\,\mathrm{d}\tau \qquad (6)

where: Fx,Fy,FzF_x,F_y,F_z — Cartesian components, each a scalar integral; legal only because x^,y^,z^\hat{\mathbf{x}},\hat{\mathbf{y}},\hat{\mathbf{z}} are position-independent. The dipole moment p=∫r ρ dτ\mathbf{p}=\int\mathbf{r}\,\rho\,\mathrm{d}\tau of the multipole chapter is computed exactly this way. The bridge to surface integrals is the divergence theorem:

∫V(∇ ⁣⋅F) dτ=∮SF⋅da(7)\int_{\mathcal{V}} (\nabla\!\cdot\mathbf{F})\,\mathrm{d}\tau = \oint_{\mathcal{S}} \mathbf{F}\cdot \mathrm{d}\mathbf{a} \qquad (7)

where: S\mathcal{S} — the closed surface bounding V\mathcal{V}; the volume integral of source density equals the boundary flux — dissected fully in its own article. Finally, dividing by the region's volume defines the average:

fˉ=1V∫Vf dτ,V=∫Vdτ(8)\bar{f} = \frac{1}{V}\int_{\mathcal{V}} f\,\mathrm{d}\tau, \qquad V = \int_{\mathcal{V}} \mathrm{d}\tau \qquad (8)

where: fˉ\bar{f} — volume-averaged value; VV — the volume itself, the integral of 11. Averages over spheres are exactly what the Laplacian article's mean-value property is about.

Go deeper · Derivation B · 1 minCharge of a ball with linearly rising density
Derivation BCharge of a ball with linearly rising density

We are integrating the non-uniform density ρ(r)=k r\rho(r) = k\,r over a ball of radius RR — the simplest example where the Jacobian genuinely changes the answer rather than just the bookkeeping, and a template for every "charge inside radius rr" computation that Gauss's-law problems demand. The strategy: exploit spherical symmetry to knock out both angular integrals as the solid angle 4π4\pi, then do one radial integral in which the density's power of rr and the Jacobian's r2r^2 combine. Watch how the geometric weighting drags the answer toward the outer shells — most of the ball's volume lives near its surface.

Step 1. Insert density and Jacobian into the triple integral:

Q=∫02π ⁣ ⁣∫0π ⁣ ⁣∫0R(k r)  r2sin⁡θ dr dθ dϕQ = \int_0^{2\pi}\!\!\int_0^{\pi}\!\!\int_0^{R} (k\,r)\; r^2\sin\theta\,\mathrm{d}r\,\mathrm{d}\theta\,\mathrm{d}\phi

Why: the density depends only on rr, so the angular structure of the integrand is carried entirely by the Jacobian's sin⁡θ\sin\theta.

Step 2. Do the angular integrals once and for all:

∫0πsin⁡θ dθ∫02πdϕ=2⋅2π=4π\int_0^{\pi}\sin\theta\,\mathrm{d}\theta\int_0^{2\pi}\mathrm{d}\phi = 2\cdot 2\pi = 4\pi

Why: this is the full solid angle — for any spherically symmetric integrand the triple integral collapses to 4π∫f(r) r2 dr4\pi\int f(r)\,r^2\,\mathrm{d}r, equivalent to summing shells of volume 4πr2 dr4\pi r^2\,\mathrm{d}r.

Step 3. The radial integral, with the combined power r⋅r2=r3r\cdot r^2 = r^3:

Q=4πk∫0Rr3 dr=4πk⋅R44=πkR4Q = 4\pi k\int_0^{R} r^3\,\mathrm{d}r = 4\pi k\cdot\frac{R^4}{4} = \pi k R^4

Why: the outer shells dominate doubly — they are both denser (the physics, ρ∝r\rho\propto r) and bigger (the geometry, 4πr24\pi r^2). Half the total charge sits beyond r=R/21/4≈0.84Rr = R/2^{1/4} \approx 0.84R.

Step 4. Sanity checks. Dimensions: kk carries C/m4\mathrm{C/m^4}, times m4\mathrm{m^4} gives coulombs. Average density: ρˉ=Q/V=πkR4/(43πR3)=34kR\bar\rho = Q/V = \pi kR^4/(\tfrac43\pi R^3) = \tfrac34 kR — three quarters of the surface density kRkR, sensibly weighted toward the outside. And the running enclosed charge Q(r)=πkr4Q(r) = \pi k r^4 is exactly the input a Gauss's-law computation of the interior field of this ball will need. Two quick checks: the shell method gives the same answer directly, ∫0R(kr)(4πr2) dr=πkR4\int_0^R (kr)(4\pi r^2)\,\mathrm{d}r = \pi kR^4, and the limit k→0k\to 0 correctly reduces the total charge to zero.

Go deeper · Derivation C · 1 minWhy vector volume integrals must be assembled in Cartesian components
Derivation CWhy vector volume integrals must be assembled in Cartesian components

We are demonstrating the trap flagged in equation (6): integrating a vector field written in spherical components cannot be done by integrating each spherical component, because the basis vectors r^,θ^,ϕ^\hat{\mathbf{r}},\hat{\boldsymbol\theta},\hat{\boldsymbol\phi} change direction from cell to cell. The test case is ∫r^ dτ\int\hat{\mathbf{r}}\,\mathrm{d}\tau over a hemisphere — where the naive answer "r^\hat{\mathbf{r}} times the volume" is not even meaningful (which r^\hat{\mathbf{r}}?), and the honest Cartesian computation gives a definite, smaller vector. This integral is not academic: it is the structure of net-force and dipole-moment integrals over curved distributions.

Step 1. Convert the integrand to Cartesian components, which are position-independent:

r^=sin⁡θcos⁡ϕ x^+sin⁡θsin⁡ϕ y^+cos⁡θ z^\hat{\mathbf{r}} = \sin\theta\cos\phi\,\hat{\mathbf{x}} + \sin\theta\sin\phi\,\hat{\mathbf{y}} + \cos\theta\,\hat{\mathbf{z}}

Why: only with constant basis vectors can the integral distribute over components; this decomposition prices each cell's r^\hat{\mathbf{r}} in a fixed currency.

Step 2. Integrate over the upper hemisphere (0≤r≤R0\le r\le R, 0≤θ≤π/20\le\theta\le\pi/2, full ϕ\phi). The xx- and yy-components die by symmetry:

∫02πcos⁡ϕ dϕ=∫02πsin⁡ϕ dϕ=0\int_0^{2\pi}\cos\phi\,\mathrm{d}\phi = \int_0^{2\pi}\sin\phi\,\mathrm{d}\phi = 0

Why: for every cell pushing east there is a mirror cell pushing west — the azimuthal integral implements the cancellation automatically.

Step 3. The surviving zz-component factorizes:

∫r^ dτ∣z=∫0Rr2 dr∫0π/2cos⁡θ sin⁡θ dθ∫02πdϕ=R33⋅12⋅2π=πR33\int\hat{\mathbf{r}}\,\mathrm{d}\tau\Big|_z = \int_0^R r^2\,\mathrm{d}r\int_0^{\pi/2}\cos\theta\,\sin\theta\,\mathrm{d}\theta\int_0^{2\pi}\mathrm{d}\phi = \frac{R^3}{3}\cdot\frac{1}{2}\cdot 2\pi = \frac{\pi R^3}{3}

Why: cos⁡θ\cos\theta is the zz-projection of each cell's outward direction; sin⁡θ\sin\theta is the Jacobian's share. The result, ∫r^ dτ=πR33z^\int\hat{\mathbf{r}}\,\mathrm{d}\tau = \tfrac{\pi R^3}{3}\hat{\mathbf{z}}, is exactly half the hemisphere's volume — the tilted cells contribute only their vertical projections.

Step 4. Read the moral. The magnitude πR3/3\pi R^3/3 is less than the volume 2πR3/32\pi R^3/3: naive "pull the unit vector out" reasoning overestimates by a factor of 2 here, and by worse in less symmetric regions. Whenever the integrand carries r^\hat{\mathbf{r}}, θ^\hat{\boldsymbol\theta} or ϕ^\hat{\boldsymbol\phi} — net Coulomb force of a distribution, dipole moments, radiation-reaction integrals — convert to Cartesian first, integrate three scalars, reassemble. Symmetry check: the lower hemisphere contributes −πR33z^-\tfrac{\pi R^3}{3}\hat{\mathbf{z}}, so the two halves cancel and the full-sphere integral is zero — as it must be, since for every cell pointing in direction r^\hat{\mathbf{r}} there is an antipodal cell pointing in −r^-\hat{\mathbf{r}}.

Limiting cases

The same volume integral wears different clothes depending on coordinate symmetry:

CaseResultMeaning
Cartesian box∫Vf dτ=∫x1x2 ⁣∫y1y2 ⁣∫z1z2f dx dy dz\int_{\mathcal{V}} f\,\mathrm{d}\tau = \int_{x_1}^{x_2}\!\int_{y_1}^{y_2}\!\int_{z_1}^{z_2} f\,\mathrm{d}x\,\mathrm{d}y\,\mathrm{d}zBest when the region is a rectangular box; limits are constants and the order of integration is free (Fubini) for continuous ff.
Spherical∫Vf dτ=∫f r2sin⁡θ dr dθ dϕ\int_{\mathcal{V}} f\,\mathrm{d}\tau = \int f\, r^2\sin\theta\,\mathrm{d}r\,\mathrm{d}\theta\,\mathrm{d}\phiBest for spheres, shells, and cones; the Jacobian is r2sin⁡θr^2\sin\theta. The full solid angle integral ∫02π ⁣∫0πsin⁡θ dθ dϕ=4π\int_0^{2\pi}\!\int_0^{\pi}\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi = 4\pi.
Cylindrical∫Vf dτ=∫f s ds dϕ dz\int_{\mathcal{V}} f\,\mathrm{d}\tau = \int f\, s\,\mathrm{d}s\,\mathrm{d}\phi\,\mathrm{d}zBest for cylinders, wires, and solenoids; the Jacobian is the cylindrical radius ss, the distance from the axis.
Spherically symmetric integrand∫Vf(r) dτ=4π∫0Rf(r) r2 dr\int_{\mathcal{V}} f(r)\,\mathrm{d}\tau = 4\pi\int_0^R f(r)\,r^2\,\mathrm{d}rAngular integrals give the solid angle 4π4\pi; the computation is a one-variable shell sum.
Separable integrand∫g(x)h(y)k(z) dτ=( ⁣∫g dx)( ⁣∫h dy)( ⁣∫k dz)\int g(x)h(y)k(z)\,\mathrm{d}\tau = \Big(\!\int g\,\mathrm{d}x\Big)\Big(\!\int h\,\mathrm{d}y\Big)\Big(\!\int k\,\mathrm{d}z\Big)If both the integrand factorizes and the region is a box, the triple integral splits into a product of single integrals.

Worked examples

Example 1 — the uniform ball, end to end (confidence builder). The ball of the divergence and Laplacian articles: uniform ρ0=2.66 nC/m3\rho_0 = 2.66\ \mathrm{nC/m^3}, radius R=0.10 mR = 0.10\ \mathrm{m}. Total charge?

Step 1. Set up in spherical coordinates — constant limits, constant density:

Q=ρ0∫02π ⁣ ⁣∫0π ⁣ ⁣∫0Rr2sin⁡θ dr dθ dϕ=ρ0⋅R33⋅4πQ = \rho_0\int_0^{2\pi}\!\!\int_0^{\pi}\!\!\int_0^{R} r^2\sin\theta\,\mathrm{d}r\,\mathrm{d}\theta\,\mathrm{d}\phi = \rho_0\cdot\frac{R^3}{3}\cdot 4\pi

Step 2. Numbers:

Q=(2.66×10−9)⋅4π(0.10)33=(2.66×10−9)(4.19×10−3)=1.11×10−11 C≈11.1 pCQ = (2.66\times 10^{-9})\cdot\frac{4\pi (0.10)^3}{3} = (2.66\times 10^{-9})(4.19\times 10^{-3}) = 1.11\times 10^{-11}\ \mathrm{C} \approx 11.1\ \mathrm{pC}

Step 3. Check against Q=ρ0VQ = \rho_0 V with V=43πR3=4.19×10−3 m3V=\tfrac43\pi R^3 = 4.19\times 10^{-3}\ \mathrm{m^3} — identical, as it must be for a constant density. This 11.1 pC is precisely the QencQ_{\rm enc} that Gauss's law converts into the surface field E(R)=Q/4πε0R2=10.0 V/mE(R) = Q/4\pi\varepsilon_0R^2 = 10.0\ \mathrm{V/m} — the volume integral is the source-side half of every Gauss's-law calculation.

Example 2 — a density that falls to zero at the surface (exam level). A ball of radius R=0.20 mR = 0.20\ \mathrm{m} carries ρ(r)=ρ0 (1−r/R)\rho(r) = \rho_0\,(1 - r/R) with ρ0=3.0 nC/m3\rho_0 = 3.0\ \mathrm{nC/m^3}: densest at the centre, fading to zero at the edge. Find QQ and the average density.

Step 1. Spherical symmetry: collapse to the shell sum

Q=4πρ0∫0R(1−rR)r2 dr=4πρ0[R33−R44R]=4πρ0R3(13−14)=πρ0R33Q = 4\pi\rho_0\int_0^R\Big(1-\frac{r}{R}\Big)r^2\,\mathrm{d}r = 4\pi\rho_0\left[\frac{R^3}{3}-\frac{R^4}{4R}\right] = 4\pi\rho_0 R^3\left(\frac{1}{3}-\frac{1}{4}\right) = \frac{\pi\rho_0 R^3}{3}

Step 2. Numbers:

Q=π(3.0×10−9)(0.20)33=π(3.0×10−9)(8.0×10−3)3=2.51×10−11 C≈25.1 pCQ = \frac{\pi (3.0\times 10^{-9})(0.20)^3}{3} = \frac{\pi(3.0\times10^{-9})(8.0\times10^{-3})}{3} = 2.51\times 10^{-11}\ \mathrm{C} \approx 25.1\ \mathrm{pC}

Step 3. Average density from equation (8): V=43πR3=3.35×10−2 m3V = \tfrac43\pi R^3 = 3.35\times10^{-2}\ \mathrm{m^3}, so

ρˉ=QV=πρ0R3/34πR3/3=ρ04=0.75 nC/m3\bar\rho = \frac{Q}{V} = \frac{\pi\rho_0R^3/3}{4\pi R^3/3} = \frac{\rho_0}{4} = 0.75\ \mathrm{nC/m^3}

Only a quarter of the central density — even though ρ\rho falls off linearly (averaging to ρ0/2\rho_0/2 along a radius), the r2r^2 shell weighting emphasizes the outer, dilute region and drags the volume average down to ρ0/4\rho_0/4. The Jacobian is not bookkeeping; it moves answers.

Applications

Total charge and Gauss's law. Every application of Gauss's law in differential form, ∇ ⁣⋅E=ρ/ε0\nabla\!\cdot\mathbf{E} = \rho/\varepsilon_0, becomes the integral statement ∮E⋅da=Qenc/ε0\oint\mathbf{E}\cdot\mathrm{d}\mathbf{a} = Q_{\text{enc}}/\varepsilon_0 precisely because the volume integral ∫ρ dτ=Qenc\int\rho\,\mathrm{d}\tau = Q_{\text{enc}} feeds the divergence theorem. Computing QencQ_{\text{enc}} for nonuniform charge clouds is a pure volume-integral exercise.

Field energy. The energy stored in an electrostatic field is W=ε02∫all spaceE2 dτW = \tfrac{\varepsilon_0}{2}\int_{\text{all space}} E^2\,\mathrm{d}\tau, and the magnetic analogue is W=12μ0∫B2 dτW = \tfrac{1}{2\mu_0}\int B^2\,\mathrm{d}\tau. Both are volume integrals of a scalar energy density over all space, often most cleanly evaluated in spherical or cylindrical coordinates to exploit symmetry.

Multipole moments. The total dipole moment p=∫r ρ(r) dτ\mathbf{p} = \int \mathbf{r}\,\rho(\mathbf{r})\,\mathrm{d}\tau and higher multipoles are vector and tensor volume integrals. Because r\mathbf{r} is a vector, one integrates component by component (in Cartesian form) to characterize how a localized charge distribution looks from far away.

Mass, center of mass, and moment of inertia. The same machinery gives total mass M=∫ρm dτM=\int\rho_m\,\mathrm{d}\tau, center of mass R=1M∫r ρm dτ\mathbf{R} = \tfrac{1}{M}\int\mathbf{r}\,\rho_m\,\mathrm{d}\tau, and moment of inertia I=∫r⊥2 ρm dτI = \int r_\perp^2\,\rho_m\,\mathrm{d}\tau, where ρm\rho_m is mass density — showing that volume integrals span electromagnetism and mechanics alike.

Origins · 1 minBernhard Riemann and how this was discovered
BR
Bernhard Riemann
1826–1866 · Göttingen

Riemann was so shy that lecturing terrified him, and so original that three of his short papers each founded a field. The integral bearing his name — the partition-sample-sum-refine limit that opens this article — appeared almost as an aside in his 1854 habilitation thesis on trigonometric series: the first rigorous answer to the question "which functions can be integrated at all?" The same year, prodded by Gauss to speak on the foundations of geometry, he introduced curved spaces of arbitrary dimension, handing Einstein the mathematics of general relativity sixty years early. He was also a working physicist — collaborating with Wilhelm Weber on electromagnetism, formulating one of the first field theories that propagated electric action at finite speed — so the volume integrals of charge and energy in this chapter are computed by a definition its author built partly for electrodynamics. He died of tuberculosis at thirty-nine, leaving the Riemann hypothesis to torment mathematics indefinitely.

History
1770
— Euler and Lagrange develop multiple integrals for the attraction of bodies, the first physics-driven volume integrals
1813
— Gauss computes the attraction of ellipsoids, tying volume integrals of density to surface fluxes
1854
— Riemann's habilitation thesis gives integration its rigorous partition-and-refine definition
1873
— Maxwell's Treatise writes field energy as a volume integral of energy density over all space
1902
— Lebesgue generalizes the integral, licensing the delta functions and singular densities physics had already smuggled in

Going further

References. Griffiths, Introduction to Electrodynamics, 4th ed., §1.3.3 · Jackson, Classical Electrodynamics, 3rd ed., Chapter 1 and Appendix on coordinate systems · Purcell & Morin, Electricity and Magnetism, 3rd ed., Chapter 1 · Zangwill, Modern Electrodynamics, Chapter 1 Key results to keep in hand: the spherical Jacobian r2sin⁡θr^2\sin\theta follows from the orthogonal edge lengths dr\mathrm{d}r, r dθr\,\mathrm{d}\theta, rsin⁡θ dϕr\sin\theta\,\mathrm{d}\phi; the polar integral gives ∫0πsin⁡θ dθ=2\int_0^{\pi}\sin\theta\,\mathrm{d}\theta=2 and the full solid angle 4π4\pi; the uniform ball charge is Q=43πR3ρ0Q=\tfrac{4}{3}\pi R^3\rho_0; the linear-rise profile gives Q=πkR4Q=\pi k R^4 via 4πk∫0Rr3 dr4\pi k\int_0^R r^3\,\mathrm{d}r; and the sphere volume is 43πR3\tfrac{4}{3}\pi R^3. The field-energy formulas W=ε02∫E2 dτW=\tfrac{\varepsilon_0}{2}\int E^2\,\mathrm{d}\tau and W=12μ0∫B2 dτW=\tfrac{1}{2\mu_0}\int B^2\,\mathrm{d}\tau are the electrostatic and magnetostatic energy densities integrated over all space.

Builds on: Scalar and Vector Fields · Line Integrals · Surface Integrals and Flux · Spherical Coordinates Leads to: The Divergence (Gauss) Theorem · The Divergence of a Vector Field · The Curl (Stokes) Theorem

How do I know when I can use the shell shortcut instead of the full triple integral?

Whenever both the integrand and the region are spherically symmetric: density depending only on rr, integrated over a ball, shell, or all space. Then the angular integrals always give the solid angle 4π4\pi, and ∫f dτ=4π∫f(r) r2 dr\int f\,\mathrm{d}\tau = 4\pi\int f(r)\,r^2\,\mathrm{d}r — physically, you are summing onion layers of volume 4πr2 dr4\pi r^2\,\mathrm{d}r. The moment either ingredient breaks the symmetry — a density with θ\theta-dependence, a hemispherical region, an off-centre ball — at least one angular integral survives and must be done honestly, as in the hemisphere derivation above.

Is the r² sin θ factor something I should memorize or something I can rebuild?

Rebuild it in ten seconds and you will never misremember it: the three orthogonal edges of a spherical cell are dr\mathrm{d}r (radial), r dθr\,\mathrm{d}\theta (meridian arc), and rsin⁡θ dϕr\sin\theta\,\mathrm{d}\phi (latitude arc); multiply. The same three edge lengths also generate the surface elements — fix rr and you get the sphere's r2sin⁡θ dθ dϕr^2\sin\theta\,\mathrm{d}\theta\,\mathrm{d}\phi — and the gradient's scale factors from the earlier articles. One curved brick, the entire chapter's worth of Jacobians.

Does the order of integration in a triple integral matter?

For continuous integrands over well-behaved regions, no — Fubini's theorem lets you integrate in any order. What changes is the difficulty: the limits must describe the same region in each ordering, and a region that gives constant limits in one order can give variable, nested limits in another. Strategy: pick the order in which the innermost integrals have the simplest limits, and pick the coordinate system before worrying about order at all — a good coordinate choice usually makes every order easy.

How do point charges fit into the volume-integral picture — their density is infinite?

Through the Dirac delta: a point charge qq at r0\mathbf{r}_0 has density ρ(r)=q δ3(r−r0)\rho(\mathbf{r}) = q\,\delta^3(\mathbf{r}-\mathbf{r}_0), an object defined precisely by how it behaves under volume integrals — ∫f(r) δ3(r−r0) dτ=f(r0)\int f(\mathbf{r})\,\delta^3(\mathbf{r}-\mathbf{r}_0)\,\mathrm{d}\tau = f(\mathbf{r}_0). Then Q=∫ρ dτ=qQ = \int\rho\,\mathrm{d}\tau = q comes out correctly, and the whole discrete/continuous divide dissolves: sums over point charges and integrals over clouds are one formalism. The divergence article's ∇⋅(r^/r2)=4πδ3(r)\nabla\cdot(\hat{\mathbf{r}}/r^2) = 4\pi\delta^3(\mathbf{r}) is this machinery running in reverse.

Field-energy integrals run over all space — how can an infinite region give a finite answer?

By falling off fast enough. The electrostatic energy density of a point-charge-like field scales as E2∝1/r4E^2 \propto 1/r^4, while shells contribute volume 4πr2 dr4\pi r^2\,\mathrm{d}r — the integrand of the radial integral goes as 1/r21/r^2, which converges at infinity. (At the origin the same integral diverges for a true point charge, an honest infinity that hints at the self-energy problems of classical electrodynamics.) The working rule: check the large-rr behaviour of integrand times r2r^2; if it dies faster than 1/r1/r, all space is affordable.

When should I use cylindrical rather than spherical coordinates?

Match the grid to the region's symmetry axis. Cylindrical coordinates (dτ=s ds dϕ dz\mathrm{d}\tau = s\,\mathrm{d}s\,\mathrm{d}\phi\,\mathrm{d}z) hug anything with a preferred straight axis: wires, solenoids, coaxial cables, discs, beams. Spherical coordinates hug anything organized around a point: balls, shells, atoms, radiation zones. The tell in a problem statement: densities written as ρ(s)\rho(s) or "per unit length" want cylindrical; ρ(r)\rho(r) or "as seen from far away" wants spherical. Choosing wrong is never fatal — just painful, with square roots and variable limits where constants should be.

What does a negative volume integral of charge density mean physically?

Simply that the region holds net negative charge — the integral is an honest signed sum, with ρ<0\rho < 0 cells subtracting. This signed character is essential everywhere: a neutral atom has ∫ρ dτ=0\int\rho\,\mathrm{d}\tau = 0 over its volume even though ρ\rho is violently nonzero inside; a capacitor's two plates integrate to ±Q\pm Q. Contrast with genuinely non-negative integrands like mass density or field energy density ε0E2/2\varepsilon_0E^2/2, whose volume integrals can only grow as the region expands.

Before this

Where this leads