Calculus/Vector calculus identities

In this chapter, numerous identities related to the gradient ($$\nabla f$$), directional derivative ($$(\mathbf{V} \cdot \nabla)f$$, $$(\mathbf{V} \cdot \nabla)\mathbf{F}$$), divergence ($$\nabla \cdot \mathbf{F}$$), Laplacian ($$\nabla^2f$$, $$\nabla^2\mathbf{F}$$), and curl ($$\nabla \times \mathbf{F}$$) will be derived.

Notation
To simplify the derivation of various vector identities, the following notation will be utilized:
 * The coordinates $$x, y, z$$ will instead be denoted with $$x_1, x_2, x_3$$ respectively.
 * Given an arbitrary vector $$\mathbf{F}$$, then $$F_i$$ will denote the $$i^\text{th}$$ entry of $$\mathbf{F}$$ where $$ i = 1,2,3 $$. All vectors will be assumed to be denoted by Cartesian basis vectors ($$\mathbf{i}, \mathbf{j}, \mathbf{k}$$) unless otherwise specified: $$\mathbf{F} = F_1\mathbf{i} + F_2\mathbf{j} + F_3\mathbf{k}$$.
 * Given an arbitrary expression $$f: \{1,2,3\} \to \R$$ that assigns a real number to each index $$i = 1, 2, 3$$, then $$(i, f(i))$$ will denote the vector whose entries are determined by $$f$$. For example, $$\mathbf{F} = (i,F_i)$$.
 * Given an arbitrary expression $$f: \{1,2,3\} \to \R$$ that assigns a real number to each index $$i = 1, 2, 3$$, then $$\sum_i f(i)$$ will denote the sum $$f(1) + f(2) + f(3)$$. For example, $$\nabla \cdot \mathbf{F} = \sum_i \frac{\partial F_i}{\partial x_i}$$.
 * Given an index variable $$i \in \{1, 2, 3\}$$, $$i+1$$ will rotate $$i$$ forwards by 1, and $$i+2$$ will rotate $$i$$ forwards by 2. In essence, $$i+1 = \left\{\begin{array}{cc} i+1 & (i = 1,2) \\ 1 & (i = 3) \end{array}\right.$$ and $$i+2 = \left\{\begin{array}{cc} 3 & (i = 1) \\ i-1 & (i = 2,3) \end{array}\right.$$. For example, $$\mathbf{F} \times \mathbf{G} = (i, F_{i+1}G_{i+2} - F_{i+2}G_{i+1})$$.

As an example of using the above notation, consider the problem of expanding the triple cross product $$\mathbf{F} \times (\mathbf{G} \times \mathbf{H})$$.

$$\mathbf{F} \times (\mathbf{G} \times \mathbf{H}) = \mathbf{F} \times (i, G_{i+1}H_{i+2} - G_{i+2}H_{i+1})$$

$$ = (i, F_{i+1}(G_{i}H_{i+1} - G_{i+1}H_{i}) - F_{i+2}(G_{i+2}H_{i} - G_{i}H_{i+2}))$$

$$ = (i, G_{i}(F_{i+1}H_{i+1} + F_{i+2}H_{i+2}) - (F_{i+1}G_{i+1} + F_{i+2}G_{i+2})H_{i})$$

$$ = (i, G_{i}(F_{i}H_{i} + F_{i+1}H_{i+1} + F_{i+2}H_{i+2}) - (F_{i}G_{i} + F_{i+1}G_{i+1} + F_{i+2}G_{i+2})H_{i})$$

$$ = (i, G_{i}(\mathbf{F} \cdot \mathbf{H}) - (\mathbf{F} \cdot \mathbf{G})H_{i})$$

$$ = (\mathbf{F} \cdot \mathbf{H})\mathbf{G} - (\mathbf{F} \cdot \mathbf{G})\mathbf{H}$$

Therefore: $$\mathbf{F} \times (\mathbf{G} \times \mathbf{H}) = (\mathbf{F} \cdot \mathbf{H})\mathbf{G} - (\mathbf{F} \cdot \mathbf{G})\mathbf{H}$$

As another example of using the above notation, consider the scalar triple product $$\mathbf{F} \cdot (\mathbf{G} \times \mathbf{H})$$

$$\mathbf{F} \cdot (\mathbf{G} \times \mathbf{H}) = \mathbf{F} \cdot (i, G_{i+1}H_{i+2} - G_{i+2}H_{i+1})$$

$$ = \sum_i F_i(G_{i+1}H_{i+2} - G_{i+2}H_{i+1})$$

$$ = (\sum_i F_iG_{i+1}H_{i+2}) - (\sum_i F_iG_{i+2}H_{i+1})$$

The index $$i$$ in the above summations can be shifted by fixed amounts without changing the sum. For example, $$\sum_i F_iG_{i+1}H_{i+2} = \sum_i F_{i+1}G_{i+2}H_i = \sum_i F_{i+2}G_iH_{i+1}$$. This allows:

$$(\sum_i F_{i}G_{i+1}H_{i+2}) - (\sum_i F_{i}G_{i+2}H_{i+1}) = (\sum_i F_{i+2}G_{i}H_{i+1}) - (\sum_i F_{i+1}G_{i}H_{i+2}) = (\sum_i F_{i+1}G_{i+2}H_{i}) - (\sum_i F_{i+2}G_{i+1}H_{i})$$

$$\implies \mathbf{F} \cdot (i, G_{i+1}H_{i+2} - G_{i+2}H_{i+1}) = \mathbf{G} \cdot (i, H_{i+1}F_{i+2} - H_{i+2}F_{i+1}) = \mathbf{H} \cdot (i, F_{i+1}G_{i+2} - F_{i+2}G_{i+1})$$

$$\implies \mathbf{F} \cdot (\mathbf{G} \times \mathbf{H}) = \mathbf{G} \cdot (\mathbf{H} \times \mathbf{F}) = \mathbf{H} \cdot (\mathbf{F} \times \mathbf{G})$$

which establishes the cyclical property of the scalar triple product.

Gradient Identities
Given scalar fields, $$f$$ and $$g$$, then $$\nabla(f + g) = (\nabla f) + (\nabla g)$$.

Given scalar fields $$f$$ and $$g$$, then $$\nabla(fg) = (\nabla f)g + f(\nabla g)$$. If $$f$$ is a constant $$c$$, then $$\nabla(cg) = c(\nabla g)$$.

Given vector fields $$\mathbf{F}$$ and $$\mathbf{G}$$, then $$\nabla(\mathbf{F} \cdot \mathbf{G}) = ((\mathbf{F} \cdot \nabla)\mathbf{G} + \mathbf{F} \times (\nabla \times \mathbf{G})) + ((\mathbf{G} \cdot \nabla)\mathbf{F} + \mathbf{G} \times (\nabla \times \mathbf{F}))$$

Given scalar fields $$f_1, f_2, \dots, f_n$$ and an $$n$$ input function $$g(y_1, y_2, \dots, y_n)$$, then $$\nabla(g(f_1, f_2, \dots, f_n)) = \frac{\partial g}{\partial y_1}\bigg|_{y_1=f_1}(\nabla f_1) + \frac{\partial g}{\partial y_2}\bigg|_{y_2=f_2}(\nabla f_2) + \dots + \frac{\partial g}{\partial y_n}\bigg|_{y_n=f_n}(\nabla f_n)$$.

Directional Derivative Identities
Given vector fields $$\mathbf{V}$$ and $$\mathbf{W}$$, and scalar field $$f$$, then $$((\mathbf{V}+\mathbf{W}) \cdot \nabla)f = (\mathbf{V} \cdot \nabla)f + (\mathbf{W} \cdot \nabla)f$$.

When $$\mathbf{F}$$ is a vector field, it is also the case that: $$((\mathbf{V}+\mathbf{W}) \cdot \nabla)\mathbf{F} = (\mathbf{V} \cdot \nabla)\mathbf{F} + (\mathbf{W} \cdot \nabla)\mathbf{F}$$.

Given vector field $$\mathbf{V}$$, and scalar fields $$v$$ and $$f$$, then $$((v\mathbf{V}) \cdot \nabla)f = v((\mathbf{V} \cdot \nabla)f)$$.

When $$\mathbf{F}$$ is a vector field, it is also the case that: $$((v\mathbf{V}) \cdot \nabla)\mathbf{F} = v((\mathbf{V} \cdot \nabla)\mathbf{F})$$.

Given vector field $$\mathbf{V}$$, and scalar fields $$f$$ and $$g$$, then $$(\mathbf{V} \cdot \nabla)(f + g) = (\mathbf{V} \cdot \nabla)f + (\mathbf{V} \cdot \nabla)g$$.

When $$\mathbf{F}$$ and $$\mathbf{G}$$ are vector fields, it is also the case that: $$(\mathbf{V} \cdot \nabla)(\mathbf{F} + \mathbf{G}) = (\mathbf{V} \cdot \nabla)\mathbf{F} + (\mathbf{V} \cdot \nabla)\mathbf{G}$$.

Given vector field $$\mathbf{V}$$, and scalar fields $$f$$ and $$g$$, then $$(\mathbf{V} \cdot \nabla)(fg) = ((\mathbf{V} \cdot \nabla)f)g + f((\mathbf{V} \cdot \nabla)g)$$

If $$\mathbf{G}$$ is a vector field, it is also the case that: $$(\mathbf{V} \cdot \nabla)(f\mathbf{G}) = ((\mathbf{V} \cdot \nabla)f)\mathbf{G} + f((\mathbf{V} \cdot \nabla)\mathbf{G})$$

Given vector fields $$\mathbf{V}$$, $$\mathbf{F}$$, and $$\mathbf{G}$$, then $$(\mathbf{V} \cdot \nabla)(\mathbf{F} \cdot \mathbf{G}) = ((\mathbf{V} \cdot \nabla)\mathbf{F}) \cdot \mathbf{G} + \mathbf{F} \cdot ((\mathbf{V} \cdot \nabla)\mathbf{G})$$

Given vector fields $$\mathbf{V}$$, $$\mathbf{F}$$, and $$\mathbf{G}$$, then $$(\mathbf{V} \cdot \nabla)(\mathbf{F} \times \mathbf{G}) = ((\mathbf{V} \cdot \nabla)\mathbf{F}) \times \mathbf{G} + \mathbf{F} \times ((\mathbf{V} \cdot \nabla)\mathbf{G})$$

Divergence Identities
Given vector fields $$\mathbf{F}$$ and $$\mathbf{G}$$, then $$\nabla \cdot (\mathbf{F} + \mathbf{G}) = (\nabla \cdot \mathbf{F}) + (\nabla \cdot \mathbf{G})$$.

Given a scalar field $$f$$ and a vector field $$\mathbf{G}$$, then $$\nabla \cdot (f\mathbf{G}) = (\nabla f) \cdot \mathbf{G} + f(\nabla \cdot \mathbf{G})$$. If $$f$$ is a constant $$c$$, then $$\nabla \cdot (c\mathbf{G}) = c(\nabla \cdot \mathbf{G})$$. If $$\mathbf{G}$$ is a constant $$\mathbf{C}$$, then $$\nabla \cdot (f\mathbf{C}) = (\nabla f) \cdot \mathbf{C}$$.

Given vector fields $$\mathbf{F}$$ and $$\mathbf{G}$$, then $$\nabla \cdot (\mathbf{F} \times \mathbf{G}) = (\nabla \times \mathbf{F}) \cdot \mathbf{G} - \mathbf{F} \cdot (\nabla \times \mathbf{G})$$.

The following identity is a very important property regarding vector fields which are the curl of another vector field. A vector field which is the curl of another vector field is divergence free. Given vector field $$\mathbf{F}$$, then $$\nabla \cdot (\nabla \times \mathbf{F}) = 0$$

Laplacian Identities
Given scalar fields $$f$$ and $$g$$, then $$\nabla^2(f + g) = (\nabla^2 f) + (\nabla^2 g)$$

When $$\mathbf{F}$$ and $$\mathbf{G}$$ are vector fields, it is also the case that: $$\nabla^2(\mathbf{F} + \mathbf{G}) = (\nabla^2 \mathbf{F}) + (\nabla^2 \mathbf{G})$$

Given scalar fields $$f$$ and $$g$$, then $$\nabla^2(fg) = (\nabla^2 f)g + 2(\nabla f) \cdot (\nabla g) + f(\nabla^2 g)$$

When $$\mathbf{G}$$ is a vector field, it is also the case that $$\nabla^2(f\mathbf{G}) = (\nabla^2 f)\mathbf{G} + 2((\nabla f) \cdot \nabla)\mathbf{G} + f(\nabla^2\mathbf{G})$$

Curl Identities
Given vector fields $$\mathbf{F}$$ and $$\mathbf{G}$$, then $$\nabla \times (\mathbf{F} + \mathbf{G}) = (\nabla \times \mathbf{F}) + (\nabla \times \mathbf{G})$$

Given scalar field $$f$$ and vector field $$\mathbf{G}$$, then $$\nabla \times (f\mathbf{G}) = (\nabla f) \times \mathbf{G} + f(\nabla \times \mathbf{G})$$. If $$f$$ is a constant $$c$$, then $$\nabla \times (c\mathbf{G}) = c(\nabla \times \mathbf{G})$$. If $$\mathbf{G}$$ is a constant $$\mathbf{C}$$, then $$\nabla \times (f\mathbf{C}) = (\nabla f) \times \mathbf{C}$$.

Given vector fields $$\mathbf{F}$$ and $$\mathbf{G}$$, then $$\nabla \times (\mathbf{F} \times \mathbf{G}) = ((\nabla \cdot \mathbf{G})\mathbf{F} + (\mathbf{G} \cdot \nabla)\mathbf{F}) - ((\nabla \cdot \mathbf{F})\mathbf{G} + (\mathbf{F} \cdot \nabla)\mathbf{G})$$

The following identity is a very important property of vector fields which are the gradient of a scalar field. A vector field which is the gradient of a scalar field is always irrotational. Given scalar field $$f$$, then $$\nabla \times (\nabla f) = \mathbf{0}$$

The following identity is a complex, yet popular identity used for deriving the Helmholtz decomposition theorem. Given vector field $$\mathbf{F}$$, then $$\nabla \times (\nabla \times \mathbf{F}) = \nabla(\nabla \cdot \mathbf{F}) - \nabla^2\mathbf{F}$$

Basis Vector Identities
The Cartesian basis vectors $$\mathbf{i}$$, $$\mathbf{j}$$, and $$\mathbf{k}$$ are the same at all points in space. However, in other coordinate systems like cylindrical coordinates or spherical coordinates, the basis vectors can change with respect to position. In cylindrical coordinates, the unit-length mutually perpendicular basis vectors are $$\hat{\mathbf{\rho}} = (\cos\phi)\mathbf{i} + (\sin\phi)\mathbf{j}$$, $$\hat{\mathbf{\phi}} = (-\sin\phi)\mathbf{i} + (\cos\phi)\mathbf{j}$$, and $$\hat{\mathbf{z}} = \mathbf{k}$$ at position $$(\rho,\phi,z)$$ which corresponds to Cartesian coordinates $$(\rho\cos\phi, \rho\sin\phi, z)$$.

In spherical coordinates, the unit-length mutually perpendicular basis vectors are $$\hat{\mathbf{r}} = (\sin\theta\cos\phi)\mathbf{i} + (\sin\theta\sin\phi)\mathbf{j} + (\cos\theta)\mathbf{k}$$, $$\hat{\mathbf{\theta}} = (\cos\theta\cos\phi)\mathbf{i} + (\cos\theta\sin\phi)\mathbf{j} + (-\sin\theta)\mathbf{k}$$, and $$\hat{\mathbf{\phi}} = (-\sin\phi)\mathbf{i} + (\cos\phi)\mathbf{j}$$ at position $$(r,\theta,\phi)$$ which corresponds to Cartesian coordinates $$(r\sin\theta\cos\phi, r\sin\theta\sin\phi, r\cos\theta)$$.

It should be noted that $$\hat{\mathbf{\phi}}$$ is the same in both cylindrical and spherical coordinates.

This section will compute the directional derivative and Laplacian for the following vectors since these quantities do not immediately follow from the formulas established for the directional derivative and Laplacian for scalar fields in various coordinate systems.
 * $$\hat{\mathbf{\rho}}$$ which is the unit length vector that points away from the z-axis and is perpendicular to the z-axis.
 * $$\hat{\mathbf{\phi}}$$ which is the unit length vector that points around the z-axis in a counterclockwise direction and is both parallel to the xy-plane and perpendicular to the position vector projected onto the xy-plane.
 * $$\hat{\mathbf{r}}$$ which is the unit length vector that points away from the origin.
 * $$\hat{\mathbf{\theta}}$$ which is the unit length vector that is perpendicular to the position vector and points "south" on the surface of a sphere that is centered on the origin.

The following quantities are also important:
 * $$\rho$$ which is the perpendicular distance from the z-axis.
 * $$\phi$$ which is the azimuth: the counterclockwise angle of the position vector relative to the x-axis after being projected onto the xy-plane.
 * $$r$$ which is the distance from the origin.
 * $$\theta$$ which is the angle of the position vector to the z-axis.

Vector Rho
$$\hat{\mathbf{\rho}}$$ only changes with respect to $$\phi$$: $$\frac{\partial \hat{\mathbf{\rho}}}{\partial \phi} = \hat{\mathbf{\phi}}$$.

Given vector field $$\mathbf{V} = \mathbf{V}_\perp + v_\phi\hat{\mathbf{\phi}}$$ where $$\mathbf{V}_\perp$$ is always orthogonal to $$\hat{\mathbf{\phi}}$$, then $$(\mathbf{V} \cdot \nabla)\hat{\mathbf{\rho}} = \frac{v_\phi}{\rho}\hat{\mathbf{\phi}}$$

$$\nabla^2\hat{\mathbf{\rho}} = -\frac{1}{\rho^2}\hat{\mathbf{\rho}}$$

Vector Phi
$$\hat{\mathbf{\phi}}$$ only changes with respect to $$\phi$$: $$\frac{\partial \hat{\mathbf{\phi}}}{\partial \phi} = -\hat{\mathbf{\rho}}$$.

Given vector field $$\mathbf{V} = \mathbf{V}_\perp + v_\phi\hat{\mathbf{\phi}}$$ where $$\mathbf{V}_\perp$$ is always orthogonal to $$\hat{\mathbf{\phi}}$$, then $$(\mathbf{V} \cdot \nabla)\hat{\mathbf{\phi}} = -\frac{v_\phi}{\rho}\hat{\mathbf{\rho}}$$

$$\nabla^2\hat{\mathbf{\phi}} = -\frac{1}{\rho^2}\hat{\mathbf{\phi}}$$

Vector r
$$\hat{\mathbf{r}}$$ changes with respect to $$\theta$$ and $$\phi$$: $$\frac{\partial \hat{\mathbf{r}}}{\partial \theta} = \hat{\mathbf{\theta}}$$ and $$\frac{\partial \hat{\mathbf{r}}}{\partial \phi} = (\sin\theta)\hat{\mathbf{\phi}}$$

Given vector field $$\mathbf{V} = v_r\hat{\mathbf{r}} + v_\theta\hat{\mathbf{\theta}} + v_\phi\hat{\mathbf{\phi}}$$, then $$(\mathbf{V} \cdot \nabla)\hat{r} = \frac{1}{r}(v_\theta\hat{\mathbf{\theta}} + v_\phi\hat{\mathbf{\phi}})$$

$$\nabla^2 \hat{\mathbf{r}} = -\frac{2}{r^2}\hat{\mathbf{r}}$$

Vector Theta
$$\hat{\mathbf{\theta}}$$ changes with respect to $$\theta$$ and $$\phi$$: $$\frac{\partial \hat{\mathbf{\theta}}}{\partial \theta} = -\hat{\mathbf{r}}$$ and $$\frac{\partial \hat{\mathbf{\theta}}}{\partial \phi} = (\cos\theta)\hat{\mathbf{\phi}}$$

Given vector field $$\mathbf{V} = v_r\hat{\mathbf{r}} + v_\theta\hat{\mathbf{\theta}} + v_\phi\hat{\mathbf{\phi}}$$, then $$(\mathbf{V} \cdot \nabla)\hat{\theta} = \frac{1}{r}(-v_\theta\hat{\mathbf{r}} + \cot\theta v_\phi\hat{\mathbf{\phi}})$$

$$\nabla^2 \hat{\mathbf{\theta}} = -\frac{1}{r^2\sin\theta}(2\cos\theta\hat{\mathbf{r}} + \csc\theta\hat{\mathbf{\theta}}) = -\frac{1}{r^2\sin^2\theta}(\sin(2\theta)\hat{\mathbf{r}} + \hat{\mathbf{\theta}})$$