Why Coordinate Choice Matters
A divergence or curl calculation is only as efficient as the coordinates used to describe the field. A field whose components are simple in Cartesian coordinates can become complicated in cylindrical or spherical coordinates. Conversely, a field with radial or rotational symmetry may require unnecessary trigonometric expressions if it is written in Cartesian components.
The aim is not to find one coordinate system that is always best. It is to recognize the geometry of a field and choose coordinates in which its components and their derivatives are simplest. A useful check is to compute in another system when the conversion is manageable.
Coordinates and Components
In Cartesian coordinates, a vector field is written \(\mathbf F=F_x\mathbf e_x+F_y\mathbf e_y+F_z\mathbf e_z\), where the unit vectors are constant. Cylindrical coordinates \((\rho,\phi,z)\) use distance \(\rho\) from the \(z\)-axis, azimuthal angle \(\phi\), and height \(z\). Their unit vectors are \(\mathbf e_\rho,\mathbf e_\phi,\mathbf e_z\). Spherical coordinates \((r,\theta,\phi)\) use distance \(r\) from the origin, polar angle \(\theta\) measured from the positive \(z\)-axis, and azimuthal angle \(\phi\). Their unit vectors are \(\mathbf e_r,\mathbf e_\theta,\mathbf e_\phi\).
The components in these expressions are measured along the indicated unit vectors. In cylindrical and spherical coordinates, the unit vectors change with position. Therefore, differentiating a vector field is not generally the same as differentiating its components as if the basis vectors were constant.
For a field \(\mathbf F=(F_x,F_y,F_z)\) in Cartesian coordinates, the formulas are
For cylindrical components \(\mathbf F=F_\rho\mathbf e_\rho+F_\phi\mathbf e_\phi+F_z\mathbf e_z\), the formulas are
For spherical components \(\mathbf F=F_r\mathbf e_r+F_\theta\mathbf e_\theta+F_\phi\mathbf e_\phi\), the formulas are
The cylindrical formulas are used where \(\rho>0\), and the spherical formulas where \(r>0\) and \(\sin\theta\ne0\). These restrictions reflect coordinate singularities, not necessarily singularities of the field itself. If a field is smooth on the axis or at the origin, Cartesian coordinates can be used to check its behavior there.
Why Divergence Includes Changing Face Areas
Divergence measures outward flux per unit volume in the limit of a shrinking region. In orthogonal coordinates \(q_1,q_2,q_3\), let the scale factors be \(h_1,h_2,h_3\), so a small coordinate box has side lengths \(h_i\,dq_i\). Write the field as \(\mathbf F=F_1\mathbf e_1+F_2\mathbf e_2+F_3\mathbf e_3\).
Consider the two faces perpendicular to \(\mathbf e_1\). Their area is \(h_2h_3\,dq_2dq_3\), evaluated at the face’s location. The outward flux from the pair is therefore the difference in the product of the face area factor and the normal field component—not merely the change in \(F_1\) multiplied by one fixed face area. To first order, this difference is
Adding the corresponding contributions from the other two pairs of faces, then dividing by the box volume \(h_1h_2h_3\,dq_1dq_2dq_3\), gives the general divergence formula in orthogonal coordinates:
This explains why coordinate scale factors appear inside derivatives. In cylindrical coordinates the scale factors are \(1,\rho,1\); in spherical coordinates they are \(1,r,r\sin\theta\). Substitution gives the divergence formulas above. The same geometric dependence on scale factors also underlies the corresponding curl formulas.
Worked Example: A Cartesian Field
Worked Example: A Cartesian Field
Let \(\mathbf F=(xy,yz,zx)\). Since each component is a simple polynomial in \(x,y,z\), Cartesian coordinates are the natural choice.
For the divergence, differentiate each component with respect to its matching coordinate:
For the curl, compute each component from the Cartesian formula:
As a check, the first curl component is \(0-y=-y\), the second is \(0-z=-z\), and the third is \(0-x=-x\). The divergence is the sum \(y+z+x\), as obtained by differentiating the three matching components.
Worked Example: Rotation About an Axis
Worked Example: A Cylindrical Rotational Field
Consider \(\mathbf F=\rho\mathbf e_\phi\). The field points around the \(z\)-axis and its magnitude depends only on distance from that axis, so cylindrical coordinates make the calculation short. Its components are \(F_\rho=0\), \(F_\phi=\rho\), and \(F_z=0\), with no dependence on \(\phi\) or \(z\).
The divergence is
The curl components are
Thus \(\nabla\times\mathbf F=2\mathbf e_z\) for \(\rho>0\). Check by converting the field to Cartesian coordinates: since \(\rho\mathbf e_\phi=(-y,x,0)\), the field is \(\mathbf F=(-y,x,0)\). Its Cartesian divergence is \(\partial(-y)/\partial x+\partial x/\partial y+\partial0/\partial z=0\), and its curl is \((0,0,\partial x/\partial x-\partial(-y)/\partial y)=(0,0,2)\), in agreement.
Worked Example: A Spherically Symmetric Field
Worked Example: A Spherical Radial Field
Let \(\mathbf F=r^2\mathbf e_r\). The field is radial and its magnitude depends only on distance from the origin, so spherical coordinates are especially efficient. Here \(F_r=r^2\), \(F_\theta=0\), and \(F_\phi=0\).
Only the radial term contributes to the divergence:
Every curl component is zero: the radial component differentiates \(F_\phi=0\) and \(F_\theta=0\); the \(\mathbf e_\theta\) component differentiates \(F_r\) with respect to \(\phi\) and \(F_\phi\) with respect to \(r\), both giving zero; and the \(\mathbf e_\phi\) component differentiates \(F_\theta=0\) and \(F_r=r^2\) with respect to \(\theta\), also giving zero. Hence \(\nabla\times\mathbf F=\mathbf 0\) for \(r>0\).
For a Cartesian check, \(r\mathbf e_r=(x,y,z)\), so \(\mathbf F=(xr,yr,zr)\). Its divergence is
The Cartesian curl vanishes because, for example, \(\partial(zr)/\partial y=zy/r=\partial(yr)/\partial z\); the other paired derivatives agree in the same way. This confirms both results away from the origin.
Comparing Coordinate Choices
The rotational field from the cylindrical example illustrates why a coordinate system should match the field’s geometry. In spherical coordinates it is still possible to calculate, but its components are \(F_r=0\), \(F_\theta=0\), and \(F_\phi=r\sin\theta\), because \(\rho=r\sin\theta\). Substituting these components into the spherical curl formula gives
This is the same vector \(2\mathbf e_z\): the identity \(\mathbf e_z=\cos\theta\,\mathbf e_r-\sin\theta\,\mathbf e_\theta\) confirms it. The answer is correct, but the cylindrical calculation was simpler because the field’s rotational symmetry is organized around the \(z\)-axis.
Use these questions when selecting coordinates:
- Does the field depend on distance from a point? If so, test spherical coordinates.
- Does it rotate around a particular axis or depend on distance from that axis? If so, test cylindrical coordinates.
- Are its components simple polynomials or functions of \(x,y,z\) separately? Cartesian coordinates may be best.
- Do the components or basis vectors become more complicated after conversion? If so, keep the original coordinates unless another system offers a clear advantage.
A Common Pitfall: Differentiating Components Alone
In cylindrical coordinates, the field \(\mathbf F=\mathbf e_\rho\) has \(F_\rho=1\), with the other components zero. A tempting but incorrect calculation is to say that every component is constant, so the divergence is zero. That argument ignores the changing area of the cylindrical faces: a face at larger \(\rho\) has a larger area.
The correct calculation uses the cylindrical divergence formula:
Equivalently, for a thin cylindrical box with radial thickness \(d\rho\), angular width \(d\phi\), and height \(dz\), the outer face has area \((\rho+d\rho)d\phi\,dz\), while the inner face has area \(\rho\,d\phi\,dz\). Their net outward flux is \(d\rho\,d\phi\,dz\). Dividing by the box volume \(\rho\,d\rho\,d\phi\,dz\), to first order, gives \(1/\rho\). The face-area change is essential, even though the radial component is constant.
Summary
Coordinate choice is a way to expose structure, not a change in the underlying vector field. Cartesian coordinates keep the basis fixed; cylindrical and spherical coordinates can simplify fields with axis or radial symmetry, but their scale factors and position-dependent unit vectors must be respected. A good calculation identifies the field’s symmetry, uses the matching component formulas, and checks the result where a second representation is convenient.
Check Your Understanding
Use the coordinate formulas and the geometric reasoning from this tutorial to answer the following.
- Which coordinate system is most natural for a field whose components depend only on distance from the \(z\)-axis?
- Why does cylindrical divergence involve the derivative of \(\rho F_\rho\), rather than only the derivative of \(F_\rho\)?
- For \(\mathbf F=\rho\mathbf e_\phi\), what are the divergence and curl, and what Cartesian field represents it?
- What coordinate restrictions apply to the spherical formulas, and do they necessarily indicate that the vector field is singular?
- When might converting a result to Cartesian coordinates provide a useful check?