Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Appendix D. Vector Calculus

Introduction

In the following we let ff be a scalar field and A\Avec a vector field.

Differential Operators in Rectangular Coordinates

The components of A\Avec are given by

A=Ax x^+Ay y^+Az z^.\Avec=A_x \,{\hat{\mathbf{x}}} + A_y\,{\hat{\mathbf{y}}} +A_z\,{\hat{\mathbf{z}}}.

Then

∇f=∂f∂x x^+∂f∂y y^+∂f∂z z^,\del f = \frac{\partial f}{\partial x} \,{\hat{\mathbf{x}}} + \frac{\partial f}{\partial y} \,{\hat{\mathbf{y}}} + \frac{\partial f}{\partial z} \,{\hat{\mathbf{z}}},
∇×A=(∂Ay∂x−∂Ax∂y) x^+(∂Az∂y−∂Ay∂z) y^+(∂Ax∂z−∂Az∂x) z^,\del\cross\Avec = \Bigl(\frac{\partial A_y}{\partial x} - \frac{\partial A_x}{\partial y}\Bigr)\,{\hat{\mathbf{x}}} + \Bigl(\frac{\partial A_z}{\partial y} - \frac{\partial A_y}{\partial z}\Bigr)\,{\hat{\mathbf{y}}} + \Bigl(\frac{\partial A_x}{\partial z} - \frac{\partial A_z}{\partial x}\Bigr)\,{\hat{\mathbf{z}}},
∇⋅A=∂Ax∂x+∂Ay∂y+∂Az∂z,\del\cdot\Avec = \frac{\partial A_x}{\partial x} + \frac{\partial A_y}{\partial y} + \frac{\partial A_z}{\partial z},

and

∇2f=∂2f∂x2+∂2f∂y2+∂2f∂z2.\del^2f = {\partial^2 f\over \partial x^2} + {\partial^2 f\over \partial y^2} + {\partial^2 f\over \partial z^2}.

Differential Operators in Cylindrical Coordinates

Cylindrical coordinates are (ρ,ϕ,z)(\rho,\phi,z), defined by

x=ρcos⁡ϕ,y=ρsin⁡ϕ,z=z.\begin{aligned} x &= \rho\cos\phi, \\ y &= \rho\sin\phi, \\ z &= z. \\ \end{aligned}

The orthonormal frame of associated unit vectors is

ρ^=cos⁡ϕ x^+sin⁡ϕ y^,ϕ^=−sin⁡ϕ x^+cos⁡ϕ y^,z^= z^,\begin{aligned} {\hat{\boldsymbol{\rho}}} &= \cos\phi\,{\hat{\mathbf{x}}} + \sin\phi\,{\hat{\mathbf{y}}}, \\ {\hat{\boldsymbol{\phi}}} &= -\sin\phi\,{\hat{\mathbf{x}}} + \cos\phi\,{\hat{\mathbf{y}}}, \\ {\hat{\mathbf{z}}} &= \,{\hat{\mathbf{z}}}, \\ \end{aligned}

with

ρ^×ϕ^=z^.{\hat{\boldsymbol{\rho}}} \cross {\hat{\boldsymbol{\phi}}} = {\hat{\mathbf{z}}}.

Define the components of A\Avec by

A=Aρ ρ^+Aϕ ϕ^+Az z^.\Avec = A_\rho \,{\hat{\boldsymbol{\rho}}} + A_\phi \,{\hat{\boldsymbol{\phi}}} + A_z \,{\hat{\mathbf{z}}}.

Then

