Appendix D. Vector Calculus
Introduction ¶ In the following we let f f f be a scalar field and A \Avec A a vector field.
Differential Operators in Rectangular Coordinates ¶ The components of A \Avec A are given by
A = A x x ^ + A y y ^ + A z z ^ . \Avec=A_x \,{\hat{\mathbf{x}}} + A_y\,{\hat{\mathbf{y}}} +A_z\,{\hat{\mathbf{z}}}. A = A x x ^ + A y y ^ + A z 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}}}, ∇ f = ∂ x ∂ f x ^ + ∂ y ∂ f y ^ + ∂ z ∂ f z ^ , ∇ × A = ( ∂ A y ∂ x − ∂ A x ∂ y ) x ^ + ( ∂ A z ∂ y − ∂ A y ∂ z ) y ^ + ( ∂ A x ∂ z − ∂ A z ∂ 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 = ( ∂ x ∂ A y − ∂ y ∂ A x ) x ^ + ( ∂ y ∂ A z − ∂ z ∂ A y ) y ^ + ( ∂ z ∂ A x − ∂ x ∂ A z ) z ^ , ∇ ⋅ A = ∂ A x ∂ x + ∂ A y ∂ y + ∂ A z ∂ z , \del\cdot\Avec = \frac{\partial A_x}{\partial x} + \frac{\partial A_y}{\partial y} + \frac{\partial A_z}{\partial z}, ∇ ⋅ A = ∂ x ∂ A x + ∂ y ∂ A y + ∂ z ∂ A z , and
∇ 2 f = ∂ 2 f ∂ x 2 + ∂ 2 f ∂ y 2 + ∂ 2 f ∂ z 2 . \del^2f = {\partial^2 f\over \partial x^2} + {\partial^2 f\over \partial y^2} + {\partial^2 f\over \partial z^2}. ∇ 2 f = ∂ x 2 ∂ 2 f + ∂ y 2 ∂ 2 f + ∂ z 2 ∂ 2 f . Differential Operators in Cylindrical Coordinates ¶ Cylindrical coordinates are ( ρ , ϕ , z ) (\rho,\phi,z) ( ρ , ϕ , z ) , defined by
x = ρ cos ϕ , y = ρ sin ϕ , z = z . \begin{aligned}
x &= \rho\cos\phi, \\
y &= \rho\sin\phi, \\
z &= z. \\
\end{aligned} x y z = ρ cos ϕ , = ρ sin ϕ , = z . 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} ρ ^ ϕ ^ z ^ = cos ϕ x ^ + sin ϕ y ^ , = − sin ϕ x ^ + cos ϕ y ^ , = z ^ , with
ρ ^ × ϕ ^ = z ^ . {\hat{\boldsymbol{\rho}}} \cross {\hat{\boldsymbol{\phi}}} = {\hat{\mathbf{z}}}. ρ ^ × ϕ ^ = z ^ . Define the components of A \Avec A by
A = A ρ ρ ^ + A ϕ ϕ ^ + A z z ^ . \Avec = A_\rho \,{\hat{\boldsymbol{\rho}}} + A_\phi \,{\hat{\boldsymbol{\phi}}} + A_z \,{\hat{\mathbf{z}}}. A = A ρ ρ ^ + A ϕ ϕ ^ + A z 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}}}, ∇ f = ∂ ρ ∂ f ρ ^ + ρ 1 ∂ ϕ ∂ f ϕ ^ + ∂ z ∂ f z ^ , ∇ × A = ( 1 ρ ∂ A z ∂ ϕ − ∂ A ϕ ∂ z ) ρ ^ + ( ∂ A ρ ∂ z − ∂ A z ∂ ρ ) ϕ ^ + 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 z − ∂ z ∂ A ϕ ) ρ ^ + ( ∂ z ∂ A ρ − ∂ ρ ∂ A z ) ϕ ^ + ρ 1 [ ∂ ρ ∂ ( ρ A ϕ ) − ∂ ϕ ∂ A ρ ] z ^ , ∇ ⋅ A = 1 ρ ∂ ∂ ρ ( ρ A ρ ) + 1 ρ ∂ A ϕ ∂ ϕ + ∂ A z ∂ 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}, ∇ ⋅ A = ρ 1 ∂ ρ ∂ ( ρ A ρ ) + ρ 1 ∂ ϕ ∂ A ϕ + ∂ z ∂ A z , and
∇ 2 f = 1 ρ ∂ ∂ ρ ( ρ ∂ f ∂ ρ ) + 1 ρ 2 ∂ 2 f ∂ ϕ 2 + ∂ 2 f ∂ z 2 . \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}. ∇ 2 f = ρ 1 ∂ ρ ∂ ( ρ ∂ ρ ∂ f ) + ρ 2 1 ∂ ϕ 2 ∂ 2 f + ∂ z 2 ∂ 2 f . Also, the following Jacobians are sometimes useful:
∂ ( x y z ) ∂ ( ρ ϕ z ) = ( cos ϕ − ρ sin ϕ 0 sin ϕ ρ cos ϕ 0 0 0 1 ) , \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} ∂ ( ρϕ z ) ∂ ( x yz ) = ⎝ ⎛ cos ϕ sin ϕ 0 − ρ sin ϕ ρ cos ϕ 0 0 0 1 ⎠ ⎞ , where the rows are labeled by ( x y z ) (xyz) ( x yz ) and columns by ( ρ ϕ z ) (\rho\phi z) ( ρϕ z ) , for example, ∂ x / ∂ ϕ = − ρ sin ϕ \partial x/\partial\phi=-\rho\sin\phi ∂ x / ∂ ϕ = − ρ sin ϕ . The inverse Jacobian is
∂ ( ρ ϕ z ) ∂ ( x y z ) = ( cos ϕ sin ϕ 0 − sin ϕ ρ cos ϕ ρ 0 0 0 1 ) . \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} ∂ ( x yz ) ∂ ( ρϕ z ) = ⎝ ⎛ cos ϕ − ρ sin ϕ 0 sin ϕ ρ cos ϕ 0 0 0 1 ⎠ ⎞ . Differential Operators in Spherical Coordinates ¶ Spherical coordinates are ( r , θ , ϕ ) (r,\theta,\phi) ( r , θ , ϕ ) , defined by
x = r sin θ cos ϕ , y = r sin θ sin ϕ , z = r cos θ . \begin{aligned}
x &= r\sin\theta \cos\phi, \\
y &= r\sin\theta \sin\phi, \\
z &= r\cos\theta. \\
\end{aligned} x y z = r sin θ cos ϕ , = r sin θ sin ϕ , = r cos θ . 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} r ^ θ ^ ϕ ^ = sin θ cos ϕ x ^ + sin θ sin ϕ y ^ + cos θ z ^ , = cos θ cos ϕ x ^ + cos θ sin ϕ y ^ − sin θ z ^ , = − sin ϕ x ^ + cos ϕ y ^ , with
r ^ × θ ^ = ϕ ^ . {\hat{\mathbf{r}}} \cross {\hat{\boldsymbol{\theta}}} = {\hat{\boldsymbol{\phi}}}. r ^ × θ ^ = ϕ ^ . Define the components of A \Avec A by
A = A r r ^ + A θ θ ^ + A ϕ ϕ ^ . \Avec = A_r \,{\hat{\mathbf{r}}} + A_\theta \,{\hat{\boldsymbol{\theta}}} + A_\phi \,{\hat{\boldsymbol{\phi}}}. A = A r r ^ + A θ θ ^ + A ϕ ϕ ^ . Then
∇ f = ∂ f ∂ r r ^ + 1 r ∂ f ∂ θ θ ^ + 1 r sin θ ∂ 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}}}, ∇ f = ∂ r ∂ f r ^ + r 1 ∂ θ ∂ f θ ^ + r sin θ 1 ∂ ϕ ∂ f ϕ ^ , ∇ × A = 1 r sin θ [ ∂ ∂ θ ( A ϕ sin θ ) − ∂ A θ ∂ ϕ ] r ^ + 1 r [ 1 sin θ ∂ A r ∂ ϕ − ∂ ∂ r ( r A ϕ ) ] θ ^ + 1 r [ ∂ ∂ r ( r A θ ) − ∂ A r ∂ θ ] ϕ ^ , \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 = r sin θ 1 [ ∂ θ ∂ ( A ϕ sin θ ) − ∂ ϕ ∂ A θ ] r ^ + r 1 [ sin θ 1 ∂ ϕ ∂ A r − ∂ r ∂ ( r A ϕ ) ] θ ^ + r 1 [ ∂ r ∂ ( r A θ ) − ∂ θ ∂ A r ] ϕ ^ , ∇ ⋅ A = 1 r 2 ∂ ∂ r ( r 2 A r ) + 1 r sin θ ∂ ∂ θ ( A θ sin θ ) + 1 r sin θ ∂ 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}, ∇ ⋅ A = r 2 1 ∂ r ∂ ( r 2 A r ) + r sin θ 1 ∂ θ ∂ ( A θ sin θ ) + r sin θ 1 ∂ ϕ ∂ A ϕ , and
∇ 2 f = 1 r 2 ∂ ∂ r ( r 2 ∂ f ∂ r ) + 1 r 2 sin θ ∂ ∂ θ ( sin θ ∂ f ∂ θ ) + 1 r 2 sin 2 θ ∂ 2 f ∂ ϕ 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}. ∇ 2 f = r 2 1 ∂ r ∂ ( r 2 ∂ r ∂ f ) + r 2 sin θ 1 ∂ θ ∂ ( sin θ ∂ θ ∂ f ) + r 2 sin 2 θ 1 ∂ ϕ 2 ∂ 2 f . The following Jacobian matrices are sometimes useful:
∂ ( x y z ) ∂ ( r θ ϕ ) = ( sin θ cos ϕ r cos θ cos ϕ − r sin θ sin ϕ sin θ sin ϕ r cos θ sin ϕ r sin θ cos ϕ cos θ − r sin θ 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} ∂ ( r θϕ ) ∂ ( x yz ) = ⎝ ⎛ sin θ cos ϕ sin θ sin ϕ cos θ r cos θ cos ϕ r cos θ sin ϕ − r sin θ − r sin θ sin ϕ r sin θ cos ϕ 0 ⎠ ⎞ , and its inverse,
∂ ( r θ ϕ ) ∂ ( x y z ) = ( sin θ cos ϕ sin θ sin ϕ cos θ cos θ cos ϕ r cos θ sin ϕ r − sin θ r − sin ϕ r sin θ cos ϕ r sin θ 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} ∂ ( x yz ) ∂ ( r θϕ ) = ⎝ ⎛ sin θ cos ϕ r cos θ cos ϕ − r sin θ sin ϕ sin θ sin ϕ r cos θ sin ϕ r sin θ cos ϕ cos θ − r sin θ 0 ⎠ ⎞ . The Line Element ¶ Let two nearby points have coordinates ( x , y , z ) (x,y,z) ( x , y , z ) and ( x + d x , y + d y , z + d z ) (x+dx,y+dy,z+dz) ( x + d x , y + d y , z + d z ) , or ( r , θ , ϕ ) (r,\theta,\phi) ( r , θ , ϕ ) and ( r + d r , θ + d θ , ϕ + d ϕ ) (r+dr, \theta+d\theta, \phi+d\phi) ( r + d r , θ + d θ , ϕ + d ϕ ) , etc, depending on the coordinates. Let d s ds d s be the distance between the two points. Then, in the various coordinate systems, we have
d s 2 = d x 2 + d y 2 + d z 2 , \begin{aligned}
ds^2 &= dx^2 + dy^2 + dz^2,
\end{aligned} d s 2 = d x 2 + d y 2 + d z 2 , = d ρ 2 + ρ 2 d ϕ 2 + d z 2 , \begin{aligned}
&= d\rho^2 + \rho^2\,d\phi^2 + dz^2,
\end{aligned} = d ρ 2 + ρ 2 d ϕ 2 + d z 2 , = d r 2 + r 2 d θ 2 + r 2 sin 2 θ d ϕ 2 . \begin{aligned}
&= dr^2 + r^2\,d\theta^2 + r^2\sin^2\theta \, d\phi^2.
\end{aligned} = d r 2 + r 2 d θ 2 + r 2 sin 2 θ d ϕ 2 . Dividing this by d t 2 dt^2 d t 2 , we get the square of the velocity, v 2 = v ⋅ v v^2 = \vvec\cdot\vvec v 2 = v ⋅ v , expressed in terms of the time derivatives of the coordinates. This gives
v 2 = x ˙ 2 + y ˙ 2 + z ˙ 2 , \begin{aligned}
v^2 &= {\dot x}^2 + {\dot y}^2 + {\dot z}^2,
\end{aligned} v 2 = x ˙ 2 + y ˙ 2 + z ˙ 2 , = ρ ˙ 2 + ρ 2 ϕ ˙ 2 + z ˙ 2 , \begin{aligned}
&= {\dot \rho}^2 + \rho^2\, {\dot\phi}^2 + {\dot z}^2,
\end{aligned} = ρ ˙ 2 + ρ 2 ϕ ˙ 2 + z ˙ 2 , = r ˙ 2 + r 2 θ ˙ 2 + r 2 sin 2 θ ϕ ˙ 2 . \begin{aligned}
&= {\dot r}^2 + r^2\, {\dot\theta}^2 + r^2\sin^2\theta\, {\dot\phi}^2.
\end{aligned} = r ˙ 2 + r 2 θ ˙ 2 + r 2 sin 2 θ ϕ ˙ 2 . 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) ( 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 z z z or z ^ {\hat{\mathbf{z}}} z ^ . The formulas for ∇ f \del f ∇ f , ∇ ⋅ A \del\cdot\Avec ∇ ⋅ A and ∇ 2 f \del^2 f ∇ 2 f can be obtained from those in Secs.~\secrvecident-2 and \secrvecident-3 simply by omitting the terms that refer to z z z or A z A_z A z . As for the curl of a vector field, ∇ × A \del\cross\Avec ∇ × A , in two dimensions it can be regarded as a scalar that is identified with the z z z -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 z z z .