Tutorials › Calculus III › Divergence in Cylindrical Coordinates

Curl and Divergence · Tutorial 914 of 999

Divergence in Cylindrical Coordinates

Learn to compute divergence from cylindrical components, understand the role of the radial scale factor, and apply the formula on regions away from the axis.

Advanced 9 min read

What You'll Learn

  • Identify the radial, angular, and vertical components of a vector field in cylindrical coordinates.
  • Use the cylindrical scale factors to write the divergence formula.
  • Derive the formula by comparing flux through the faces of a small cylindrical-coordinate box.
  • Differentiate components while holding the other cylindrical coordinates fixed.
  • Compute and check divergence for fields with angular dependence.
  • Recognize why the formula is used only where the cylindrical coordinates are regular.

Why Divergence Changes with Coordinates

Divergence measures the local outward flux of a vector field per unit volume. It does not depend on which coordinates are used to calculate it, but the calculation does depend on how those coordinates describe lengths, areas, and volumes.

In cylindrical coordinates, a point is described by \((r,\theta,z)\), where \(r\) is the distance from the \(z\)-axis, \(\theta\) is the angle around that axis, and \(z\) is the height. The radial and vertical directions have unit length per unit coordinate change. An angular change \(d\theta\), however, corresponds to a physical distance \(r\,d\theta\). That radial factor is essential when computing divergence.

We will use the unit vectors \(\mathbf e_r,\mathbf e_\theta,\mathbf e_z\). A vector field written in cylindrical components has the form \(\mathbf F=F_r\mathbf e_r+F_\theta\mathbf e_\theta+F_z\mathbf e_z\), where each component can depend on \(r,\theta,z\). The angular component is the component in the direction of increasing \(\theta\), not a derivative with respect to \(\theta\).

Definition: At a point where a vector field is differentiable, its divergence is the limiting outward flux per unit volume as a region shrinks to that point. In cylindrical coordinates, for \(r>0\), $$ \nabla\cdot\mathbf F = \frac{1}{r}\frac{\partial}{\partial r}(rF_r) +\frac{1}{r}\frac{\partial F_\theta}{\partial\theta} +\frac{\partial F_z}{\partial z}. $$

The formula applies where \(r>0\) and the field is differentiable. Each partial derivative varies one coordinate while holding the other two fixed. In particular, \(\frac{\partial}{\partial r}(rF_r)\) differentiates the entire product \(rF_r\).

Deriving the Formula from Flux

The scale factors in cylindrical coordinates are \(h_r=1\), \(h_\theta=r\), and \(h_z=1\). A small coordinate box with side changes \(\Delta r,\Delta\theta,\Delta z\) therefore has volume approximately \(r\,\Delta r\,\Delta\theta\,\Delta z\). Its faces have different areas: the radial faces have area approximately \(r\,\Delta\theta\,\Delta z\), the angular faces have area approximately \(\Delta r\,\Delta z\), and the horizontal faces have area approximately \(r\,\Delta r\,\Delta\theta\).

The net outward flux through the two radial faces is, to first order, \(\big((r+\Delta r)F_r(r+\Delta r,\theta,z)-rF_r(r,\theta,z)\big)\Delta\theta\,\Delta z\). The factor \(r\) in each term comes from the area of the corresponding radial face. The net flux through the angular faces is approximately \(\big(F_\theta(r,\theta+\Delta\theta,z)-F_\theta(r,\theta,z)\big)\Delta r\,\Delta z\). The net flux through the horizontal faces is approximately \(r\big(F_z(r,\theta,z+\Delta z)-F_z(r,\theta,z)\big)\Delta r\,\Delta\theta\).

To obtain divergence, add these contributions, divide by the small volume, and take the limit as the coordinate changes approach zero. This yields

$$ \begin{aligned} \nabla\cdot\mathbf F &= \lim_{\Delta r,\Delta\theta,\Delta z\to 0} \left[ \frac{(r+\Delta r)F_r(r+\Delta r,\theta,z)-rF_r(r,\theta,z)} {r\Delta r} \\ &\hspace{2.8em} +\frac{F_\theta(r,\theta+\Delta\theta,z)-F_\theta(r,\theta,z)} {r\Delta\theta} +\frac{F_z(r,\theta,z+\Delta z)-F_z(r,\theta,z)} {\Delta z} \right] \\ &= \frac{1}{r}\frac{\partial}{\partial r}(rF_r) +\frac{1}{r}\frac{\partial F_\theta}{\partial\theta} +\frac{\partial F_z}{\partial z}. \end{aligned} $$

