Tutorials › Calculus III › Local Flux Balance on a Small Volume

The Divergence Theorem · Tutorial 951 of 999

Local Flux Balance on a Small Volume

Use Taylor expansions on opposite faces to derive the local flux balance and interpret divergence as the leading-order outward flux per unit volume.

Advanced 9 min read

What You'll Learn

  • Express outward flux through each pair of opposite box faces with the correct signs.
  • Apply first-order Taylor expansions to field components on opposite faces.
  • Explain why transverse first-order terms cancel when integrated over symmetric faces.
  • Derive the leading-order relation between flux, divergence at the center, and volume.
  • Distinguish the approximation from an exact equality and estimate its error.
  • Identify and correct a common outward-normal sign error.

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.

Goal: For a sufficiently smooth vector field and a small box centered at a point, show that its outward flux is, to leading order, the divergence at the center multiplied by the box’s volume.

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

$$ \Phi_x = \int_{y_0-b}^{y_0+b}\int_{z_0-c}^{z_0+c} \bigl[P(x_0+a,y,z)-P(x_0-a,y,z)\bigr]\,dz\,dy. $$

The minus sign between the component values is essential: the two faces have opposite outward normals. The other two pairs of faces give

$$ \begin{aligned} \Phi_y &= \int_{x_0-a}^{x_0+a}\int_{z_0-c}^{z_0+c} \bigl[Q(x,y_0+b,z)-Q(x,y_0-b,z)\bigr]\,dz\,dx,\\ \Phi_z &= \int_{x_0-a}^{x_0+a}\int_{y_0-b}^{y_0+b} \bigl[R(x,y,z_0+c)-R(x,y,z_0-c)\bigr]\,dy\,dx,\\ \Phi&=\Phi_x+\Phi_y+\Phi_z. \end{aligned} $$

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

$$ P(x_0\pm a,y_0+u,z_0+v) = P_0\pm aP_x+uP_y+vP_z+E_{\pm}(u,v), $$

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

$$ P(x_0+a,y_0+u,z_0+v)-P(x_0-a,y_0+u,z_0+v) = 2aP_x+E_+(u,v)-E_-(u,v). $$

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\).

Definition: For \(\mathbf{F}=(P,Q,R)\), the divergence is \(\nabla\cdot\mathbf{F}=P_x+Q_y+R_z\). It is the sum of the field component’s rate of change in its own coordinate direction.

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

$$ \Phi = 8abc\bigl(P_x+Q_y+R_z\bigr)(x_0,y_0,z_0) + O(\varepsilon^4) = (\nabla\cdot\mathbf{F})(x_0,y_0,z_0)\,(8abc) + O(\varepsilon^4). $$

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.

Why the derivation works: Opposite faces sample the same field component at locations separated in the normal direction. Their difference isolates the first-order change in that direction. Transverse first-order changes cancel because the opposite faces are paired at the same transverse coordinates.

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

$$ V=8abc=8(0.1)(0.2)(0.1)=0.016. $$

The divergence is constant:

$$ \nabla\cdot\mathbf{F} = \frac{\partial}{\partial x}(2x-y) +\frac{\partial}{\partial y}(3y+z) +\frac{\partial}{\partial z}(4z-x) =2+3+4=9. $$

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

$$ \Phi=0.032+0.048+0.064=0.144. $$

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

$$ \nabla\cdot\mathbf{F} = (1+3x^2)+(1+3y^2)+(1+3z^2), \qquad (\nabla\cdot\mathbf{F})(0,0,0)=3. $$

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

$$ P(a)-P(-a)=(a+a^3)-(-a-a^3)=2a+2a^3. $$

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

$$ \begin{aligned} \Phi &=3V+8a^3bc+8ab^3c+8abc^3\\ &=0.072+8(0.1)^3(0.2)(0.15) +8(0.1)(0.2)^3(0.15) +8(0.1)(0.2)(0.15)^3\\ &=0.072+0.00024+0.00096+0.00054\\ &=0.07374. \end{aligned} $$

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

$$ \nabla\cdot\mathbf{F}=y+z+x, \qquad (\nabla\cdot\mathbf{F})(1,1,1)=3, $$

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

$$ \Phi_x = 0.2\left(\int_{0.8}^{1.2} y\,dy\right) \left(\int_{0.9}^{1.1} dz\right) = 0.2(0.4)(0.2) = 0.016. $$

On the \(y\)-faces, the difference is \(z(1+b)-z(1-b)=2bz=0.4z\), so

$$ \Phi_y = 0.4\left(\int_{0.9}^{1.1} z\,dz\right) \left(\int_{0.9}^{1.1} dx\right) = 0.4(0.2)(0.2) = 0.016. $$

On the \(z\)-faces, the difference is \(x(1+c)-x(1-c)=2cx=0.2x\), giving

$$ \Phi_z = 0.2\left(\int_{0.9}^{1.1}x\,dx\right) \left(\int_{0.8}^{1.2}dy\right) = 0.2(0.2)(0.4) = 0.016. $$

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

$$ 5(4bc)+5(4bc)=40bc. $$

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

$$ 5(4bc)-5(4bc)=0. $$

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.

  1. Why does the negative-\(x\) face contribute \(-P\), rather than \(P\), to outward flux?
  2. In the Taylor expansion on opposite \(x\)-faces, which first-order terms cancel when the component values are subtracted?
  3. What is the leading-order flux through a small box of volume \(V\) centered at a point where the divergence is \(d\)?
  4. Why should the leading-order formula not be treated as an exact equality for every finite box?
  5. For a constant vector field, what is the net flux from each pair of opposite faces, and why?