∇f=∂f∂ρ ρ^+1ρ∂f∂ϕ ϕ^+∂f∂z z^,\del f = \frac{\partial f}{\partial \rho}\,{\hat{\boldsymbol{\rho}}} + {1\over\rho}\frac{\partial f}{\partial \phi} \,{\hat{\boldsymbol{\phi}}} + \frac{\partial f}{\partial z} \,{\hat{\mathbf{z}}},
∇×A=(1ρ∂Az∂ϕ−∂Aϕ∂z)ρ^+(∂Aρ∂z−∂Az∂ρ)ϕ^+1ρ[∂∂ρ(ρAϕ)−∂Aρ∂ϕ]z^,\del\cross\Avec = \Bigl({1\over\rho}\frac{\partial A_z}{\partial \phi} - \frac{\partial A_\phi}{\partial z}\Bigr) {\hat{\boldsymbol{\rho}}} + \Bigl(\frac{\partial A_\rho}{\partial z} - \frac{\partial A_z}{\partial \rho}\Bigr) {\hat{\boldsymbol{\phi}}} + {1\over\rho}\Bigl[\pop{}{\rho}(\rho A_\phi)- \frac{\partial A_\rho}{\partial \phi}\Bigr]{\hat{\mathbf{z}}},
∇⋅A=1ρ∂∂ρ(ρAρ)+1ρ∂Aϕ∂ϕ+∂Az∂z,\del\cdot\Avec = {1\over\rho}\pop{}{\rho}(\rho A_\rho) + {1\over\rho} \frac{\partial A_\phi}{\partial \phi} + \frac{\partial A_z}{\partial z},

and

∇2f=1ρ∂∂ρ(ρ∂f∂ρ)+1ρ2∂2f∂ϕ2+∂2f∂z2.\del^2 f = {1\over\rho}\pop{}{\rho} \Bigl(\rho\frac{\partial f}{\partial \rho}\Bigr) + {1\over\rho^2} {\partial^2 f\over \partial\phi^2} + {\partial^2 f\over \partial z^2}.

Also, the following Jacobians are sometimes useful:

∂(xyz)∂(ρϕz)=(cos⁡ϕ−ρsin⁡ϕ0sin⁡ϕρcos⁡ϕ0001),\begin{aligned} {\partial(xyz)\over \partial(\rho\phi z)}= \begin{pmatrix}\cos\phi & -\rho\sin\phi & 0 \\ \sin\phi & \rho\cos\phi & 0 \\ 0 & 0 & 1\\\end{pmatrix}, \end{aligned}

where the rows are labeled by (xyz)(xyz) and columns by (ρϕz)(\rho\phi z), for example, ∂x/∂ϕ=−ρsin⁡ϕ\partial x/\partial\phi=-\rho\sin\phi. The inverse Jacobian is

∂(ρϕz)∂(xyz)=(cos⁡ϕsin⁡ϕ0−sin⁡ϕρcos⁡ϕρ0001).\begin{aligned} {\partial(\rho\phi z)\over\partial(xyz)} = \begin{pmatrix}\cos\phi & \sin\phi & 0 \\ -{\ds \sin\phi\over\ds\rho} & {\ds\cos\phi\over\ds\rho} & 0 \\ 0 & 0 & 1\\\end{pmatrix}. \end{aligned}

Differential Operators in Spherical Coordinates

Spherical coordinates are (r,θ,ϕ)(r,\theta,\phi), defined by

x=rsin⁡θcos⁡ϕ,y=rsin⁡θsin⁡ϕ,z=rcos⁡θ.\begin{aligned} x &= r\sin\theta \cos\phi, \\ y &= r\sin\theta \sin\phi, \\ z &= r\cos\theta. \\ \end{aligned}

The orthonormal frame of associated unit vectors is

r^=sin⁡θcos⁡ϕ x^+sin⁡θsin⁡ϕ y^+cos⁡θ z^,θ^=cos⁡θcos⁡ϕ x^+cos⁡θsin⁡ϕ y^−sin⁡θ z^,ϕ^=−sin⁡ϕ x^+cos⁡ϕ y^,\begin{aligned} {\hat{\mathbf{r}}} &= \sin\theta\cos\phi\,{\hat{\mathbf{x}}} + \sin\theta\sin\phi\,{\hat{\mathbf{y}}} + \cos\theta\,{\hat{\mathbf{z}}}, \\ {\hat{\boldsymbol{\theta}}} &= \cos\theta\cos\phi\,{\hat{\mathbf{x}}} + \cos\theta\sin\phi\,{\hat{\mathbf{y}}} - \sin\theta\,{\hat{\mathbf{z}}}, \\ {\hat{\boldsymbol{\phi}}} &= -\sin\phi\,{\hat{\mathbf{x}}} + \cos\phi\,{\hat{\mathbf{y}}}, \\ \end{aligned}