This derivation explains the different factors in the formula. The radial term includes \(rF_r\) because radial-face area grows with \(r\). The angular term is divided by \(r\) because angular change corresponds to physical distance \(r\,d\theta\). The \(z\)-direction has no scale factor.

How to read the formula: The components are measured along the cylindrical unit vectors. The first term differentiates \(rF_r\), the second differentiates \(F_\theta\) with respect to angle, and the third differentiates \(F_z\) with respect to height. The factors of \(r\) account for cylindrical geometry.

Worked Examples

Worked Example: A Field with Angular Dependence in All Components

Let \(\mathbf F=r^2\cos\theta\,\mathbf e_r+r\sin\theta\,\mathbf e_\theta+z^2\mathbf e_z\). Compute its divergence and evaluate it at \(r=2,\theta=\frac{\pi}{3},z=1\).

The components are \(F_r=r^2\cos\theta\), \(F_\theta=r\sin\theta\), and \(F_z=z^2\). Compute each term separately:

$$ \frac{1}{r}\frac{\partial}{\partial r}(rF_r) = \frac{1}{r}\frac{\partial}{\partial r}(r^3\cos\theta) = \frac{1}{r}(3r^2\cos\theta) = 3r\cos\theta, $$ $$ \frac{1}{r}\frac{\partial F_\theta}{\partial\theta} = \frac{1}{r}\frac{\partial}{\partial\theta}(r\sin\theta) = \frac{1}{r}(r\cos\theta) = \cos\theta, \qquad \frac{\partial F_z}{\partial z} = \frac{\partial}{\partial z}(z^2) = 2z. $$

Thus \(\nabla\cdot\mathbf F=3r\cos\theta+\cos\theta+2z\). At the stated point, \(\cos(\frac{\pi}{3})=\frac12\), so \(3(2)(\frac12)+\frac12+2(1)=3+\frac12+2=\frac{11}{2}\).

As a check, the three terms at that point are \(3\), \(\frac12\), and \(2\); their sum is \(\frac{11}{2}\), as in the evaluated expression.

Worked Example: Simplification from Two Angular Terms

Let \(\mathbf F=r\cos\theta\,\mathbf e_r-r\sin\theta\,\mathbf e_\theta+z\,\mathbf e_z\). Find its divergence, then evaluate it at \(\theta=\frac{\pi}{2}\).

Here \(F_r=r\cos\theta\), \(F_\theta=-r\sin\theta\), and \(F_z=z\). The radial contribution is

$$ \frac{1}{r}\frac{\partial}{\partial r}(rF_r) = \frac{1}{r}\frac{\partial}{\partial r}(r^2\cos\theta) = \frac{1}{r}(2r\cos\theta) = 2\cos\theta. $$

The angular contribution is \(\frac{1}{r}\frac{\partial}{\partial\theta}(-r\sin\theta) =\frac{1}{r}(-r\cos\theta)=-\cos\theta\). The vertical contribution is \(\frac{\partial z}{\partial z}=1\). Therefore \(\nabla\cdot\mathbf F=2\cos\theta-\cos\theta+1=\cos\theta+1\). At \(\theta=\frac{\pi}{2}\), this gives \(\cos(\frac{\pi}{2})+1=0+1=1\).

Checking the sum of the separate contributions gives \(0+1=1\) at that angle, in agreement with the simplified result.

Worked Example: A Field on an Annular Region

Consider \(\mathbf F=\frac{z}{r}\mathbf e_r+r\cos\theta\,\mathbf e_\theta+r^2\sin\theta\,\mathbf e_z\) on a region with \(r>0\). Find its divergence and evaluate it at \(r=2,\theta=\frac{\pi}{6},z=3\).

The field is defined on a region away from the axis, so its components and the cylindrical divergence formula are well-defined there. Since \(rF_r=z\),

$$ \frac{1}{r}\frac{\partial}{\partial r}(rF_r) = \frac{1}{r}\frac{\partial z}{\partial r} = \frac{1}{r}(0) = 0. $$

