From Outward Flux to a Local Balance
A vector field describes a quantity with both magnitude and direction, such as fluid velocity or a force field. Its outward flux through a closed surface measures the net amount of the field passing out through that surface. The divergence at a point describes a local tendency to spread outward. The connection between these ideas can be seen by examining flux through a small box around the point.
The box must be small enough that the field does not vary much across it, but its variation cannot simply be ignored: the small changes between opposite faces are precisely what produce the leading-order net flux. Taylor expansion makes those changes visible.
Set Up the Box and Its Flux
Let \(\mathbf{F}=(P,Q,R)\) be a vector field with continuous second partial derivatives near the point \((x_0,y_0,z_0)\). Take a box centered at that point, with half-widths \(a,b,c>0\) in the \(x,y,z\) directions. Its faces lie at \(x=x_0\pm a\), \(y=y_0\pm b\), and \(z=z_0\pm c\); its volume is \(8abc\).
On a face perpendicular to the \(x\)-axis, the outward unit normal is either \((1,0,0)\) or \((-1,0,0)\). Thus the field’s normal component is \(P\) on the positive-\(x\) face and \(-P\) on the negative-\(x\) face. Define the outward flux through the whole box by \(\Phi\), and denote the combined contribution from the two \(x\)-faces by \(\Phi_x\). Then
The minus sign between the component values is essential: the two faces have opposite outward normals. The other two pairs of faces give
Why the Divergence Appears
Write points on the \(x\)-faces as \((x_0\pm a,y_0+u,z_0+v)\), where \(-b\leq u\leq b\) and \(-c\leq v\leq c\). A first-order Taylor expansion of \(P\) about the box center gives
where \(P_0\) and the partial derivatives \(P_x,P_y,P_z\) are evaluated at \((x_0,y_0,z_0)\). Since the field has continuous second partial derivatives, the Taylor remainders satisfy \(|E_{\pm}(u,v)|\leq K\rho^2\) for some constant \(K\) near the center, where \(\rho=\sqrt{a^2+b^2+c^2}\).
Subtract the negative-face value from the positive-face value. The constant term and the terms involving \(u\) and \(v\) are the same on both faces, so they cancel. What remains is
The first-order contribution \(2aP_x\) is constant over this pair of faces. Their combined area is \(4bc\), so its integrated contribution is \(8abcP_x\). The remainder contributes at most a constant times \(bc\rho^2\). Repeating the same argument on the \(y\)- and \(z\)-faces gives the corresponding partial derivatives \(Q_y\) and \(R_z\).
If the box shrinks with a fixed shape, its half-widths are proportional to a common small scale \(\varepsilon\). Its face areas are then proportional to \(\varepsilon^2\), while \(\rho^2\) is proportional to \(\varepsilon^2\). The remainder in the total flux is therefore of order \(\varepsilon^4\), whereas the leading term is of order \(\varepsilon^3\). We obtain the local flux balance
In particular, the leading-order outward flux is the divergence at the center times the box’s volume. The error term means that the difference between the exact flux and that leading term is bounded by a constant times \(\varepsilon^4\) for sufficiently small boxes of fixed shape. It does not claim that the approximation is an exact equality for every finite box.
Worked Example: A Linear Field
Worked Example: A Linear Field
Let \(\mathbf{F}=(2x-y,\,3y+z,\,4z-x)\). Use a box centered at \((1,0,-1)\) with half-widths \(a=0.1\), \(b=0.2\), and \(c=0.1\). Its volume is
The divergence is constant:
For the \(x\)-faces, the component difference is \(P(x_0+a,y,z)-P(x_0-a,y,z)=4a=0.4\). The area of each face is \(4bc=4(0.2)(0.1)=0.08\), so the pair contributes \(0.4(0.08)=0.032\).
For the \(y\)-faces, the component difference is \(6b=1.2\), and the face area is \(4ac=4(0.1)(0.1)=0.04\). Their contribution is \(1.2(0.04)=0.048\). For the \(z\)-faces, the difference is \(8c=0.8\), and the area is \(4ab=4(0.1)(0.2)=0.08\). Their contribution is \(0.8(0.08)=0.064\). Thus
The divergence-volume value is \(9(0.016)=0.144\), exactly the same. This is a check of the calculation: for a linear field, the component differences across opposite faces are constant, so the first-order contributions give the exact flux.
Worked Example: A Smooth Field with a Higher-Order Error
Worked Example: A Smooth Field with a Higher-Order Error
Consider \(\mathbf{F}=(x+x^3,\,y+y^3,\,z+z^3)\) on a box centered at the origin with half-widths \(a=0.1\), \(b=0.2\), and \(c=0.15\). The divergence at the center is
The volume is \(V=8(0.1)(0.2)(0.15)=0.024\), so the leading-order approximation is \(3V=0.072\). To check the exact flux, the \(x\)-component difference is
Multiplying by the \(x\)-face area \(4bc\) gives an \(x\)-pair flux of \(8abc+8a^3bc\). The corresponding \(y\)- and \(z\)-pair fluxes are \(8abc+8ab^3c\) and \(8abc+8abc^3\). Therefore
The approximation \(0.072\) differs from the exact value by \(0.00174\). Each extra term comes from the cubic part of a field component; those terms are smaller than the leading volume-scale contribution for a sufficiently small box. The displayed exact flux confirms both the approximation and its nonzero error for this finite box.
Worked Example: Transverse Variation Cancels
Worked Example: Transverse Variation Cancels
Let \(\mathbf{F}=(xy,yz,zx)\) and take a box centered at \((1,1,1)\) with \(a=0.1\), \(b=0.2\), and \(c=0.1\). Its volume is \(V=8(0.1)(0.2)(0.1)=0.016\). Since
the local approximation is \(3V=0.048\). We can compute the face contributions directly. On the \(x\)-faces, the difference is \((1+a)y-(1-a)y=2ay=0.2y\). Thus
On the \(y\)-faces, the difference is \(z(1+b)-z(1-b)=2bz=0.4z\), so
On the \(z\)-faces, the difference is \(x(1+c)-x(1-c)=2cx=0.2x\), giving
Adding the three pair contributions gives \(\Phi=0.016+0.016+0.016=0.048\), which matches divergence times volume. The components vary across the faces, but their transverse variation is included in the integrals and does not change the resulting pair contributions.
A Sign Error to Avoid
A frequent mistake is to add the field component on both faces of a pair with the same sign. For example, take the constant field \(\mathbf{F}=(5,0,0)\). If the \(x\)-faces each have area \(4bc\), assigning a positive sign to both would give the incorrect result
But the outward normal on the negative-\(x\) face points in the negative \(x\)-direction. Its normal component is therefore \(-5\), not \(5\). The correct combined contribution is
This is consistent with \(\nabla\cdot\mathbf{F}=0\): a constant field flows into the box through one \(x\)-face at the same rate that it flows out through the other. Always include the outward normal before combining opposite-face contributions.
What the Local Balance Tells Us
The calculation gives a precise local interpretation of divergence. For a small box, the divergence at its center measures the leading-order net outward flux per unit volume. A positive divergence indicates a leading-order outward excess; a negative divergence indicates a leading-order inward excess; and zero divergence means that the first-order volume-scaled term vanishes.
The result is a local approximation, not a statement that the flux through every finite box equals divergence at its center times volume. The field may vary enough across a larger box for higher-order terms to matter. Taylor expansion also explains the role of smoothness: the component derivatives must exist, and the remainder must be controlled for the error estimate to be valid.
Check Your Understanding
Use the definitions and face-pair calculations above to answer these questions.
- Why does the negative-\(x\) face contribute \(-P\), rather than \(P\), to outward flux?
- In the Taylor expansion on opposite \(x\)-faces, which first-order terms cancel when the component values are subtracted?
- What is the leading-order flux through a small box of volume \(V\) centered at a point where the divergence is \(d\)?
- Why should the leading-order formula not be treated as an exact equality for every finite box?
- For a constant vector field, what is the net flux from each pair of opposite faces, and why?