Curvilinear Coordinates

Nature rarely lines up with a rectangular grid. A point charge throws its field out equally in every direction; a hydrogen atom is a tiny ball of spherical symmetry; water flows down a pipe in perfect circular layers. Force any of these into (x, y, z) and the algebra explodes — a sphere becomes the ugly x^2 + y^2 + z^2 = a^2, and separating the variables in a differential equation becomes hopeless.

Curvilinear coordinates fix this by bending the grid to fit the symmetry. Pick coordinates in which the natural surfaces of your problem — spheres, cylinders, cones — become simple constant-coordinate surfaces, and everything simplifies. The price is that the tools of vector calculus — the line, area and volume elements, and \nabla itself — pick up correction factors. This page shows you exactly what those factors are and why.

Three coordinate systems physics can't live without

Beyond Cartesian, three systems cover almost everything an early-university physicist meets.

Plane polar (r, \theta) in 2-D: r is distance from the origin, \theta the angle from the x-axis.

x = r\cos\theta, \qquad y = r\sin\theta.

Cylindrical (r, \phi, z) — plane polar with a z-axis bolted on. Perfect for a wire, a pipe, a solenoid.

x = r\cos\phi, \qquad y = r\sin\phi, \qquad z = z.

Spherical (r, \theta, \phi) — distance r from the origin, polar angle \theta down from the z-axis, azimuth \phi around it. The natural home of a point charge or an atom.

x = r\sin\theta\cos\phi, \qquad y = r\sin\theta\sin\phi, \qquad z = r\cos\theta.

All three are orthogonal: at every point the three coordinate directions \hat{\mathbf{e}}_1, \hat{\mathbf{e}}_2, \hat{\mathbf{e}}_3 are mutually perpendicular — just like \hat{\mathbf{x}}, \hat{\mathbf{y}}, \hat{\mathbf{z}}, except that they now point in different directions at different places. That single fact is the whole story.

The key idea: scale factors

Move a coordinate by a tiny amount and ask: how far did I actually travel? In Cartesian the answer is trivial — nudging x by dx moves you a distance dx. But nudge the angle \theta by d\theta and you travel an arc of length r\,d\theta — the further out you are, the more distance one radian buys. That multiplier is the scale factor h_i:

d\ell_i = h_i\, du_i \qquad (\text{arc length along coordinate } u_i).

Look at the figure. A point sits at (r, \theta). Nudge r \to r + dr and \theta \to \theta + d\theta, and the little patch swept out is (very nearly) a rectangle with sides dr and r\,d\theta — so h_r = 1 and h_\theta = r, and its area is dA = r\,dr\,d\theta. That extra r is the polar Jacobian you met in change of variables.

Collecting the scale factors for all three systems (with distances measured along each coordinate):

Everything else — the length, area and volume elements, and the whole of vector calculus in these coordinates — is built from the h_i.

Line, area and volume elements

A displacement, an area patch and a volume box are just products of the arc lengths h_i\,du_i. For orthogonal coordinates (u_1, u_2, u_3):

d\boldsymbol{\ell} = h_1\,du_1\,\hat{\mathbf{e}}_1 + h_2\,du_2\,\hat{\mathbf{e}}_2 + h_3\,du_3\,\hat{\mathbf{e}}_3, \qquad dV = h_1 h_2 h_3\, du_1\, du_2\, du_3.

The product h_1 h_2 h_3 is the Jacobian of the coordinate change. Specialising:

\text{Cylindrical:}\quad dV = r\,dr\,d\phi\,dz. \qquad\qquad \text{Spherical:}\quad dV = r^2\sin\theta\,dr\,d\theta\,d\phi.

Worked example — the volume of a sphere. Integrate the spherical volume element over a ball of radius a:

V = \int_0^{2\pi}\!\!\int_0^{\pi}\!\!\int_0^{a} r^2\sin\theta \,dr\,d\theta\,d\phi = \underbrace{\left[\tfrac{r^3}{3}\right]_0^a}_{a^3/3} \underbrace{\left[-\cos\theta\right]_0^{\pi}}_{2} \underbrace{\vphantom{\tfrac{r^3}{3}}\big[\phi\big]_0^{2\pi}}_{2\pi} = \frac{4}{3}\pi a^3.

The three integrals separate cleanly because the element factorises — the payoff of matching the coordinates to the symmetry.

Deriving the gradient — where the 1/h_i comes from

Grad, div, curl and the Laplacian all pick up scale factors, and it is worth deriving one to see the machine. The gradient is defined by how a scalar f changes over a small step:

df = \nabla f \cdot d\boldsymbol{\ell}.

Step 1 — write both sides in coordinates. By the chain rule the change in f is

df = \frac{\partial f}{\partial u_1}du_1 + \frac{\partial f}{\partial u_2}du_2 + \frac{\partial f}{\partial u_3}du_3,

while, writing \nabla f = \sum_i (\nabla f)_i\,\hat{\mathbf{e}}_i and using d\boldsymbol{\ell} = \sum_i h_i\,du_i\,\hat{\mathbf{e}}_i with the \hat{\mathbf{e}}_i orthonormal,

\nabla f \cdot d\boldsymbol{\ell} = \sum_i (\nabla f)_i\, h_i\, du_i.

Step 2 — match coefficients of each independent du_i:

(\nabla f)_i\, h_i = \frac{\partial f}{\partial u_i} \quad\Longrightarrow\quad (\nabla f)_i = \frac{1}{h_i}\frac{\partial f}{\partial u_i}.