The angular derivative holds \(r\) fixed, so \(\frac{1}{r}\frac{\partial}{\partial\theta}(r\cos\theta) =\frac{1}{r}(-r\sin\theta)=-\sin\theta\). The vertical derivative holds \(r,\theta\) fixed; since \(F_z=r^2\sin\theta\) does not depend on \(z\), it is \(0\). Thus \(\nabla\cdot\mathbf F=-\sin\theta\).

At \(\theta=\frac{\pi}{6}\), the divergence is \(-\sin(\frac{\pi}{6})=-\frac12\). The radial and vertical contributions are both zero, and the angular contribution is \(-\frac12\); adding them confirms the result.

A Common Error: Omitting the Radial Scale Factor

A tempting but incorrect approach is to differentiate each cylindrical component as though the coordinates were Cartesian. For example, one might use \(\frac{\partial F_r}{\partial r}+\frac{1}{r}\frac{\partial F_\theta}{\partial\theta}+\frac{\partial F_z}{\partial z}\), omitting the extra radial contribution. That expression does not account for the change in area of cylindrical faces.

Worked Example: Correcting a Missing Term

Take \(\mathbf F=r\,\mathbf e_r\), so \(F_r=r\), \(F_\theta=0\), and \(F_z=0\). The incorrect calculation would give \(\frac{\partial F_r}{\partial r}=1\). The correct radial term is

$$ \frac{1}{r}\frac{\partial}{\partial r}(rF_r) = \frac{1}{r}\frac{\partial}{\partial r}(r^2) = \frac{1}{r}(2r) = 2. $$

The other two contributions are zero, so \(\nabla\cdot\mathbf F=2\), not \(1\). The extra \(1\) comes from the fact that the areas of the outward-facing radial sides increase with distance from the axis. Substitution into the cylindrical formula confirms the value: the radial term is \(2\), and the angular and vertical terms vanish.

Conditions and a Reliable Calculation

The formula uses cylindrical coordinates and is stated here for \(r>0\). It should not be applied at a point on the axis by directly substituting \(r=0\): the coordinate description is not regular there, and terms in the formula may contain division by \(r\). Whether a field has a well-defined divergence on the axis requires separate care. All three worked examples were evaluated away from the axis.

A dependable calculation follows the same sequence each time:

1
Identify the components.
Write \(F_r,F_\theta,F_z\) from the coefficients of \(\mathbf e_r,\mathbf e_\theta,\mathbf e_z\), respectively.
2
Apply the radial factor.
Form \(rF_r\), differentiate that product with respect to \(r\), and divide by \(r\).
3
Differentiate the angular component.
Compute \(\frac{\partial F_\theta}{\partial\theta}\) while holding \(r\) and \(z\) fixed, then divide by \(r\).
4
Differentiate the vertical component.
Compute \(\frac{\partial F_z}{\partial z}\) while holding \(r\) and \(\theta\) fixed.
5
Add and check.
Combine all three contributions, then substitute any requested point into the resulting expression.

Angular dependence does not change the rule: it means that the angular derivative may be nonzero. In particular, a field whose components vary with \(\theta\) cannot be treated as axisymmetric. The formula also makes clear why divergence should not be calculated by simply taking the derivative of each component with respect to its matching coordinate. The radial product and the angular scale factor are part of the geometry, not optional adjustments.

Takeaway: For a differentiable cylindrical field at \(r>0\), calculate divergence as \(\frac{1}{r}\frac{\partial}{\partial r}(rF_r)+\frac{1}{r}\frac{\partial F_\theta}{\partial\theta}+\frac{\partial F_z}{\partial z}\). The factors of \(r\) follow from the lengths, areas, and volume of cylindrical-coordinate regions.

Check Your Understanding

For each question, use the cylindrical components and take partial derivatives with the other coordinates held fixed.

  1. For \(\mathbf F=r^3\mathbf e_r+2\theta\mathbf e_\theta+z\mathbf e_z\), what is the divergence at a point with \(r>0\)?
  2. Which physical length corresponds to an angular change \(d\theta\) at fixed \(r\)?
  3. For \(\mathbf F=\sin\theta\,\mathbf e_r\), which term of the divergence formula can be nonzero?
  4. What error occurs if the radial contribution is calculated as \(\frac{\partial F_r}{\partial r}\) instead of \(\frac{1}{r}\frac{\partial}{\partial r}(rF_r)\)?
  5. Why is direct substitution of \(r=0\) into the cylindrical divergence formula not justified?