with

r^×θ^=ϕ^.{\hat{\mathbf{r}}} \cross {\hat{\boldsymbol{\theta}}} = {\hat{\boldsymbol{\phi}}}.

Define the components of A\Avec by

A=Ar r^+Aθ θ^+Aϕ ϕ^.\Avec = A_r \,{\hat{\mathbf{r}}} + A_\theta \,{\hat{\boldsymbol{\theta}}} + A_\phi \,{\hat{\boldsymbol{\phi}}}.

Then

∇f=∂f∂r r^+1r∂f∂θ θ^+1rsin⁡θ∂f∂ϕ ϕ^,\del f= \frac{\partial f}{\partial r}\,{\hat{\mathbf{r}}} + {1\over r}\frac{\partial f}{\partial \theta}\,{\hat{\boldsymbol{\theta}}} + {1\over r\sin\theta}\frac{\partial f}{\partial \phi}\,{\hat{\boldsymbol{\phi}}},
∇×A=1rsin⁡θ[∂∂θ(Aϕsin⁡θ)−∂Aθ∂ϕ] r^+1r[1sin⁡θ∂Ar∂ϕ−∂∂r(rAϕ)] θ^+1r[∂∂r(rAθ)−∂Ar∂θ] ϕ^,\del\cross\Avec = {1\over r\sin\theta} \Bigl[\pop{}{\theta}(A_\phi \sin\theta)- \frac{\partial A_\theta}{\partial \phi}\Bigr]\,{\hat{\mathbf{r}}} + {1\over r}\Bigl[{1\over\sin\theta} \frac{\partial A_r}{\partial \phi} - \pop{}{r}(rA_\phi)\Bigr]\,{\hat{\boldsymbol{\theta}}} + {1\over r}\Bigl[\pop{}{r}(rA_\theta) - \frac{\partial A_r}{\partial \theta}\Bigr]\,{\hat{\boldsymbol{\phi}}},
∇⋅A=1r2∂∂r(r2Ar)+1rsin⁡θ∂∂θ(Aθsin⁡θ)+1rsin⁡θ∂Aϕ∂ϕ,\del\cdot\Avec = {1\over r^2} \pop{}{r}(r^2 A_r) + {1\over r\sin\theta}\pop{}{\theta}(A_\theta \sin\theta) + {1\over r\sin\theta}\frac{\partial A_\phi}{\partial \phi},

and

∇2f=1r2∂∂r(r2∂f∂r)+1r2sin⁡θ∂∂θ(sin⁡θ∂f∂θ)+1r2sin⁡2θ∂2f∂ϕ2.\del^2 f = {1\over r^2} \pop{}{r}\Bigl(r^2\frac{\partial f}{\partial r}\Bigr) + {1\over r^2\sin\theta}\pop{}{\theta}\Bigl( \sin\theta\frac{\partial f}{\partial \theta}\Bigr) + {1\over r^2\sin^2\theta} {\partial^2 f \over \partial\phi^2}.

The following Jacobian matrices are sometimes useful:

∂(xyz)∂(rθϕ)=(sin⁡θcos⁡ϕrcos⁡θcos⁡ϕ−rsin⁡θsin⁡ϕsin⁡θsin⁡ϕrcos⁡θsin⁡ϕrsin⁡θcos⁡ϕcos⁡θ−rsin⁡θ0),\begin{aligned} {\partial(xyz)\over\partial(r\theta\phi)} = \begin{pmatrix}\sin\theta\cos\phi & r\cos\theta\cos\phi & -r\sin\theta\sin\phi \\ \sin\theta\sin\phi & r\cos\theta\sin\phi & r\sin\theta\cos\phi\\ \cos\theta & -r\sin\theta & 0\\\end{pmatrix}, \end{aligned}