There it is: each component carries a 1/h_i, exactly cancelling the stretch that h_i put into the arc length. So in spherical coordinates,

\nabla f = \frac{\partial f}{\partial r}\,\hat{\mathbf{r}} + \frac{1}{r}\frac{\partial f}{\partial \theta}\,\hat{\boldsymbol{\theta}} + \frac{1}{r\sin\theta}\frac{\partial f}{\partial \phi}\,\hat{\boldsymbol{\phi}}.

The other operators follow from the same "flux through a tiny box / circulation round a tiny loop" arguments, and all reduce to combinations of the h_i.

Grad, div, curl and the Laplacian — the general formulas

For any orthogonal system (u_1, u_2, u_3) with scale factors h_i, write h = h_1 h_2 h_3. Then:

\nabla f = \sum_i \frac{1}{h_i}\frac{\partial f}{\partial u_i}\,\hat{\mathbf{e}}_i, \nabla\cdot\mathbf{A} = \frac{1}{h}\left[\frac{\partial(h_2 h_3 A_1)}{\partial u_1} + \frac{\partial(h_3 h_1 A_2)}{\partial u_2} + \frac{\partial(h_1 h_2 A_3)}{\partial u_3}\right], \nabla\times\mathbf{A} = \frac{1}{h}\begin{vmatrix} h_1\hat{\mathbf{e}}_1 & h_2\hat{\mathbf{e}}_2 & h_3\hat{\mathbf{e}}_3 \\[3pt] \dfrac{\partial}{\partial u_1} & \dfrac{\partial}{\partial u_2} & \dfrac{\partial}{\partial u_3} \\[5pt] h_1 A_1 & h_2 A_2 & h_3 A_3 \end{vmatrix}, \nabla^2 f = \frac{1}{h}\left[\frac{\partial}{\partial u_1}\!\left(\frac{h_2 h_3}{h_1}\frac{\partial f}{\partial u_1}\right) + \frac{\partial}{\partial u_2}\!\left(\frac{h_3 h_1}{h_2}\frac{\partial f}{\partial u_2}\right) + \frac{\partial}{\partial u_3}\!\left(\frac{h_1 h_2}{h_3}\frac{\partial f}{\partial u_3}\right)\right].

Substituting the scale factors gives the forms you will use for the rest of your degree. In cylindrical coordinates:

\nabla\cdot\mathbf{A} = \frac{1}{r}\frac{\partial(r A_r)}{\partial r} + \frac{1}{r}\frac{\partial A_\phi}{\partial \phi} + \frac{\partial A_z}{\partial z}, \qquad \nabla^2 f = \frac{1}{r}\frac{\partial}{\partial r}\!\left(r\frac{\partial f}{\partial r}\right) + \frac{1}{r^2}\frac{\partial^2 f}{\partial \phi^2} + \frac{\partial^2 f}{\partial z^2}.

And in spherical coordinates — the workhorses of electromagnetism and quantum mechanics:

\nabla\cdot\mathbf{A} = \frac{1}{r^2}\frac{\partial(r^2 A_r)}{\partial r} + \frac{1}{r\sin\theta}\frac{\partial(\sin\theta\, A_\theta)}{\partial \theta} + \frac{1}{r\sin\theta}\frac{\partial A_\phi}{\partial \phi}, \nabla^2 f = \frac{1}{r^2}\frac{\partial}{\partial r}\!\left(r^2\frac{\partial f}{\partial r}\right) + \frac{1}{r^2\sin\theta}\frac{\partial}{\partial \theta}\!\left(\sin\theta\frac{\partial f}{\partial \theta}\right) + \frac{1}{r^2\sin^2\theta}\frac{\partial^2 f}{\partial \phi^2}.

Sanity check. Take the Coulomb-like potential f = 1/r. The angular terms vanish and the radial term gives \tfrac{1}{r^2}\partial_r\!\big(r^2 \cdot (-1/r^2)\big) = \tfrac{1}{r^2}\partial_r(-1) = 0 — so \nabla^2(1/r) = 0 away from the origin. The 1/r potential is harmonic, which is exactly why it describes the field outside a point charge or mass.

Because the spherical Laplacian above separates. Write f = R(r)\,Y(\theta,\phi) in Laplace's equation \nabla^2 f = 0 (or Schrödinger's equation for the hydrogen atom) and the r part peels away from the angular part, because every r in \nabla^2 sits in its own group. The angular equation's solutions are the famous spherical harmonics Y_\ell^m(\theta,\phi) — the shapes of atomic orbitals (s, p, d, …). None of this separation happens in Cartesian coordinates; it is a gift of choosing coordinates that respect the symmetry. Curvilinear coordinates aren't a convenience — they are what make the hydrogen atom solvable by hand.

Two classic traps.

(1) Never drop the Jacobian. Integrating a function over a region, you must include the full volume element: \int f\,dV = \int f\, r^2\sin\theta\,dr\,d\theta\,d\phi in spherical, not \int f\,dr\,d\theta\,d\phi. Forgetting the r^2\sin\theta is the single most common error in these coordinates — it silently gives the wrong answer, no error message.

(2) The θ/φ convention clash. Physicists use \theta for the polar angle (from the z-axis) and \phi for the azimuth. Many maths texts swap them. Before quoting a formula, check which angle is which — otherwise your \sin\theta and \sin\phi end up in the wrong places and the whole calculation is subtly wrong.