and its inverse,

∂(rθϕ)∂(xyz)=(sin⁡θcos⁡ϕsin⁡θsin⁡ϕcos⁡θcos⁡θcos⁡ϕrcos⁡θsin⁡ϕr−sin⁡θr−sin⁡ϕrsin⁡θcos⁡ϕrsin⁡θ0).\begin{aligned} {\partial(r\theta\phi)\over \partial(xyz)} = \begin{pmatrix} \sin\theta\cos\phi & \sin\theta\sin\phi & \cos\theta \\ {\ds\cos\theta\cos\phi\over\ds r} & {\ds\cos\theta\sin\phi\over\ds r} & -{\ds\sin\theta\over\ds r}\\ -{\ds\sin\phi\over\ds r\sin\theta} & {\ds\cos\phi\over\ds r\sin\theta} & 0\\\end{pmatrix}. \end{aligned}

The Line Element

Let two nearby points have coordinates (x,y,z)(x,y,z) and (x+dx,y+dy,z+dz)(x+dx,y+dy,z+dz), or (r,θ,ϕ)(r,\theta,\phi) and (r+dr,θ+dθ,ϕ+dϕ)(r+dr, \theta+d\theta, \phi+d\phi), etc, depending on the coordinates. Let dsds be the distance between the two points. Then, in the various coordinate systems, we have

ds2=dx2+dy2+dz2,\begin{aligned} ds^2 &= dx^2 + dy^2 + dz^2, \end{aligned}
=dρ2+ρ2 dϕ2+dz2,\begin{aligned} &= d\rho^2 + \rho^2\,d\phi^2 + dz^2, \end{aligned}
=dr2+r2 dθ2+r2sin⁡2θ dϕ2.\begin{aligned} &= dr^2 + r^2\,d\theta^2 + r^2\sin^2\theta \, d\phi^2. \end{aligned}

Dividing this by dt2dt^2, we get the square of the velocity, v2=v⋅vv^2 = \vvec\cdot\vvec, expressed in terms of the time derivatives of the coordinates. This gives

v2=x˙2+y˙2+z˙2,\begin{aligned} v^2 &= {\dot x}^2 + {\dot y}^2 + {\dot z}^2, \end{aligned}
=ρ˙2+ρ2 ϕ˙2+z˙2,\begin{aligned} &= {\dot \rho}^2 + \rho^2\, {\dot\phi}^2 + {\dot z}^2, \end{aligned}
=r˙2+r2 θ˙2+r2sin⁡2θ ϕ˙2.\begin{aligned} &= {\dot r}^2 + r^2\, {\dot\theta}^2 + r^2\sin^2\theta\, {\dot\phi}^2. \end{aligned}

From the components of the line element one can read off the components of the metric tensor.

Vector Calculus in Two Dimensions

In two dimensions the usual coordinates are either rectangular, (x,y)(x,y) or polar (ρ,ϕ)(\rho,\phi). The coordinate transformation and formulas for the unit vectors (ρ^,ϕ^)({\hat{\boldsymbol{\rho}}},{\hat{\boldsymbol{\phi}}}) are obtained from (6) and (7) simply by omitting the terms referring to zz or z^{\hat{\mathbf{z}}}. The formulas for ∇f\del f, ∇⋅A\del\cdot\Avec and ∇2f\del^2 f can be obtained from those in Secs.~\secrvecident-2 and \secrvecident-3 simply by omitting the terms that refer to zz or AzA_z. As for the curl of a vector field, ∇×A\del\cross\Avec, in two dimensions it can be regarded as a scalar that is identified with the zz-component of the corresponding three-dimensional formulas, (3) or (11). The line element in two dimensions is given by (27), omitting the term referring to zz.