# Tensor Derivative in Curvilinear Coordinates

Sourangshu Ghosh

► To cite this version:

Sourangshu Ghosh. Tensor Derivative in Curvilinear Coordinates. 2024. hal-04830269

HAL Id: hal-04830269

https://hal.science/hal-04830269v1

Preprint submitted on 11 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Tensor Derivative in Curvilinear Coordinates

Sourangshu Ghosh*

* sourangshug@iisc.ac.in, Department of Civil Engineering, Indian Institute of Science Bangalore

## Abstract

In this article, we mathematically rigorously derive the expressions for the Del Operator $\nabla$, Divergence $\nabla \cdot \vec{v}$, Curl $\nabla \times \vec{v}$, Vector gradient $\nabla \vec{v}$ of Vector Fields $\vec{v}$, Laplacian $\nabla^2 f \equiv \Delta f$ of Scalar Fields $f$ and Divergence $\nabla \cdot \mathbf{T}$ of 2nd order Tensor Fields $\mathbf{T}$ in both Cylindrical and Spherical Coordinates. We also derive the Directional Derivative $(\mathbf{A} \cdot \nabla)\vec{v}$ and Vector Laplacian $\nabla^2 \vec{v} \equiv \Delta \vec{v}$ of Vector Fields $\vec{v}$ using metric coefficients in Rectangular, Cylindrical and Spherical Coordinates. We then generalized the concept of gradient, divergence and curl to Tensor Fields in any Curvilinear Coordinates. After that we rigorously discuss the concepts of Christoffel Symbols, Parallel Transport in Riemann Space, Covariant Derivative of Tensor Fields and Various Applications of Tensor Derivatives in Curvilinear Coordinates (Geodesic Equation, Riemann Curvature Tensor, Ricci Tensor and Ricci Scalar).

## Contents

<table><tbody><tr><td>1</td><td>Derivatives of Cylindrical Coordinate Unit Vectors with Respect to Cylindrical Coordinates</td><td>2</td></tr><tr><td>2</td><td>Derivatives of Spherical Coordinate Unit Vectors with Respect to Spherical Coordinates</td><td>5</td></tr><tr><td>3</td><td>Divergence of a Tensor Field</td><td>7</td></tr><tr><td>3.1</td><td>Cartesian coordinates</td><td>7</td></tr><tr><td>3.2</td><td>Curvilinear coordinates</td><td>8</td></tr><tr><td>4</td><td>Divergence ∇·<b>v</b> in Cylindrical Coordinates</td><td>9</td></tr><tr><td>5</td><td>Divergence ∇·<b>v</b> in Spherical Coordinates</td><td>11</td></tr><tr><td>6</td><td>Laplacian Δf in Cylindrical Coordinates</td><td>14</td></tr><tr><td>7</td><td>Laplacian Δf in Spherical Coordinates</td><td>15</td></tr><tr><td>8</td><td>Curl of a Tensor Field</td><td>15</td></tr><tr><td>8.1</td><td>Curl of a First-Order Tensor (Vector) Field</td><td>15</td></tr><tr><td>8.2</td><td>Curl of a Second-Order Tensor Field</td><td>16</td></tr><tr><td>8.3</td><td>Identities Involving the Curl of a Tensor Field</td><td>16</td></tr><tr><td>9</td><td>Curl ∇ × <b>v</b> in Cylindrical Coordinates</td><td>16</td></tr><tr><td>10</td><td>Curl ∇ × <b>v</b> in Spherical Coordinates</td><td>17</td></tr></tbody></table>
<table><tbody><tr><td>11 Gradient of a Tensor field</td><td>19</td></tr><tr><td>11.1 Cartesian coordinates</td><td>19</td></tr><tr><td>11.2 Curvilinear coordinates</td><td>20</td></tr><tr><td>12 Vector Gradient ∇⃗v in Cylindrical Coordinates</td><td>20</td></tr><tr><td>13 Vector Gradient ∇⃗v in Spherical Coordinates</td><td>22</td></tr><tr><td>14 Divergence ∇·T of a Second-Order Tensor in Cylindrical Coordinates</td><td>24</td></tr><tr><td>15 Divergence ∇·T of a Second-Order Tensor in Spherical Coordinates</td><td>28</td></tr><tr><td>16 Directional Derivative (A·∇)⃗v in Curvilinear Coordinates</td><td>32</td></tr><tr><td>17 Vector Laplacian Δ⃗v in Curvilinear Coordinates</td><td>33</td></tr><tr><td>18 Derivatives with respect to vectors and second-order tensors</td><td>35</td></tr><tr><td>18.1 Derivatives of scalar and vector valued functions of vectors</td><td>35</td></tr><tr><td>18.2 Derivatives of scalar and vector valued functions of second-order tensors</td><td>35</td></tr><tr><td>19 Advanced Tensor Derivatives</td><td>36</td></tr><tr><td>19.1 Christoffel symbols</td><td>36</td></tr><tr><td>19.1.1 Manifold, Coordinate System setup and the metric tensor</td><td>36</td></tr><tr><td>19.1.2 Covariant Derivative of a Vector Field</td><td>36</td></tr><tr><td>19.1.3 Christoffel symbols in Euclidean Space</td><td>37</td></tr><tr><td>19.1.4 Christoffel Symbols of the Second Kind</td><td>39</td></tr><tr><td>19.1.5 Transformation Law for Christoffel Symbols</td><td>40</td></tr><tr><td>19.2 Parallel Transport in Riemannian Space</td><td>40</td></tr><tr><td>19.2.1 Derivation of the Relationship to Index-Free Notation</td><td>41</td></tr><tr><td>19.2.2 Christoffel Symbols In Earth Surface Coordinates</td><td>43</td></tr><tr><td>19.3 Covariant Derivative of Tensors</td><td>44</td></tr><tr><td>19.4 Applications</td><td>46</td></tr><tr><td>19.4.1 Application 1: Geodesic Equation</td><td>46</td></tr><tr><td>19.4.2 Application 2: Riemann Curvature Tensor</td><td>46</td></tr><tr><td>19.4.3 Application 3: Ricci Tensor and Ricci Scalar</td><td>47</td></tr><tr><td>20 References</td><td>48</td></tr></tbody></table>

# 1 Derivatives of Cylindrical Coordinate Unit Vectors with Respect to Cylindrical Coordinates

To rigorously derive the derivatives of the cylindrical coordinate unit vectors ($\hat{e}_{\rho}$, $\hat{e}_{\theta}$, and $\hat{e}_{z}$) with respect to the cylindrical coordinates ($\rho$, $\theta$, and $z$), we must first recall the geometric meaning of these unit vectors and the way they vary with changes in the cylindrical coordinates.

## Step 1: Cylindrical Coordinates and Unit Vectors

The Cylindrical coordinates ($\rho$, $\theta$, $z$) are related to Cartesian coordinates ($x$, $y$, $z$) as follows:

$$ \rho = \sqrt{x^2 + y^2}, \quad \theta = \tan^{-1}\left(\frac{y}{x}\right), \quad z = z. $$

The unit vectors in cylindrical coordinates are defined as:
* Radial unit vector $\hat{e}_{\rho}$:

$$ \hat{e}_{\rho} = \cos \theta \hat{i} + \sin \theta \hat{j} $$

where $\hat{i}$ and $\hat{j}$ are the unit vectors in the x- and y-directions, respectively. This vector points in the direction of increasing $\rho$.

* Azimuthal unit vector $\hat{e}_{\theta}$:

$$ \hat{e}_{\theta} = -\sin \theta \hat{i} + \cos \theta \hat{j} $$

which is perpendicular to $\hat{e}_{\rho}$ and points in the direction of increasing $\theta$.

* Axial unit vector $\hat{e}_{z}$:

$$ \hat{e}_{z} = \hat{k} $$

where $\hat{k}$ is the unit vector in the z-direction. This vector is constant and points in the direction of increasing $z$.

## Step 2: Derivatives of Unit Vectors with Respect to $\rho$

Since the unit vectors $\hat{e}_{\rho}$, $\hat{e}_{\theta}$, and $\hat{e}_{z}$ do not depend explicitly on $\rho$, their derivatives with respect to $\rho$ are straightforward:

* Derivative of $\hat{e}_{\rho}$ with respect to $\rho$:

$$ \frac{\partial \hat{e}_{\rho}}{\partial \rho} = 0 $$

* Derivative of $\hat{e}_{\theta}$ with respect to $\rho$:

$$ \frac{\partial \hat{e}_{\theta}}{\partial \rho} = 0 $$

* Derivative of $\hat{e}_{z}$ with respect to $\rho$:

$$ \frac{\partial \hat{e}_{z}}{\partial \rho} = 0 $$

Thus, none of the unit vectors in cylindrical coordinates change as a function of $\rho$, so all the derivatives with respect to $\rho$ are zero.

## Step 3: Derivatives of Unit Vectors with Respect to $\theta$

The unit vectors $\hat{e}_{\rho}$ and $\hat{e}_{\theta}$ depend explicitly on the coordinate $\theta$, as they involve trigonometric functions of $\theta$. Therefore, we need to carefully compute their derivatives with respect to $\theta$.

* Derivative of $\hat{e}_{\rho}$ with respect to $\theta$:

$$ \hat{e}_{\rho} = \cos \theta \hat{i} + \sin \theta \hat{j} $$

Taking the derivative with respect to $\theta$:

$$ \frac{\partial \hat{e}_{\rho}}{\partial \theta} = -\sin \theta \hat{i} + \cos \theta \hat{j} $$

Noting that $-\sin \theta \hat{i} + \cos \theta \hat{j} = \hat{e}_{\theta}$, we have:

$$ \frac{\partial \hat{e}_{\rho}}{\partial \theta} = \hat{e}_{\theta} $$
* Derivative of $\hat{e}_{\theta}$ with respect to $\theta$:

$$ \hat{e}_{\theta} = -\sin \theta \hat{i} + \cos \theta \hat{j}. $$

Taking the derivative with respect to $\theta$:

$$ \frac{\partial \hat{e}_{\theta}}{\partial \theta} = -\cos \theta \hat{i} - \sin \theta \hat{j}. $$

Noting that $-\cos \theta \hat{i} - \sin \theta \hat{j} = -\hat{e}_{\rho}$, we have:

$$ \frac{\partial \hat{e}_{\theta}}{\partial \theta} = -\hat{e}_{\rho} $$

* Derivative of $\hat{e}_z$ with respect to $\theta$: Since $\hat{e}_z$ does not depend on $\theta$, its derivative is zero:

$$ \frac{\partial \hat{e}_z}{\partial \theta} = 0 $$

## Step 4: Derivatives of Unit Vectors with Respect to $z$

Finally, we compute the derivatives of the unit vectors with respect to $z$. Since none of the unit vectors in cylindrical coordinates depend on $z$, the derivatives with respect to $z$ are zero:

* Derivative of $\hat{e}_{\rho}$ with respect to $z$:

$$ \frac{\partial \hat{e}_{\rho}}{\partial z} = 0 $$

* Derivative of $\hat{e}_{\theta}$ with respect to $z$:

$$ \frac{\partial \hat{e}_{\theta}}{\partial z} = 0 $$

* Derivative of $\hat{e}_z$ with respect to $z$:

$$ \frac{\partial \hat{e}_z}{\partial z} = 0 $$

## Step 5: Summary of Results

The full matrix of partial derivatives of the cylindrical unit vectors with respect to the cylindrical coordinates is:

$$ \begin{bmatrix} \frac{\partial \hat{e}_{\rho}}{\partial \rho} & \frac{\partial \hat{e}_{\rho}}{\partial \theta} & \frac{\partial \hat{e}_{\rho}}{\partial z} \\ \frac{\partial \hat{e}_{\theta}}{\partial \rho} & \frac{\partial \hat{e}_{\theta}}{\partial \theta} & \frac{\partial \hat{e}_{\theta}}{\partial z} \\ \frac{\partial \hat{e}_{z}}{\partial \rho} & \frac{\partial \hat{e}_{z}}{\partial \theta} & \frac{\partial \hat{e}_{z}}{\partial z} \end{bmatrix} = \begin{bmatrix} 0 & \hat{e}_{\theta} & 0 \\ 0 & -\hat{e}_{\rho} & 0 \\ 0 & 0 & 0 \end{bmatrix} $$

This is the complete set of partial derivatives of the cylindrical coordinate unit vectors with respect to the cylindrical coordinates.

## Final Explanation

* $\hat{e}_{\rho}$ and $\hat{e}_{\theta}$ depend on $\theta$, and their rates of change are captured in terms of the other unit vector (either $\hat{e}_{\theta}$ or $\hat{e}_{\rho}$).

* $\hat{e}_z$ is independent of both $\rho$, $\theta$, and $z$, and thus all its partial derivatives are zero.

* No unit vectors depend on $\rho$ or $z$, so all partial derivatives with respect to these coordinates are zero except for $\theta$-related derivatives.
## 2 Derivatives of Spherical Coordinate Unit Vectors with Respect to Spherical Coordinates

The spherical coordinates $(r, \theta, \phi)$ describe a point in three-dimensional space:

* $r$: radial distance from the origin,

* $\theta$: polar angle (measured from the positive z-axis),

* $\phi$: azimuthal angle (measured from the positive x-axis in the xy-plane).

In Cartesian coordinates, the point $(x, y, z)$ can be expressed as:

$$x = r \sin \theta \cos \phi$$

$$y = r \sin \theta \sin \phi$$

$$z = r \cos \theta$$

### Definition of Unit Vectors

In spherical coordinates, the position vector of a point is:

$$\vec{r} = r \vec{e}_r$$

where $\vec{e}_r$, $\vec{e}_\theta$, and $\vec{e}_\phi$ are the unit vectors along the $r$, $\theta$, and $\phi$ directions, respectively. These unit vectors are related to the Cartesian unit vectors $\hat{i}$, $\hat{j}$, and $\hat{k}$ by the following expressions:

$$\vec{e}_r = \sin \theta \cos \phi \hat{i} + \sin \theta \sin \phi \hat{j} + \cos \theta \hat{k}$$

$$\vec{e}_\theta = \cos \theta \cos \phi \hat{i} + \cos \theta \sin \phi \hat{j} - \sin \theta \hat{k}$$

$$\vec{e}_\phi = -\sin \phi \hat{i} + \cos \phi \hat{j}$$

### Derivatives of Unit Vectors with Respect to r

Since the unit vectors $\vec{e}_r$, $\vec{e}_\theta$, and $\vec{e}_\phi$ depend only on $\theta$ and $\phi$, their derivatives with respect to $r$ are zero:

$$\frac{\partial \vec{e}_r}{\partial r} = 0, \quad \frac{\partial \vec{e}_\theta}{\partial r} = 0, \quad \frac{\partial \vec{e}_\phi}{\partial r} = 0$$

### Derivative of $\vec{e}_r$ with Respect to $\theta$

To compute $\frac{\partial \vec{e}_r}{\partial \theta}$, we take the derivative of each component of $\vec{e}_r$ with respect to $\theta$:

$$\vec{e}_r = \sin \theta \cos \phi \hat{i} + \sin \theta \sin \phi \hat{j} + \cos \theta \hat{k}$$

$$\frac{\partial \vec{e}_r}{\partial \theta} = \cos \theta \cos \phi \hat{i} + \cos \theta \sin \phi \hat{j} - \sin \theta \hat{k}$$

From the definition of $\vec{e}_\theta$, we recognize this result as:

$$\frac{\partial \vec{e}_r}{\partial \theta} = \vec{e}_\theta$$
## Derivative of $\vec{e}_r$ with Respect to $\phi$

Similarly, to compute $\frac{\partial \vec{e}_r}{\partial \phi}$, we differentiate the components of $\vec{e}_r$ with respect to $\phi$:

$$ \vec{e}_r = \sin \theta \cos \phi \hat{i} + \sin \theta \sin \phi \hat{j} + \cos \theta \hat{k} $$

$$ \frac{\partial \vec{e}_r}{\partial \phi} = -\sin \theta \sin \phi \hat{i} + \sin \theta \cos \phi \hat{j} $$

This expression corresponds to:

$$ \frac{\partial \vec{e}_r}{\partial \phi} = \sin \theta \vec{e}_\phi $$

## Derivative of $\vec{e}_\theta$ with Respect to $\theta$

Now, we compute $\frac{\partial \vec{e}_\theta}{\partial \theta}$:

$$ \vec{e}_\theta = \cos \theta \cos \phi \hat{i} + \cos \theta \sin \phi \hat{j} - \sin \theta \hat{k} $$

$$ \frac{\partial \vec{e}_\theta}{\partial \theta} = -\sin \theta \cos \phi \hat{i} - \sin \theta \sin \phi \hat{j} - \cos \theta \hat{k} $$

This expression is the negative of $\vec{e}_r$:

$$ \frac{\partial \vec{e}_\theta}{\partial \theta} = -\vec{e}_r $$

## Derivative of $\vec{e}_\theta$ with Respect to $\phi$

For $\frac{\partial \vec{e}_\theta}{\partial \phi}$, we differentiate the components of $\vec{e}_\theta$ with respect to $\phi$:

$$ \vec{e}_\theta = \cos \theta \cos \phi \hat{i} + \cos \theta \sin \phi \hat{j} - \sin \theta \hat{k} $$

$$ \frac{\partial \vec{e}_\theta}{\partial \phi} = -\cos \theta \sin \phi \hat{i} + \cos \theta \cos \phi \hat{j} $$

This is:

$$ \frac{\partial \vec{e}_\theta}{\partial \phi} = \cos \theta \vec{e}_\phi $$

## Derivative of $\vec{e}_\phi$ with Respect to $\theta$

Next, we calculate $\frac{\partial \vec{e}_\phi}{\partial \theta}$. Since $\vec{e}_\phi = -\sin \phi \hat{i} + \cos \phi \hat{j}$, it has no $\theta$-dependence, so:

$$ \frac{\partial \vec{e}_\phi}{\partial \theta} = 0 $$
## Derivative of $\vec{e}_{\phi}$ with Respect to $\phi$

Finally, we compute $\frac{\partial \vec{e}_{\phi}}{\partial \phi}$:

$$ \vec{e}_{\phi} = -\sin \phi \hat{i} + \cos \phi \hat{j} $$

$$ \frac{\partial \vec{e}_{\phi}}{\partial \phi} = -\cos \phi \hat{i} - \sin \phi \hat{j} $$

This is the negative of $\vec{e}_{\phi}$:

$$ \frac{\partial \vec{e}_{\phi}}{\partial \phi} = -\vec{e}_{\phi} $$

## Summary of Results

The derivatives of the unit vectors in spherical coordinates are:

$$ \frac{\partial \vec{e}_r}{\partial r} = 0, \quad \frac{\partial \vec{e}_{\theta}}{\partial r} = 0, \quad \frac{\partial \vec{e}_{\phi}}{\partial r} = 0 $$

$$ \frac{\partial \vec{e}_r}{\partial \theta} = \vec{e}_{\theta}, \quad \frac{\partial \vec{e}_r}{\partial \phi} = \sin \theta \vec{e}_{\phi} $$

$$ \frac{\partial \vec{e}_{\theta}}{\partial \theta} = -\vec{e}_{r}, \quad \frac{\partial \vec{e}_{\theta}}{\partial \phi} = \cos \theta \vec{e}_{\phi} $$

$$ \frac{\partial \vec{e}_{\phi}}{\partial \theta} = 0, \quad \frac{\partial \vec{e}_{\phi}}{\partial \phi} = -\vec{e}_{\phi} $$

# 3 Divergence of a Tensor Field

## 3.1 Cartesian coordinates

In a Cartesian coordinate system we have the following relations for a vector field $v$ and a second-order tensor field $S$:

$$ \nabla \cdot \mathbf{v} = \frac{\partial v_i}{\partial x_i} = v_{i,i} \mathbf{e}_i $$

$$ \nabla \cdot \mathbf{S} = \frac{\partial S_{ki}}{\partial x_i} \mathbf{e}_k = S_{ki,i} \mathbf{e}_k $$

where tensor index notation for partial derivatives is used in the rightmost expressions. Note that

$$ \nabla \cdot \mathbf{S} \neq \nabla \cdot \mathbf{S}^{\top} $$

For a symmetric second-order tensor, the divergence is also often written as:

$$ \nabla \cdot \mathbf{S} = \frac{\partial S_{ki}}{\partial x_i} \mathbf{e}_k = S_{ki,i} \mathbf{e}_k $$

The above expression is sometimes used as the definition of $\nabla \cdot \mathbf{S}$ in Cartesian component form (often also written as $\text{div} \mathbf{S}$). Note that such a definition is not consistent with the rest of this article (see the section on curvilinear coordinates).
The difference stems from whether the differentiation is performed with respect to the rows or columns of **S**, and is conventional. This is demonstrated by an example. In a Cartesian coordinate system, the second-order tensor (matrix) **S** is the gradient of a vector function **v**:

$$ \nabla \cdot (\nabla \mathbf{v}) = \nabla \cdot \mathbf{V} = (v_{ij}\mathbf{e}_i \otimes \mathbf{e}_j) \cdot \mathbf{e}_i = v_{ij,i}\mathbf{e}_j = (\nabla \cdot \nabla \cdot \mathbf{v}) = \nabla^2 v $$

$$ \nabla \cdot [(\nabla \mathbf{v})^{\top}] = \nabla \cdot \mathbf{V}^{\top} = (v_{ji}\mathbf{e}_i \otimes \mathbf{e}_j) \cdot \mathbf{e}_i = v_{ji,j}\mathbf{e}_j = \nabla^2 \mathbf{v} $$

The last equation is equivalent to the alternative definition/interpretation:

$$ (\nabla)_{\text{alt}}(\nabla \mathbf{v}) = (\nabla)_{\text{alt}}(v_{ij}\mathbf{e}_i \otimes \mathbf{e}_j) = v_{ij,j}\mathbf{e}_j = \nabla^2 \mathbf{v}, \mathbf{e}_i = \nabla^2 \mathbf{v} $$

## 3.2 Curvilinear coordinates

If **g**¹, **g**², **g**³ are the contravariant basis vectors in a curvilinear coordinate system. In curvilinear coordinates, the divergences of a vector field **v** and a second-order tensor field **S** are:

$$ \nabla \cdot \mathbf{v} = \frac{\partial v^i}{\partial \xi^i} + v^k \Gamma^i_{ik} $$

$$ \nabla \cdot \mathbf{S} = \frac{\partial S_{ik}}{\partial \xi^i} - S_{lk} \Gamma^l_{ii} - S_{il} \Gamma^l_{ik} \mathbf{g}^k $$

More generally

$$ \nabla \cdot \mathbf{S} = \left( \frac{\partial S_{ij}}{\partial \xi^i} - \Gamma^j_{ik} S_{ij} - \Gamma^l_{kj} S_{il} \right) \mathbf{g}^i \otimes \mathbf{b}^j $$

$$ \nabla \cdot \mathbf{S} = \left( \frac{\partial S_{ij}}{\partial \xi^k} - \Gamma^i_{jk} S_{il} - \Gamma^m_{lj} S_{lm} \right) \mathbf{g}^i \otimes \mathbf{b}^j $$

$$ = \left[ \frac{\partial S^i_j}{\partial q^i} + \Gamma^i_{il} S^l_j - \Gamma^l_{ij} S^i_l \right] \mathbf{b}^j $$

$$ = \left[ \frac{\partial S^i_j}{\partial q^k} - \Gamma^l_{ik} S^j_l + \Gamma^j_{kl} S^l_i \right] g^{ik} \mathbf{b}_j $$

In cylindrical polar coordinates:

$$ \nabla \cdot \mathbf{v} = \frac{\partial v_r}{\partial r} + \frac{1}{r} \left( \frac{\partial v_{\theta}}{\partial \theta} + v_r \right) + \frac{\partial v_z}{\partial z} $$

$$ \nabla \cdot \mathbf{S} = \frac{\partial S_{rr}}{\partial r} \mathbf{e}_r + \frac{\partial S_{r\theta}}{\partial r} \mathbf{e}_\theta + \frac{\partial S_{rz}}{\partial r} \mathbf{e}_z $$

$$ + \frac{1}{r} \left[ \frac{\partial S_{\theta r}}{\partial \theta} + (S_{rr} - S_{\theta\theta}) \right] \mathbf{e}_r + \frac{1}{r} \left[ \frac{\partial S_{\theta\theta}}{\partial \theta} + (S_{r\theta} + S_{\theta r}) \right] \mathbf{e}_\theta $$

$$ + \frac{1}{r} \left[ \frac{\partial S_{\theta z}}{\partial \theta} + S_{rz} \right] \mathbf{e}_z $$

$$ + \frac{\partial S_{zr}}{\partial z} \mathbf{e}_r + \frac{\partial S_{z\theta}}{\partial z} \mathbf{e}_\theta + \frac{\partial S_{zz}}{\partial z} \mathbf{e}_z $$
## 4 Divergence $\nabla \cdot \vec{v}$ in Cylindrical Coordinates

We first need to compute the partial derivatives $\frac{\partial}{\partial x}$; $\frac{\partial}{\partial y}$ and $\frac{\partial}{\partial z}$ in terms of $\frac{\partial}{\partial \rho}$, $\frac{\partial}{\partial \phi}$, and $\frac{\partial}{\partial z}$. For that, let us apply the basic rule of differentiation called the chain rule.

$$ \frac{\partial}{\partial x} = \frac{\partial \rho}{\partial x} \frac{\partial}{\partial \rho} + \frac{\partial \phi}{\partial x} \frac{\partial}{\partial \phi} $$

Note here that in the above formula I have skipped the variable z. The reason behind this is very simple. As we know for both the systems, i.e., Cartesian and Cylindrical, z coordinate is exactly the same; only $\rho$ and $\phi$ are the functions of x and y as mentioned above.

$$ \frac{\partial \rho}{\partial x} = \frac{\partial}{\partial x} \left( \sqrt{x^2 + y^2} \right) = \frac{x}{\sqrt{x^2 + y^2}} \\ \Rightarrow \quad \frac{\partial \rho}{\partial x} = \frac{\rho \cos \phi}{\rho} = \cos \phi $$

Note the simplification in the above step. As we are going to convert into the Cylindrical coordinates from the Cartesian ones, we must simplify to the extent so that to get cylindrical variables. Similarly,

$$ \frac{\partial \phi}{\partial x} = \frac{\partial}{\partial x} \tan^{-1} \left( \frac{y}{x} \right) = \frac{-y}{x^2 + \left( \frac{y}{x} \right)^2} = \frac{-y}{x^2 + y^2} \\ \Rightarrow \quad \frac{\partial \phi}{\partial x} = \frac{-y}{\rho^2} = \frac{-\sin \phi}{\rho} $$

So putting these values above, we have,

$$ \frac{\partial}{\partial x} = \cos \phi \frac{\partial}{\partial \rho} + \left( \frac{-\sin \phi}{\rho} \right) \frac{\partial}{\partial \phi} $$

Similarly we can write

$$ \frac{\partial}{\partial y} = \sin \phi \frac{\partial}{\partial \rho} + \left( \frac{\cos \phi}{\rho} \right) \frac{\partial}{\partial \phi} $$

Using the above 2 boxed equations, we can therefore write

$$ \nabla = \frac{\partial}{\partial x} \vec{e}_x + \frac{\partial}{\partial y} \vec{e}_y + \frac{\partial}{\partial z} \vec{e}_z $$

$$ \Rightarrow \nabla = (\cos \phi \vec{e}_{\rho} - \sin \phi \vec{e}_{\phi}) \left( \frac{\partial}{\partial \rho} \right) + \left( \frac{-\sin \phi}{\rho} \right) \frac{\partial}{\partial \phi} + (\sin \phi \vec{e}_{\rho} + \cos \phi \vec{e}_{\phi}) \left( \frac{\partial}{\partial \rho} \right) + \left( \frac{\cos \phi}{\rho} \right) \frac{\partial}{\partial \phi} + \frac{\partial}{\partial z} \vec{e}_z $$

Collecting similar terms together we get as follows:

$$ \nabla = (\sin^2 \phi + \cos^2 \phi) \frac{\partial}{\partial \rho} \vec{e}_{\rho} + \frac{1}{\rho} (\sin^2 \phi + \cos^2 \phi) \frac{\partial}{\partial \phi} \vec{e}_{\phi} + \frac{\partial}{\partial z} \vec{e}_z \\ \Rightarrow \quad \nabla = \vec{e}_{\rho} \frac{\partial}{\partial \rho} + \vec{e}_{\phi} \frac{1}{\rho} \frac{\partial}{\partial \phi} + \vec{e}_z \frac{\partial}{\partial z} $$

A vector field $\mathbf{v}$ can be written in Cylindrical Coordinates as

$$ \vec{v} = v_{\rho}\mathbf{e}_{\rho} + v_{\phi}\mathbf{e}_{\phi} + v_z\mathbf{e}_z $$
We have earlier derived that the cylindrical Del operator is

$$ \nabla = \mathbf{e}_{\rho} \frac{\partial}{\partial \rho} + \mathbf{e}_{\phi} \frac{1}{\rho} \frac{\partial}{\partial \phi} + \mathbf{e}_{z} \frac{\partial}{\partial z} $$

Therefore the divergence of the vector field **v** shall be

$$ \begin{gathered} \operatorname{div}(\vec{\mathbf{v}}) = \nabla \cdot \vec{\mathbf{v}} = (\mathbf{e}_{\rho} \frac{\partial}{\partial \rho} + \mathbf{e}_{\phi} \frac{1}{\rho} \frac{\partial}{\partial \phi} + \mathbf{e}_{z} \frac{\partial}{\partial z}) \cdot (v_{\rho} \mathbf{e}_{\rho} + v_{\phi} \mathbf{e}_{\phi} + v_{z} \mathbf{e}_{z}) \\ \Rightarrow \operatorname{div}(\vec{\mathbf{v}}) = \nabla \cdot \vec{\mathbf{v}} = \mathbf{e}_{\rho} \frac{\partial}{\partial \rho} \cdot (v_{\rho} \mathbf{e}_{\rho} + v_{\phi} \mathbf{e}_{\phi} + v_{z} \mathbf{e}_{z}) + \mathbf{e}_{\phi} \frac{1}{\rho} \frac{\partial}{\partial \phi} \cdot (v_{\rho} \mathbf{e}_{\rho} + v_{\phi} \mathbf{e}_{\phi} + v_{z} \mathbf{e}_{z}) + \mathbf{e}_{z} \frac{\partial}{\partial z} \cdot (v_{\rho} \mathbf{e}_{\rho} + v_{\phi} \mathbf{e}_{\phi} + v_{z} \mathbf{e}_{z}) \end{gathered} $$

Now note that we have

$$ \frac{\partial}{\partial \rho} (\vec{\mathbf{e}}_{\rho}) = 0; \quad \frac{\partial}{\partial \rho} (\vec{\mathbf{e}}_{\phi}) = 0; \quad \frac{\partial}{\partial \rho} (\vec{\mathbf{e}}_{z}) = 0 $$

$$ \frac{\partial}{\partial \phi} (\vec{\mathbf{e}}_{\rho}) = \vec{\mathbf{e}}_{\phi}; \quad \frac{\partial}{\partial \phi} (\vec{\mathbf{e}}_{\phi}) = -\vec{\mathbf{e}}_{\rho}; \quad \frac{\partial}{\partial \phi} (\vec{\mathbf{e}}_{z}) = 0 $$

$$ \frac{\partial}{\partial z} (\vec{\mathbf{e}}_{\rho}) = 0; \quad \frac{\partial}{\partial z} (\vec{\mathbf{e}}_{\phi}) = 0; \quad \frac{\partial}{\partial z} (\vec{\mathbf{e}}_{z}) = 0 $$

Therefore the above boxed equation can be written as

$$ \begin{align*} \nabla \cdot \vec{\mathbf{v}} &= \left( \vec{\mathbf{e}}_{\rho} \frac{\partial}{\partial \rho} + \vec{\mathbf{e}}_{\phi} \frac{1}{\rho} \frac{\partial}{\partial \phi} + \vec{\mathbf{e}}_{z} \frac{\partial}{\partial z} \right) \cdot (v_{\rho} \vec{\mathbf{e}}_{\rho} + v_{\phi} \vec{\mathbf{e}}_{\phi} + v_{z} \vec{\mathbf{e}}_{z}) \\ &= \vec{\mathbf{e}}_{\rho} \cdot \left[ \left( v_{\rho} \frac{\partial \vec{\mathbf{e}}_{\rho}}{\partial \rho} + \vec{\mathbf{e}}_{\rho} \frac{\partial v_{\rho}}{\partial \rho} \right) + \left( v_{\phi} \frac{\partial \vec{\mathbf{e}}_{\phi}}{\partial \rho} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \rho} \right) + \left( v_{z} \frac{\partial \vec{\mathbf{e}}_{z}}{\partial \rho} + \vec{\mathbf{e}}_{z} \frac{\partial v_{z}}{\partial \rho} \right) \right] \\ &\quad + \frac{1}{\rho} \vec{\mathbf{e}}_{\phi} \cdot \left[ \left( v_{\rho} \frac{\partial \vec{\mathbf{e}}_{\rho}}{\partial \phi} + \vec{\mathbf{e}}_{\rho} \frac{\partial v_{\rho}}{\partial \phi} \right) + \left( v_{\phi} \frac{\partial \vec{\mathbf{e}}_{\phi}}{\partial \phi} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \phi} \right) + \left( v_{z} \frac{\partial \vec{\mathbf{e}}_{z}}{\partial \phi} + \vec{\mathbf{e}}_{z} \frac{\partial v_{z}}{\partial \phi} \right) \right] \\ &\quad + \vec{\mathbf{e}}_{z} \cdot \left[ \left( v_{\rho} \frac{\partial \vec{\mathbf{e}}_{z}}{\partial z} + \vec{\mathbf{e}}_{\rho} \frac{\partial v_{\rho}}{\partial z} \right) + \left( v_{\phi} \frac{\partial \vec{\mathbf{e}}_{z}}{\partial z} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial z} \right) + \left( v_{z} \frac{\partial \vec{\mathbf{e}}_{z}}{\partial z} + \vec{\mathbf{e}}_{z} \frac{\partial v_{z}}{\partial z} \right) \right] \\ &= \vec{\mathbf{e}}_{\rho} \cdot \left[ \left( v_{\rho}(0) + \vec{\mathbf{e}}_{\rho} \frac{\partial v_{\rho}}{\partial \rho} \right) + \left( v_{\phi}(0) + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \rho} \right) + \left( v_{z}(0) + \vec{\mathbf{e}}_{z} \frac{\partial v_{z}}{\partial \rho} \right) \right] \\ &\quad + \frac{1}{\rho} \vec{\mathbf{e}}_{\phi} \cdot \left[ \left( v_{\rho}(\vec{\mathbf{e}}_{\phi}) + \vec{\mathbf{e}}_{\rho} \frac{\partial v_{\rho}}{\partial \phi} \right) + \left( v_{\phi}(-\vec{\mathbf{e}}_{\rho}) + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \phi} \right) + \left( v_{z}(0) + \vec{\mathbf{e}}_{z} \frac{\partial v_{z}}{\partial \phi} \right) \right] \\ &\quad + \vec{\mathbf{e}}_{z} \cdot \left[ \left( v_{\rho}(0) + \vec{\mathbf{e}}_{\rho} \frac{\partial v_{\rho}}{\partial z} \right) + \left( v_{\phi}(0) + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial z} \right) + \left( v_{z}(0) + \vec{\mathbf{e}}_{z} \frac{\partial v_{z}}{\partial z} \right) \right] \end{align*} $$

The above expression can be simplified as

$$ \begin{align*} \operatorname{div} \cdot \vec{\mathbf{v}} = \nabla \cdot \vec{\mathbf{v}} &= (\vec{\mathbf{e}}_{\rho} \cdot \vec{\mathbf{e}}_{\rho}) \left( \frac{\partial v_{\rho}}{\partial \rho} \right) + (\vec{\mathbf{e}}_{\rho} \cdot \vec{\mathbf{e}}_{\phi}) \left( \frac{\partial v_{\phi}}{\partial \rho} \right) + (\vec{\mathbf{e}}_{\rho} \cdot \vec{\mathbf{e}}_{z}) \left( \frac{\partial v_{z}}{\partial \rho} \right) \\ &\quad + \frac{v_{\rho}}{\rho} (\vec{\mathbf{e}}_{\phi} \cdot \vec{\mathbf{e}}_{\phi}) + \frac{1}{\rho} (\vec{\mathbf{e}}_{\phi} \cdot \vec{\mathbf{e}}_{\rho}) \left( \frac{\partial v_{\rho}}{\partial \phi} \right) - \frac{v_{\phi}}{\rho} (\vec{\mathbf{e}}_{\phi} \cdot \vec{\mathbf{e}}_{\rho}) + \frac{1}{\rho} (\vec{\mathbf{e}}_{\phi} \cdot \vec{\mathbf{e}}_{\phi}) \left( \frac{\partial v_{\phi}}{\partial \phi} \right) + \frac{1}{\rho} (\vec{\mathbf{e}}_{\phi} \cdot \vec{\mathbf{e}}_{z}) \left( \frac{\partial v_{z}}{\partial \phi} \right) \end{align*} $$
$$+(\vec{e}_z \cdot \vec{e}_\rho) \left(\frac{\partial v_z}{\partial z}\right) + (\vec{e}_z \cdot \vec{e}_\phi) \left(\frac{\partial v_z}{\partial z}\right) + (\vec{e}_z \cdot \vec{e}_\rho) \left(\frac{\partial v_z}{\partial z}\right)$$

Now note that we have

$$\vec{e}_{\rho} \cdot \vec{e}_{\rho} = \vec{e}_{\phi} \cdot \vec{e}_{\phi} = \vec{e}_{z} \cdot \vec{e}_{z} = 1$$

$$\vec{e}_{\rho} \cdot \vec{e}_{\phi} = \vec{e}_{\phi} \cdot \vec{e}_{z} = \vec{e}_{z} \cdot \vec{e}_{\rho} = 0$$

Therefore we can write

$$\operatorname{div} \cdot \vec{v} = \nabla \cdot \vec{v} = \frac{\partial v_{\rho}}{\partial \rho} + \frac{v_{\rho}}{\rho} + \frac{1}{\rho} \frac{\partial v_{\phi}}{\partial \phi} + \frac{\partial v_{z}}{\partial z}$$

This is the expression for divergence in Cylindrical coordinates.

# 5 Divergence $\nabla \cdot \vec{v}$ in Spherical Coordinates

We first need to compute the partial derivatives $\frac{\partial}{\partial x}$; $\frac{\partial}{\partial y}$ and $\frac{\partial}{\partial z}$ in terms of $\frac{\partial}{\partial r}$; $\frac{\partial}{\partial \theta}$ and $\frac{\partial}{\partial \phi}$. For that let us apply the basic rule of differentiation called the chain rule.

$$\frac{\partial}{\partial x} = \frac{\partial}{\partial r} \frac{\partial r}{\partial x} + \frac{\partial}{\partial \theta} \frac{\partial \theta}{\partial x} + \frac{\partial}{\partial \phi} \frac{\partial \phi}{\partial x}$$

$$\frac{\partial}{\partial y} = \frac{\partial}{\partial r} \frac{\partial r}{\partial y} + \frac{\partial}{\partial \theta} \frac{\partial \theta}{\partial y} + \frac{\partial}{\partial \phi} \frac{\partial \phi}{\partial y}$$

$$\frac{\partial}{\partial z} = \frac{\partial}{\partial r} \frac{\partial r}{\partial z} + \frac{\partial}{\partial \theta} \frac{\partial \theta}{\partial z} + \frac{\partial}{\partial \phi} \frac{\partial \phi}{\partial z}$$

Therefore, we will need the following derivatives:

$$\frac{\partial r}{\partial x}; \frac{\partial \theta}{\partial x}; \frac{\partial \phi}{\partial x}; \frac{\partial r}{\partial y}; \frac{\partial \theta}{\partial y}; \frac{\partial \phi}{\partial y}; \frac{\partial r}{\partial z}; \frac{\partial \theta}{\partial z} \text{ and } \frac{\partial \phi}{\partial z}$$

Let us calculate all the required derivatives one by one

$$\therefore \frac{\partial r}{\partial x} = \frac{r \sin \theta \cos \phi}{r} = \sin \theta \cos \phi$$

Similarly, we also have

$$\begin{aligned} \frac{\partial \theta}{\partial x} &= \frac{\partial}{\partial x} \tan^{-1} \left( \sqrt{\frac{x^2 + y^2}{z}} \right) = \frac{-1}{1 + \left( \sqrt{\frac{x^2+y^2}{z}} \right)^2} \frac{\partial}{\partial x} \left( \sqrt{\frac{x^2 + y^2}{z}} \right) \\ &= \frac{-1}{1 + \frac{x^2+y^2}{z}} \frac{x}{\sqrt{x^2+y^2}\sqrt{x^2+y^2+z^2}} = \frac{-xz}{(x^2+y^2+z^2)\sqrt{x^2+y^2}} \\ \therefore \frac{\partial \theta}{\partial x} &= \frac{-r \sin \theta \cos \phi \cdot \cos \theta \cdot r}{r^2 \sqrt{r^2 \sin^2 \theta \cos^2 \phi + r^2 \sin^2 \theta \sin^2 \phi}} = \frac{\sin \theta \cos \theta \cos \phi}{r \sin \theta} \\ \Rightarrow \quad \frac{\partial \theta}{\partial x} &= \frac{\cos \theta \cos \phi}{r} \end{aligned}$$
Similarly, we also have

$$ 
\begin{aligned}
\frac{\partial \phi}{\partial x} &= \frac{\partial}{\partial x} \left( \tan^{-1} \frac{y}{x} \right) = \frac{-1}{1 + \left(\frac{y}{x}\right)^2} \frac{y}{x^2} = \frac{-y}{x^2 + y^2} \\
&\Rightarrow \left[ \frac{\partial \phi}{\partial x} = \frac{-r \sin \theta \sin \phi}{r^2 \sin^2 \theta} = \frac{-\sin \phi}{r \sin \theta} \right]
\end{aligned}
$$

Working on the similar lines, we can get the following derivatives,

$$ \frac{\partial r}{\partial y} = \sin \theta \sin \phi; \quad \frac{\partial \theta}{\partial y} = \frac{\cos \theta \sin \phi}{r}; \quad \frac{\partial \phi}{\partial y} = \frac{\cos \phi}{r \sin \theta} $$

$$ \frac{\partial r}{\partial z} = \cos \theta; \quad \frac{\partial \theta}{\partial z} = \frac{-\sin \theta}{r}; \quad \frac{\partial \phi}{\partial z} = 0 $$

So, now we have all the required derivatives. Let us put these into the expressions before.

$$ 
\begin{aligned}
\frac{\partial}{\partial x} &= \frac{\partial r}{\partial x} \frac{\partial}{\partial r} + \frac{\partial \theta}{\partial x} \frac{\partial}{\partial \theta} + \frac{\partial \phi}{\partial x} \frac{\partial}{\partial \phi} \\
\Rightarrow \frac{\partial}{\partial x} &= \left(\frac{\partial}{\partial r}\right) (\sin \theta \cos \phi) + \left(\frac{\partial}{\partial \theta}\right) \left(\frac{\cos \theta \cos \phi}{r}\right) + \left(\frac{\partial}{\partial \phi}\right) \left(\frac{-\sin \phi}{r \sin \theta}\right) \\
&\Rightarrow \left[ \frac{\partial}{\partial x} = \sin \theta \cos \phi \frac{\partial}{\partial r} + \frac{\cos \theta \cos \phi}{r} \frac{\partial}{\partial \theta} - \frac{\sin \phi}{r \sin \theta} \frac{\partial}{\partial \phi} \right]
\end{aligned}
$$

Similarly, we can write

$$ 
\begin{aligned}
\frac{\partial}{\partial y} &= \frac{\partial r}{\partial y} \frac{\partial}{\partial r} + \frac{\partial \theta}{\partial y} \frac{\partial}{\partial \theta} + \frac{\partial \phi}{\partial y} \frac{\partial}{\partial \phi} \\
\Rightarrow \frac{\partial}{\partial y} &= \left(\frac{\partial}{\partial r}\right) (\sin \theta \sin \phi) + \left(\frac{\partial}{\partial \theta}\right) \left(\frac{\cos \theta \sin \phi}{r}\right) + \left(\frac{\partial}{\partial \phi}\right) \left(\frac{\cos \phi}{r \sin \theta}\right) \\
&\Rightarrow \left[ \frac{\partial}{\partial y} = \sin \theta \sin \phi \frac{\partial}{\partial r} + \frac{\cos \theta \sin \phi}{r} \frac{\partial}{\partial \theta} + \frac{\cos \phi}{r \sin \theta} \frac{\partial}{\partial \phi} \right]
\end{aligned}
$$

Similarly, we can write

$$ 
\begin{aligned}
\frac{\partial}{\partial z} &= \frac{\partial r}{\partial z} \frac{\partial}{\partial r} + \frac{\partial \theta}{\partial z} \frac{\partial}{\partial \theta} + \frac{\partial \phi}{\partial z} \frac{\partial}{\partial \phi} \\
&\Rightarrow \left[ \frac{\partial}{\partial z} = \cos \theta \frac{\partial}{\partial r} - \frac{\sin \theta}{r} \frac{\partial}{\partial \theta} \right]
\end{aligned}
$$

Now note that we want to convert the below-mentioned expression of gradient given in **Cartesian Coordinate System** to an expression of gradient in **Spherical Coordinate System**

$$ 
\begin{aligned}
\nabla \cdot \vec{v} &= \frac{\partial}{\partial x} (v_x) + \frac{\partial}{\partial y} (v_y) + \frac{\partial}{\partial z} (v_z) \\
\Rightarrow \nabla \cdot \vec{v} &= (\sin \theta \cos \phi \frac{\partial}{\partial r} + \frac{\cos \theta \cos \phi}{r} \frac{\partial}{\partial \theta} - \frac{\sin \phi}{r \sin \theta} \frac{\partial}{\partial \phi}) v_x + (\cos \theta \frac{\partial}{\partial r} - \frac{\sin \theta}{r} \frac{\partial}{\partial \theta}) v_y + (\cos \theta \frac{\partial}{\partial r} - \frac{\sin \theta}{r} \frac{\partial}{\partial \theta}) v_z
\end{aligned}
$$

Now note that to get the vector components from the **Cartesian Coordinate System** to the **Spherical Coordinate System**, we use the following transformation:

$$ \begin{bmatrix} v_x \\ v_y \\ v_z \end{bmatrix} = \begin{bmatrix} \sin \theta \cos \phi & \cos \theta \cos \phi & -\sin \phi \\ \sin \theta \sin \phi & \cos \theta \sin \phi & \cos \phi \\ \cos \theta & -\sin \theta & 0 \end{bmatrix} \begin{bmatrix} v_r \\ v_{\theta} \\ v_{\phi} \end{bmatrix} $$
Hence we have,

$$v_x = (\sin \theta \cos \phi) v_r + (\cos \theta \cos \phi) v_{\theta} - (\sin \phi) v_{\phi}$$

$$v_y = (\sin \theta \sin \phi) v_r + (\cos \theta \sin \phi) v_{\theta} + (\cos \phi) v_{\phi}$$

$$v_z = (\cos \theta) v_r - (\sin \theta) v_{\theta}$$

So, finally to get divergence in spherical coordinates, let us put all the terms together.

$$\nabla \cdot \vec{v} = \frac{\partial}{\partial x} (v_x) + \frac{\partial}{\partial y} (v_y) + \frac{\partial}{\partial z} (v_z)$$

Using the above 4 equations, we can therefore write

$$\begin{aligned} \nabla \cdot \vec{v} = & \left( \sin \theta \cos \phi \frac{\partial}{\partial r} + \frac{\cos \theta \cos \phi}{r} \frac{\partial}{\partial \theta} - \frac{\sin \phi}{r \sin \theta} \frac{\partial}{\partial \phi} \right) \left( (\sin \theta \cos \phi) v_r + (\cos \theta \cos \phi) v_{\theta} - (\sin \phi) v_{\phi} \right) \\ & + \left( \sin \theta \sin \phi \frac{\partial}{\partial r} + \frac{\cos \theta \sin \phi}{r} \frac{\partial}{\partial \theta} + \frac{\cos \phi}{r \sin \theta} \frac{\partial}{\partial \phi} \right) \left( (\sin \theta \sin \phi) v_r + (\cos \theta \sin \phi) v_{\theta} + (\cos \phi) v_{\phi} \right) \\ & + \left( \cos \theta \frac{\partial}{\partial r} - \frac{\sin \theta}{r} \frac{\partial}{\partial \theta} \right) \left( (\cos \theta) v_r - (\sin \theta) v_{\theta} \right) \end{aligned}$$

Now it's a mechanical work. Just take the proper derivatives, club the terms and simplify. Note that in the following steps, we will use the product rule several times. Let's compute the Derivatives and collect the terms:

$$\begin{aligned} \nabla \cdot \vec{v} = & \sin \theta \cos \phi \left[ \sin \theta \cos \phi \frac{\partial v_r}{\partial r} + \cos \theta \cos \phi \frac{\partial v_{\theta}}{\partial r} - \sin \phi \frac{\partial v_{\phi}}{\partial r} \right] \\ & + \frac{\cos \theta \cos \phi}{r} \left[ \cos \theta \cos \phi \left( v_r \cos \theta + \sin \theta \frac{\partial v_{\theta}}{\partial \theta} \right) + \cos (-v_{\phi} \sin \theta) - \sin \phi \frac{\partial v_{\phi}}{\partial \theta} \right] \\ & - \frac{\sin \phi}{r \sin \theta} \left[ \sin \theta \cos \theta \left( -v_r \sin \theta \frac{\partial v_{\theta}}{\partial \theta} \right) + \cos (-v_{\phi} \cos \theta) - \sin \phi \frac{\partial v_{\phi}}{\partial \phi} + v_{\phi} \cos \phi \right] \\ & + \sin \theta \sin \phi \left[ \sin \theta \sin \phi \frac{\partial v_r}{\partial r} + \cos \theta \sin \phi \frac{\partial v_{\theta}}{\partial r} + \cos \phi \frac{\partial v_{\phi}}{\partial r} \right] \\ & + \frac{\cos \theta \sin \phi}{r} \left[ \sin \phi \left( v_r \cos \theta + \sin \theta \frac{\partial v_{\theta}}{\partial \theta} \right) + \cos (-v_{\phi} \sin \theta) - \sin \phi \frac{\partial v_{\phi}}{\partial \theta} \right] \\ & + \frac{\cos \phi}{r \sin \theta} \left[ \cos \theta \cos \phi \left( v_r \cos \theta + \sin \theta \frac{\partial v_{\theta}}{\partial \phi} \right) + \cos (-v_{\phi} \cos \theta) - \sin \phi \frac{\partial v_{\phi}}{\partial \phi} \right] \\ & - \frac{\sin \phi}{r} \left[ \left( -v_r \sin \theta + v_{\theta} \cos \theta + \frac{\partial v_{\theta}}{\partial r} \right) \right] \end{aligned}$$

Let us try to simplify by taking similar terms together and use the basic identity, $\sin^2 \theta + \cos^2 \theta = 1$ or $\sin^2 \phi + \cos^2 \phi = 1$.

Note that the terms with derivatives $\frac{\partial v_{\phi}}{\partial r}$, $\frac{\partial v_{\theta}}{\partial \theta}$, $\frac{\partial v_{\phi}}{\partial \phi}$, and $\frac{\partial v_{\theta}}{\partial \theta}$ are going to vanish. Therefore we can write

$$\nabla \cdot \vec{v} = \sin^2 \theta \cos^2 \phi \frac{\partial v_r}{\partial r} + \sin^2 \theta \sin^2 \phi \frac{\partial v_r}{\partial r} + \cos^2 \theta \frac{\partial v_r}{\partial r}$$
$$ 
\begin{aligned}
& + \frac{\cos^2 \theta \cos^2 \phi}{r} v_r + \frac{\sin^2 \phi}{r} v_r + \frac{\cos^2 \theta \sin^2 \phi}{r} v_r + \frac{\cos^2 \theta}{r} v_r + \frac{\sin^2 \theta}{r} v_r \\
& + \frac{\cos^2 \theta \cos^2 \phi}{r} \frac{\partial v_\theta}{\partial \theta} + \frac{\cos^2 \theta \sin^2 \phi}{r} \frac{\partial v_\theta}{\partial \theta} + \frac{\sin^2 \theta}{r} \frac{\partial v_\theta}{\partial \theta} - \frac{\cos \theta \cos^2 \phi}{r} \sin \theta v_\theta + \frac{\sin^2 \phi}{r} \cos \theta v_\theta - \cos \theta \sin^2 \phi \sin \theta v_\theta \\
& + \frac{\cos^2 \phi}{r \sin \theta} \cos \theta v_\theta + \frac{\sin \theta}{r} \cos \theta v_\theta + \frac{\sin^2 \phi}{r \sin \theta} \frac{\partial v_\theta}{\partial \theta} + \frac{\cos^2 \phi}{r \sin \theta} \frac{\partial v_\theta}{\partial \phi}
\end{aligned}
$$

Again simplifying the terms and utilizing, $\sin^2 \theta + \cos^2 \theta = 1$ or $\sin^2 \phi + \cos^2 \phi = 1$; we can get as follows.

$$ \nabla \cdot \vec{v} = \frac{\partial v_r}{\partial r} + \frac{2v_r}{r} + \frac{1}{r} \frac{\partial v_\theta}{\partial \theta} + \frac{\cos \theta}{r \sin \theta} v_\theta + \frac{1}{r \sin \theta} \frac{\partial v_\phi}{\partial \phi} $$

But, to have simplicity in the expression, we can rewrite the above expression as follows.

$$ \nabla \cdot \vec{v} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 v_r) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (v_\theta \sin \theta) + \frac{1}{r \sin \theta} \frac{\partial v_\phi}{\partial \phi} $$

This is the expression for divergence in Spherical coordinates.

# 6 Laplacian $\Delta f$ in Cylindrical Coordinates

Note that the Laplacian $\Delta f$ of a scalar field $f$ can be written in terms of gradient and divergence as

$$ \Delta f = \nabla \cdot (\nabla f) $$

A vector field $\mathbf{v}$ can be written in Cylindrical Coordinates as

$$ \vec{v} = v_\rho \mathbf{e}_\rho + v_\phi \mathbf{e}_\phi + v_z \mathbf{e}_z $$

We earlier derived that in cylindrical coordinates the gradient of a scalar field $f$ can be written as

$$ \nabla f = \vec{e}_\rho \frac{\partial f}{\partial \rho} + \vec{e}_\phi \frac{1}{\rho} \frac{\partial f}{\partial \phi} + \vec{e}_z \frac{\partial f}{\partial z} $$

We earlier derived that in cylindrical coordinates the divergence of a vector field $\vec{v}$ can be written as

$$ \operatorname{div} \cdot \vec{v} = \frac{\partial v_{\rho}}{\partial \rho} + \frac{v_{\rho}}{\rho} + \frac{1}{\rho} \frac{\partial v_{\phi}}{\partial \phi} + \frac{\partial v_{z}}{\partial z} $$

Therefore the Laplacian of a scalar field $f$ can be written in terms of gradient and divergence in Cylindrical Coordinates shall be

$$ 
\begin{aligned}
\Delta f = \nabla \cdot (\nabla f) = \nabla \cdot (\vec{e}_{\rho} \frac{\partial f}{\partial \rho} + \vec{e}_{\phi} \frac{1}{\rho} \frac{\partial f}{\partial \phi} + \vec{e}_{z} \frac{\partial f}{\partial z}) = & \frac{\partial}{\partial \rho} (\frac{\partial f}{\partial \rho}) + \frac{1}{\rho} (\frac{\partial f}{\partial \rho}) + \frac{1}{\rho} \frac{\partial}{\partial \phi} (\frac{1}{\rho} \frac{\partial f}{\partial \phi}) + \frac{\partial}{\partial z} (\frac{\partial f}{\partial z}) \\
\Rightarrow \Delta f = & \frac{\partial^2 f}{\partial \rho^2} + \frac{1}{\rho} \frac{\partial f}{\partial \rho} + \frac{1}{\rho^2} \frac{\partial^2 f}{\partial \phi^2} + \frac{\partial^2 f}{\partial z^2}
\end{aligned}
$$
# 7 Laplacian $\Delta f$ in Spherical Coordinates

Note that the Laplacian $\Delta f$ of a scalar field $f$ can be written in terms of gradient and divergence as

$$ \Delta f = \nabla \cdot (\nabla f) $$

A vector field $\mathbf{v}$ can be written in Spherical Coordinates as

$$ \vec{\mathbf{v}} = v_r \mathbf{e}_r + v_\theta \mathbf{e}_\theta + v_\phi \mathbf{e}_\phi $$

We earlier derived that in Spherical coordinates the gradient of a scalar field $f$ can be written as

$$ \nabla f = \vec{\mathbf{e}}_r \frac{\partial f}{\partial r} + \vec{\mathbf{e}}_\theta \frac{1}{r} \frac{\partial f}{\partial \theta} + \vec{\mathbf{e}}_\phi \frac{1}{r \sin \theta} \frac{\partial f}{\partial \phi} $$

We earlier derived that in Spherical coordinates the divergence of a vector field $\vec{\mathbf{v}}$ can be written as

$$ \nabla \cdot \vec{\mathbf{v}} = \operatorname{div} \cdot \vec{\mathbf{v}} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 v_r) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (v_\theta \sin \theta) + \frac{1}{r \sin \theta} \frac{\partial v_\phi}{\partial \phi} $$

Therefore the Laplacian of a scalar field $f$ can be written in terms of gradient and divergence in Spherical Coordinates shall be

$$ \begin{aligned} \Delta f = \nabla \cdot (\nabla f) &= \nabla \cdot (\vec{\mathbf{e}}_r \frac{\partial f}{\partial r} + \vec{\mathbf{e}}_\theta \frac{1}{r} \frac{\partial f}{\partial \theta} + \vec{\mathbf{e}}_\phi \frac{1}{r \sin \theta} \frac{\partial f}{\partial \phi}) \\ &= \frac{1}{r^2} \frac{\partial}{\partial r} \left( r^2 \frac{\partial f}{\partial r} \right) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} \left( \frac{1}{r} \frac{\partial f}{\partial \theta} \sin \theta \right) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \phi} \left( \frac{1}{r \sin \theta} \frac{\partial f}{\partial \phi} \right) \\ &\Rightarrow \Delta 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( \frac{\partial f}{\partial \theta} \sin \theta \right) + \frac{1}{r^2 \sin^2 \theta} \frac{\partial}{\partial \phi} \left( \frac{\partial f}{\partial \phi} \right) \end{aligned} $$

# 8 Curl of a Tensor Field

The curl of an order-$n > 1$ tensor field $\mathbf{T}(x)$ is also defined using the recursive relation:

$$ (\nabla \times \mathbf{T}) \cdot \mathbf{c} = \nabla \cdot (\nabla \times \mathbf{c} \cdot \mathbf{T}) $$

$$ (\nabla \times \mathbf{v}) \cdot \mathbf{c} = \nabla \cdot (\mathbf{v} \times \mathbf{c}) $$

where $\mathbf{c}$ is an arbitrary constant vector and $\mathbf{v}$ is a vector field.

## 8.1 Curl of a First-Order Tensor (Vector) Field

Consider a vector field $\mathbf{v}$ and an arbitrary constant vector $\mathbf{c}$. In index notation, the cross product is given by

$$ \mathbf{v} \times \mathbf{c} = \epsilon_{ijk} v_j c_k \mathbf{e}_i $$

where $\epsilon_{ijk}$ is the permutation symbol, otherwise known as the Levi-Civita symbol. Then,

$$ \nabla \cdot (\mathbf{v} \times \mathbf{c}) = \epsilon_{ijk} v_{j,i} c_k = (\epsilon_{ijk} v_{j,i} \mathbf{e}_k) \cdot \mathbf{c} = (\nabla \times \mathbf{v}) \cdot \mathbf{c} $$

Therefore,

$$ \nabla \times \mathbf{v} = \epsilon_{ijk} v_{j,i} \mathbf{e}_k $$
## 8.2 Curl of a Second-Order Tensor Field

For a second-order tensor S,

$$ \mathbf{c} \cdot \mathbf{S} = c_m S_{mj} \mathbf{e}_j $$

Hence, using the definition of the curl of a first-order tensor field,

$$ \nabla \times (\mathbf{c} \cdot \mathbf{S}) = \epsilon_{ijk} c_m S_{mj,i} \mathbf{e}_k = (\epsilon_{ijk} S_{mj,i} \mathbf{e}_k \otimes \mathbf{e}_m) \cdot \mathbf{c} = (\nabla \times \mathbf{S}) \cdot \mathbf{c} $$

Therefore, we have

$$ \nabla \times \mathbf{S} = \epsilon_{ijk} S_{mj,i} \mathbf{e}_k \otimes \mathbf{e}_m $$

## 8.3 Identities Involving the Curl of a Tensor Field

The most commonly used identity involving the curl of a tensor field, T, is

$$ \nabla \times (\nabla \times \mathbf{T}) = 0 $$

This identity holds for tensor fields of all orders. For the important case of a second-order tensor, S, this identity implies that

$$ \nabla \times (\nabla \times \mathbf{S}) = 0 $$

# 9 Curl $\nabla \times \vec{v}$ in Cylindrical Coordinates

A vector field $\mathbf{v}$ can be written in Cylindrical Coordinates as

$$ \vec{v} = v_{\rho} \mathbf{e}_{\rho} + v_{\phi} \mathbf{e}_{\phi} + v_z \mathbf{e}_z $$

We have earlier derived that the cylindrical Del operator is

$$ \nabla = \mathbf{e}_{\rho} \frac{\partial}{\partial \rho} + \mathbf{e}_{\phi} \frac{1}{\rho} \frac{\partial}{\partial \phi} + \mathbf{e}_{z} \frac{\partial}{\partial z} $$

Let us take the cross product:

$$ \nabla \times \vec{v} = \left( \vec{e}_{\rho} \frac{\partial}{\partial \rho} + \vec{e}_{\phi} \frac{1}{\rho} \frac{\partial}{\partial \phi} + \vec{e}_{z} \frac{\partial}{\partial z} \right) \times \left( v_{\rho} \vec{e}_{\rho} + v_{\phi} \vec{e}_{\phi} + v_z \vec{e}_{z} \right) $$

$$ \Rightarrow \nabla \times \vec{v} = \vec{e}_{\rho} \times \frac{\partial}{\partial \rho} (v_{\rho} \vec{e}_{\rho} + v_{\phi} \vec{e}_{\phi} + v_z \vec{e}_{z}) + \frac{1}{\rho} \vec{e}_{\phi} \times \frac{\partial}{\partial \phi} (v_{\rho} \vec{e}_{\rho} + v_{\phi} \vec{e}_{\phi} + v_z \vec{e}_{z}) + \vec{e}_{z} \times \frac{\partial}{\partial z} (v_{\rho} \vec{e}_{\rho} + v_{\phi} \vec{e}_{\phi} + v_z \vec{e}_{z}) $$

$$ \Rightarrow \nabla \times \vec{v} = \vec{e}_{\rho} \times \left( v_{\rho} \frac{\partial \vec{e}_{\rho}}{\partial \rho} + \vec{e}_{\rho} \frac{\partial v_{\rho}}{\partial \rho} + v_{\phi} \frac{\partial \vec{e}_{\phi}}{\partial \rho} + \vec{e}_{\phi} \frac{\partial v_{\phi}}{\partial \rho} + v_z \frac{\partial \vec{e}_{z}}{\partial \rho} + \vec{e}_{z} \frac{\partial v_z}{\partial \rho} \right) $$

$$ + \frac{1}{\rho} \vec{e}_{\phi} \times \left( v_{\rho} \frac{\partial \vec{e}_{\rho}}{\partial \phi} + \vec{e}_{\rho} \frac{\partial v_{\rho}}{\partial \phi} + v_{\phi} \frac{\partial \vec{e}_{\phi}}{\partial \phi} + \vec{e}_{\phi} \frac{\partial v_{\phi}}{\partial \phi} + v_z \frac{\partial \vec{e}_{z}}{\partial \phi} + \vec{e}_{z} \frac{\partial v_z}{\partial \phi} \right) $$

$$ + \vec{e}_{z} \times \left( v_{\rho} \frac{\partial \vec{e}_{\rho}}{\partial z} + \vec{e}_{\rho} \frac{\partial v_{\rho}}{\partial z} + v_{\phi} \frac{\partial \vec{e}_{\phi}}{\partial z} + \vec{e}_{\phi} \frac{\partial v_{\phi}}{\partial z} + v_z \frac{\partial \vec{e}_{z}}{\partial z} + \vec{e}_{z} \frac{\partial v_z}{\partial z} \right) $$

Note that the derivatives of the unit vectors of cylindrical coordinates are

$$ \frac{\partial}{\partial \rho} (\vec{e}_{\rho}) = 0; \quad \frac{\partial}{\partial \rho} (\vec{e}_{\phi}) = 0; \quad \frac{\partial}{\partial \rho} (\vec{e}_{z}) = 0 $$
$$ \frac{\partial}{\partial \phi} (\vec{e}_{\rho}) = \vec{e}_{\phi}; \quad \frac{\partial}{\partial \phi} (\vec{e}_{\phi}) = -\vec{e}_{\rho}; \quad \frac{\partial}{\partial \phi} (\vec{e}_{z}) = 0 $$

$$ \frac{\partial}{\partial z} (\vec{e}_{\rho}) = 0; \quad \frac{\partial}{\partial z} (\vec{e}_{\phi}) = 0; \quad \frac{\partial}{\partial z} (\vec{e}_{z}) = 0 $$

So putting all these derivatives in the step above, and taking the required cross product, we have,

$$ \nabla \times \vec{v} = \frac{\partial v_{\phi}}{\partial \rho} \vec{e}_{z} - \frac{\partial v_{z}}{\partial \rho} \vec{e}_{\phi} - \frac{1}{\rho} \frac{\partial v_{\rho}}{\partial \phi} \vec{e}_{z} + \frac{v_{\phi}}{\rho} \vec{e}_{z} + \frac{1}{\rho} \frac{\partial v_{z}}{\partial \phi} \vec{e}_{\rho} + \frac{\partial v_{\rho}}{\partial z} \vec{e}_{\phi} - \frac{\partial v_{\phi}}{\partial z} \vec{e}_{\rho} $$

Collecting together the similar terms, we get

$$ \nabla \times \vec{v} = \left( \frac{1}{\rho} \frac{\partial v_z}{\partial \phi} - \frac{\partial v_{\phi}}{\partial z} \right) \vec{e}_{\rho} + \left( \frac{\partial v_{\rho}}{\partial z} - \frac{\partial v_z}{\partial \rho} \right) \vec{e}_{\phi} + \left( \frac{v_{\phi}}{\rho} + \frac{\partial v_{\phi}}{\partial \rho} - \frac{1}{\rho} \frac{\partial v_{\rho}}{\partial \phi} \right) \vec{e}_{z} $$

This can be adjusted and rewritten as like following,

$$ \nabla \times \vec{v} = \frac{1}{\rho} \left[ \left( \frac{\partial v_z}{\partial \phi} - \frac{\partial (\rho v_{\phi})}{\partial z} \right) \vec{e}_{\rho} - \left( \frac{\partial v_z}{\partial \rho} - \frac{\partial v_{\rho}}{\partial z} \right) \rho \vec{e}_{\phi} + \left( \frac{\partial (\rho v_{\phi})}{\partial \rho} - \frac{\partial v_{\rho}}{\partial \phi} \right) \vec{e}_{z} \right] $$

The above expression can be easily written in matrix determinant form as:

$$ \nabla \times \vec{v} = \frac{1}{\rho} \begin{vmatrix} \vec{e}_{\rho} & \rho \vec{e}_{\phi} & \vec{e}_{z} \\ \frac{\partial}{\partial \rho} & \frac{\partial}{\partial \phi} & \frac{\partial}{\partial z} \\ v_{\rho} & \rho v_{\phi} & v_{z} \end{vmatrix} $$

This is the standard expression for the curl of a vector field $\vec{v} = v_{\rho}\vec{e}_{\rho} + v_{\phi}\vec{e}_{\phi} + v_{z}\vec{e}_{z}$ in **Cylindrical coordinates**.

## 10 Curl $\nabla \times \vec{v}$ in Spherical Coordinates

A vector field $\mathbf{v}$ can be written in Spherical Coordinates as

$$ \vec{v} = v_r \mathbf{e}_r + v_{\theta} \mathbf{e}_{\theta} + v_{\phi} \mathbf{e}_{\phi} $$

We have earlier derived that the Spherical Del operator is

$$ \nabla = \mathbf{e}_r \frac{\partial}{\partial r} + \frac{\mathbf{e}_{\theta}}{r} \frac{\partial}{\partial \theta} + \frac{\mathbf{e}_{\phi}}{r \sin \theta} \frac{\partial}{\partial \phi} $$

Let us take the cross product:

$$ \nabla \times \vec{v} = (\mathbf{e}_r \frac{\partial}{\partial r} + \frac{\mathbf{e}_{\theta}}{r} \frac{\partial}{\partial \theta} + \frac{\mathbf{e}_{\phi}}{r \sin \theta} \frac{\partial}{\partial \phi}) \times (v_r \mathbf{e}_r + v_{\theta} \mathbf{e}_{\theta} + v_{\phi} \mathbf{e}_{\phi}) $$

$$ \begin{align*} \nabla \times \vec{v} &= \mathbf{e}_r \times \frac{\partial}{\partial r} (v_r \mathbf{e}_r + v_{\theta} \mathbf{e}_{\theta} + v_{\phi} \mathbf{e}_{\phi}) + \frac{\mathbf{e}_{\theta}}{r} \times \frac{\partial}{\partial \theta} (v_r \mathbf{e}_r + v_{\theta} \mathbf{e}_{\theta} + v_{\phi} \mathbf{e}_{\phi}) + \frac{\mathbf{e}_{\phi}}{r \sin \theta} \times \frac{\partial}{\partial \phi} (v_r \mathbf{e}_r + v_{\theta} \mathbf{e}_{\theta} + v_{\phi} \mathbf{e}_{\phi}) \\ \Rightarrow \nabla \times \vec{v} &= \vec{e}_r \times \left( v_r \frac{\partial \vec{e}_r}{\partial r} + \vec{e}_r \frac{\partial v_r}{\partial r} + v_{\theta} \frac{\partial \vec{e}_{\theta}}{\partial r} + \vec{e}_{\theta} \frac{\partial v_{\theta}}{\partial r} + v_{\phi} \frac{\partial \vec{e}_{\phi}}{\partial r} + \vec{e}_{\phi} \frac{\partial v_{\phi}}{\partial r} \right) \end{align*} $$
$$ + \frac{\vec{\mathbf{e}}_{\theta}}{r} \times \left( v_r \frac{\partial \vec{\mathbf{e}}_r}{\partial \theta} + \vec{\mathbf{e}}_r \frac{\partial v_r}{\partial \theta} + v_{\theta} \frac{\partial \vec{\mathbf{e}}_{\theta}}{\partial \theta} + \vec{\mathbf{e}}_{\theta} \frac{\partial v_{\theta}}{\partial \theta} + v_{\phi} \frac{\partial \vec{\mathbf{e}}_{\phi}}{\partial \theta} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \theta} \right) \\ + \frac{\vec{\mathbf{e}}_{\phi}}{r \sin \theta} \times \left( v_r \frac{\partial \vec{\mathbf{e}}_r}{\partial \phi} + \vec{\mathbf{e}}_r \frac{\partial v_r}{\partial \phi} + v_{\theta} \frac{\partial \vec{\mathbf{e}}_{\theta}}{\partial \phi} + \vec{\mathbf{e}}_{\theta} \frac{\partial v_{\theta}}{\partial \phi} + v_{\phi} \frac{\partial \vec{\mathbf{e}}_{\phi}}{\partial \phi} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \phi} \right) $$

Note that the derivatives of the unit vectors of spherical coordinates are

$$ \frac{\partial \vec{\mathbf{e}}_r}{\partial r} = 0, \quad \frac{\partial \vec{\mathbf{e}}_r}{\partial \theta} = \vec{\mathbf{e}}_{\theta}, \quad \frac{\partial \vec{\mathbf{e}}_r}{\partial \phi} = \sin \theta \vec{\mathbf{e}}_{\phi} $$

$$ \frac{\partial \vec{\mathbf{e}}_{\theta}}{\partial r} = 0, \quad \frac{\partial \vec{\mathbf{e}}_{\theta}}{\partial \theta} = -\vec{\mathbf{e}}_{r}, \quad \frac{\partial \vec{\mathbf{e}}_{\theta}}{\partial \phi} = \cos \theta \vec{\mathbf{e}}_{\phi} $$

$$ \frac{\partial \vec{\mathbf{e}}_{\phi}}{\partial r} = 0, \quad \frac{\partial \vec{\mathbf{e}}_{\phi}}{\partial \theta} = 0, \quad \frac{\partial \vec{\mathbf{e}}_{\phi}}{\partial \phi} = -\sin \theta \vec{\mathbf{e}}_{r} - \cos \theta \vec{\mathbf{e}}_{\theta} $$

Let's substitute these into the equation of $\nabla \cdot \vec{v}$ mentioned above.

The **First Term (Radial Derivatives)** shall be

$$ \vec{\mathbf{e}}_r \times \left( v_r \cdot 0 + \vec{\mathbf{e}}_r \frac{\partial v_r}{\partial r} + v_{\theta} \cdot 0 + \vec{\mathbf{e}}_{\theta} \frac{\partial v_{\theta}}{\partial r} + v_{\phi} \cdot 0 + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial r} \right) \\ \Rightarrow \vec{\mathbf{e}}_r \times \left( \vec{\mathbf{e}}_r \frac{\partial v_r}{\partial r} + \vec{\mathbf{e}}_{\theta} \frac{\partial v_{\theta}}{\partial r} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial r} \right) \\ \Rightarrow \boxed{\vec{\mathbf{e}}_{\phi} \frac{\partial v_{\theta}}{\partial r} - \vec{\mathbf{e}}_{\theta} \frac{\partial v_{\phi}}{\partial r}} $$

The **Second Term (Polar Derivatives)** shall be

$$ \frac{\vec{\mathbf{e}}_{\theta}}{r} \times \left( v_r \vec{\mathbf{e}}_{\theta} + \vec{\mathbf{e}}_r \frac{\partial v_r}{\partial \theta} - v_{\theta} \vec{\mathbf{e}}_r + \vec{\mathbf{e}}_{\theta} \frac{\partial v_{\theta}}{\partial \theta} + v_{\phi} \cos \theta \vec{\mathbf{e}}_{\phi} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \theta} \right) \\ \Rightarrow \frac{\vec{\mathbf{e}}_{\theta}}{r} \times \left( \vec{\mathbf{e}}_{\theta} \frac{\partial v_{\theta}}{\partial \theta} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \theta} + (v_r - v_{\theta}) \vec{\mathbf{e}}_r + v_{\phi} \cos \theta \vec{\mathbf{e}}_{\phi} \right) \\ \Rightarrow \boxed{\frac{1}{r} \left( \vec{\mathbf{e}}_r \frac{\partial v_{\phi}}{\partial \theta} - \vec{\mathbf{e}}_{\phi} (v_r - v_{\theta}) + \vec{\mathbf{e}}_r v_{\phi} \cos \theta \right)} $$

The **Third Term (Azimuthal Derivatives)** shall be

$$ \frac{\vec{\mathbf{e}}_{\phi}}{r \sin \theta} \times \left( \sin \theta \vec{\mathbf{e}}_{\phi} \cdot v_r + \vec{\mathbf{e}}_r \frac{\partial v_r}{\partial \phi} + 0 + \vec{\mathbf{e}}_{\theta} \frac{\partial v_{\theta}}{\partial \phi} - (\sin \theta \vec{\mathbf{e}}_r + \cos \theta \vec{\mathbf{e}}_{\theta}) v_{\phi} + \vec{\mathbf{e}}_{\phi} \frac{\partial v_{\phi}}{\partial \phi} \right) \\ \Rightarrow \frac{1}{r \sin \theta} \left( \vec{\mathbf{e}}_{\theta} \frac{\partial v_r}{\partial \phi} - \vec{\mathbf{e}}_r \frac{\partial v_{\theta}}{\partial \phi} - v_{\phi}(\sin \theta \vec{\mathbf{e}}_{\theta} - \cos \theta \vec{\mathbf{e}}_r) \right) \\ \Rightarrow \boxed{\frac{1}{r \sin \theta} \left( \vec{\mathbf{e}}_{\theta} \left( \frac{\partial v_r}{\partial \phi} + v_{\phi} \sin \theta \right) - \vec{\mathbf{e}}_r \left( \frac{\partial v_{\theta}}{\partial \phi} + v_{\phi} \cos \theta \right) \right)} $$
Let's combine all terms and simplify further. The final expression for $\nabla \times \vec{v}$ is:

$$ \nabla \times \vec{v} = \left( \vec{e}_{\phi} \frac{\partial v_{\theta}}{\partial r} - \vec{e}_{\theta} \frac{\partial v_{\phi}}{\partial r} \right) + \frac{1}{r} \left( \vec{e}_{r} \frac{\partial v_{\phi}}{\partial \theta} - \vec{e}_{\phi} (v_{r} - v_{\theta}) + \vec{e}_{r} v_{\phi} \cos \theta \right) + \frac{1}{r \sin \theta} \left( \vec{e}_{\theta} \left( \frac{\partial v_{r}}{\partial \phi} + v_{\phi} \sin \theta \right) - \vec{e}_{r} \left( \frac{\partial v_{\theta}}{\partial \phi} + v_{\phi} \cos \theta \right) \right) $$

Finally, let's collect the terms for each unit vector:

$$ \begin{aligned} \nabla \times \vec{v} = \vec{e}_r & \left( \frac{1}{r} \frac{\partial v_\phi}{\partial \theta} + \frac{v_\phi \cos \theta}{r} - \frac{1}{r \sin \theta} \left( \frac{\partial v_\theta}{\partial \phi} + v_\phi \cos \theta \right) \right) \\ & + \vec{e}_\theta \left( -\frac{\partial v_\phi}{\partial r} + \frac{1}{r \sin \theta} \left( \frac{\partial v_r}{\partial \phi} + v_\phi \sin \theta \right) \right) \\ & + \vec{e}_\phi \left( \frac{\partial v_\theta}{\partial r} - \frac{v_r - v_\theta}{r} \right) \end{aligned} $$

$$ \Rightarrow \nabla \times \vec{v} = \frac{1}{r \sin \theta} \left( \frac{\partial}{\partial \theta} (v_{\phi} \sin \theta) - \frac{\partial v_{\theta}}{\partial \phi} \right) \vec{e}_r + \left( \frac{1}{r \sin \theta} \frac{\partial v_r}{\partial \phi} - \frac{1}{r} \frac{\partial (rv_{\phi})}{\partial r} \right) \vec{e}_{\theta} + \frac{1}{r} \left( \frac{\partial (rv_{\theta})}{\partial r} - \frac{\partial v_r}{\partial \theta} \right) \vec{e}_{\phi} $$

This is the standard expression for the curl of a vector field $\vec{v} = v_r \vec{e}_r + v_\theta \vec{e}_\theta + v_\phi \vec{e}_\phi$ in Spherical coordinates.

# 11 Gradient of a Tensor field

## 11.1 Cartesian coordinates

If $\mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_3$ are the basis vectors in a Cartesian coordinate system, with coordinates of points denoted by $(x_1, x_2, x_3)$, then the gradient of the tensor field $\mathbf{T}$ is given by

$$ \nabla \mathbf{T} = \frac{\partial \mathbf{T}}{\partial x_i} \otimes \mathbf{e}_i $$

The vectors $\mathbf{x}$ and $\mathbf{c}$ can be written as $\mathbf{x} = x_i \mathbf{e}_i$ and $\mathbf{c} = c_i \mathbf{e}_i$. Let $\mathbf{y} := \mathbf{x} + \alpha \mathbf{c}$. In that case the gradient is given by

$$ \begin{aligned} \nabla \mathbf{T} \cdot \mathbf{c} &= \left. \frac{d}{d\alpha} \mathbf{T}(x_1 + \alpha c_1, x_2 + \alpha c_2, x_3 + \alpha c_3) \right|_{\alpha=0} \\ \Rightarrow \nabla \mathbf{T} \cdot \mathbf{c} &\equiv \left. \frac{d}{d\alpha} \mathbf{T}(y_1, y_2, y_3) \right|_{\alpha=0} = \left[ \frac{\partial \mathbf{T}}{\partial y_1} \frac{\partial y_1}{\partial \alpha} + \frac{\partial \mathbf{T}}{\partial y_2} \frac{\partial y_2}{\partial \alpha} + \frac{\partial \mathbf{T}}{\partial y_3} \frac{\partial y_3}{\partial \alpha} \right]_{\alpha=0} \\ \Rightarrow \nabla \mathbf{T} \cdot \mathbf{c} &= \frac{\partial \mathbf{T}}{\partial x_1} c_1 + \frac{\partial \mathbf{T}}{\partial x_2} c_2 + \frac{\partial \mathbf{T}}{\partial x_3} c_3 = \frac{\partial \mathbf{T}}{\partial x_i} c_i = \left[ \frac{\partial \mathbf{T}}{\partial x_i} \otimes \mathbf{e}_i \right] \cdot \mathbf{c} \end{aligned} $$

Since the basis vectors do not vary in a Cartesian coordinate system, we have the following relations for the gradients of a scalar field $\phi$, a vector field $\mathbf{v}$, and a second-order tensor field $\mathbf{S}$:

$$ \nabla \phi = \frac{\partial \phi}{\partial x_i} \mathbf{e}_i = \phi_{,i} \mathbf{e}_i $$

$$ \nabla \mathbf{v} = \frac{\partial(v_j \mathbf{e}_j)}{\partial x_i} \otimes \mathbf{e}_i = \frac{\partial v_j}{\partial x_i} \mathbf{e}_j \otimes \mathbf{e}_i = v_{j,i} \mathbf{e}_j \otimes \mathbf{e}_i $$

$$ \nabla \mathbf{S} = \frac{\partial(S_{jk} \mathbf{e}_j \otimes \mathbf{e}_k)}{\partial x_i} \otimes \mathbf{e}_i = \frac{\partial S_{jk}}{\partial x_i} \mathbf{e}_j \otimes \mathbf{e}_k \otimes \mathbf{e}_i = S_{jk,i} \mathbf{e}_j \otimes \mathbf{e}_k \otimes \mathbf{e}_i $$
## 11.2 Curvilinear coordinates

If $g^1, g^2, g^3$ are the contravariant basis vectors in a curvilinear coordinate system, with coordinates of points denoted by $(\xi^1, \xi^2, \xi^3)$, then the gradient of the tensor field $T$ is given by

$$ \nabla T = \frac{\partial T}{\partial \xi^i} \otimes g^i $$

From this definition we have the following relations for the gradients of a scalar field $\phi$, a vector field $v$, and a second-order tensor field $S$:

$$ \nabla \phi = \frac{\partial \phi}{\partial \xi^i} g^i $$

$$ \nabla v = \frac{\partial(v^j g_j)}{\partial \xi^i} \otimes g^i = \left( \frac{\partial v^j}{\partial \xi^i} + v^k \Gamma^k_{ik} \right) g_j \otimes g^i = \left( \frac{\partial v_j}{\partial \xi^i} - v_k \Gamma^k_{ij} \right) g^j \otimes g^i $$

$$ \nabla S = \frac{\partial(S_{jk} g^j \otimes g^k)}{\partial \xi^i} \otimes g^i = \left( \frac{\partial S_{jk}}{\partial \xi^i} - S_{lk} \Gamma^l_{ij} - S_{jl} \Gamma^l_{ik} \right) g^j \otimes g^k \otimes g^i $$

where the Christoffel symbol $\Gamma^k_{ij}$ is defined using

$$ \Gamma^k_{ij} g_k = \frac{\partial g_i}{\partial \xi^j} \quad \Rightarrow \quad \Gamma^k_{ij} = g^k \cdot \frac{\partial g_i}{\partial \xi^j} $$

# 12 Vector Gradient $\nabla \vec{v}$ in Cylindrical Coordinates

Cylindrical coordinates $(r, \phi, z)$ are defined by:

* $r$: Radial distance from the z-axis.

* $\phi$: Azimuthal angle (angle in the $xy$-plane measured from the positive $x$-axis).

* $z$: Height along the z-axis, which corresponds to the Cartesian $z$-coordinate.

The relationship between cylindrical coordinates $(r, \phi, z)$ and Cartesian coordinates $(x, y, z)$ is given by:

$$ x = r \cos \phi, \quad y = r \sin \phi, \quad z = z $$

with inverse relations:

$$ r = \sqrt{x^2 + y^2}, \quad \phi = \tan^{-1}\left(\frac{y}{x}\right), \quad z = z $$

In cylindrical coordinates, the basis vectors are position-dependent. At any point in space, the unit vectors are:

* $\vec{e}_r$: Unit vector in the radial direction (perpendicular to the z-axis).

* $\vec{e}_\phi$: Unit vector in the azimuthal direction (tangential to the circular path around the z-axis).

* $\vec{e}_z$: Unit vector in the z-direction (parallel to the z-axis).

These vectors are mutually orthogonal, and they can be written in terms of Cartesian unit vectors $\hat{i}, \hat{j}, \hat{k}$ as:

$$ \vec{e}_r = \begin{pmatrix} \cos \phi \\ \sin \phi \\ 0 \end{pmatrix}, \quad \vec{e}_\phi = \begin{pmatrix} -\sin \phi \\ \cos \phi \\ 0 \end{pmatrix}, \quad \vec{e}_z = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} $$

Since $\vec{e}_r$ and $\vec{e}_\phi$ depend on $\phi$, their derivatives with respect to $\phi$ will be non-zero, which is crucial for our derivation.
## General Form of the Gradient of a Vector

For a vector field $\vec{V} = V_r \vec{e}_r + V_\phi \vec{e}_\phi + V_z \vec{e}_z$, the gradient tensor $\nabla \vec{V}$ is obtained by applying the gradient operator to each component of the vector field and considering the derivatives of the basis vectors. In curvilinear coordinates, the gradient of a vector field is generally written as:

$$ \nabla \vec{V} = \frac{\partial V^i}{\partial x^j} \vec{e}_i \otimes \vec{e}_j + V^i \nabla \vec{e}_i $$

where the first term represents the derivatives of the components of the vector field, and the second term involves the gradients of the basis vectors.

## Derivatives of the Basis Vectors

Since the basis vectors $\vec{e}_r$, $\vec{e}_\phi$, and $\vec{e}_z$ depend on $\phi$, their derivatives must be carefully considered. Let's compute them:

### Derivative of $\vec{e}_r$:

$$ \frac{\partial \vec{e}_r}{\partial r} = 0, \quad \frac{\partial \vec{e}_r}{\partial \phi} = \vec{e}_\phi, \quad \frac{\partial \vec{e}_r}{\partial z} = 0 $$

### Derivative of $\vec{e}_\phi$:

$$ \frac{\partial \vec{e}_\phi}{\partial r} = 0, \quad \frac{\partial \vec{e}_\phi}{\partial \phi} = -\vec{e}_r, \quad \frac{\partial \vec{e}_\phi}{\partial z} = 0 $$

### Derivative of $\vec{e}_z$:

$$ \frac{\partial \vec{e}_z}{\partial r} = 0, \quad \frac{\partial \vec{e}_z}{\partial \phi} = 0, \quad \frac{\partial \vec{e}_z}{\partial z} = 0 $$

These derivatives are crucial when calculating the second term $V^i \nabla \vec{e}_i$ in the gradient formula.

## Computing the Gradient Tensor

Now, we will compute the gradient of the vector field $\vec{V}$ in cylindrical coordinates by considering each directional derivative:

### Radial Derivative $\frac{\partial \vec{V}}{\partial r}$:

$$ \frac{\partial \vec{V}}{\partial r} = \frac{\partial V_r}{\partial r} \vec{e}_r + \frac{\partial V_\phi}{\partial r} \vec{e}_\phi + \frac{\partial V_z}{\partial r} \vec{e}_z $$

There is no derivative of the basis vectors with respect to $r$, as they do not depend on $r$.

### Azimuthal Derivative $\frac{\partial \vec{V}}{\partial \phi}$:

$$ \frac{\partial \vec{V}}{\partial \phi} = \frac{\partial V_r}{\partial \phi} \vec{e}_r + V_r \frac{\partial \vec{e}_r}{\partial \phi} + \frac{\partial V_\phi}{\partial \phi} \vec{e}_\phi + V_\phi \frac{\partial \vec{e}_\phi}{\partial \phi} + \frac{\partial V_z}{\partial \phi} \vec{e}_z $$

Substituting the derivatives of the basis vectors:

$$ \frac{\partial \vec{V}}{\partial \phi} = \frac{\partial V_r}{\partial \phi} \vec{e}_r + V_r \vec{e}_\phi + \frac{\partial V_\phi}{\partial \phi} \vec{e}_\phi - V_\phi \vec{e}_r + \frac{\partial V_z}{\partial \phi} \vec{e}_z $$
Combining like terms:

$$ \frac{\partial \vec{V}}{\partial \phi} = \left( \frac{\partial V_r}{\partial \phi} - V_\phi \right) \vec{e}_r + \left( \frac{\partial V_\phi}{\partial \phi} + V_r \right) \vec{e}_\phi + \frac{\partial V_z}{\partial \phi} \vec{e}_z $$

Vertical Derivative $\frac{\partial \vec{V}}{\partial z}$:

$$ \frac{\partial \vec{V}}{\partial z} = \frac{\partial V_r}{\partial z} \vec{e}_r + \frac{\partial V_\phi}{\partial z} \vec{e}_\phi + \frac{\partial V_z}{\partial z} \vec{e}_z $$

Again, there is no derivative of the basis vectors with respect to $z$, as they are independent of $z$.

## Including Metric Factors

Cylindrical coordinates have geometric scaling factors. Distances in the $r$-direction are straightforward, but in the $\phi$-direction, the physical length corresponding to a change in $\phi$ is $rd\phi$. This scaling factor must be included in the calculation of derivatives with respect to $\phi$. Therefore, the terms involving derivatives with respect to $\phi$ must be divided by $r$.

## Gradient of Tensor $\vec{V}$ in Cylindrical Coordinates

Thus, the full gradient tensor $\nabla \vec{V}$ in cylindrical coordinates is:

$$ \nabla \vec{V} = \begin{pmatrix} \frac{\partial V_r}{\partial r} & \frac{1}{r} \left( \frac{\partial V_r}{\partial \phi} - V_\phi \right) & \frac{\partial V_r}{\partial z} \\ \frac{\partial V_\phi}{\partial r} & \frac{1}{r} \left( \frac{\partial V_\phi}{\partial \phi} + V_r \right) & \frac{\partial V_\phi}{\partial z} \\ \frac{\partial V_z}{\partial r} & \frac{1}{r} \frac{\partial V_z}{\partial \phi} & \frac{\partial V_z}{\partial z} \end{pmatrix} $$

# 13 Vector Gradient $\nabla \vec{V}$ in Spherical Coordinates

Let the position in spherical coordinates be represented as $(r, \theta, \phi)$, where:

* $r$: Radial distance.

* $\theta$: Polar (or colatitudinal) angle (angle from the z-axis).

* $\phi$: Azimuthal angle (angle in the xy-plane from the x-axis).

The basis vectors $\vec{e}_r$, $\vec{e}_\theta$, and $\vec{e}_\phi$ in spherical coordinates are not constant but vary with position. These vectors are mutually orthogonal, and the unit vectors are:

$$ \vec{e}_r = \begin{pmatrix} \sin \theta \cos \phi \\ \sin \theta \sin \phi \\ \cos \theta \end{pmatrix}, \quad \vec{e}_\theta = \begin{pmatrix} \cos \theta \cos \phi \\ \cos \theta \sin \phi \\ -\sin \theta \end{pmatrix}, \quad \vec{e}_\phi = \begin{pmatrix} -\sin \phi \\ \cos \phi \\ 0 \end{pmatrix} $$

A general vector field $\vec{V}$ in spherical coordinates is expressed as:

$$ \vec{V} = V_r(r, \theta, \phi) \vec{e}_r + V_\theta(r, \theta, \phi) \vec{e}_\theta + V_\phi(r, \theta, \phi) \vec{e}_\phi $$

The goal is to find the gradient $\nabla \vec{V}$, which is a tensor (often called the del operator applied to a vector field). To derive this rigorously, we need to compute the derivative of each component of the vector field in the $r$, $\theta$, and $\phi$ directions while considering the variation of the unit vectors.
## General Form of the Gradient of a Vector

In general, for a vector field $\vec{V} = V^i \vec{e}_i$, the gradient in curvilinear coordinates is expressed as:

$$ \nabla \vec{V} = \frac{\partial V^i}{\partial x^j} \vec{e}_i \otimes \vec{e}_j + V^i \nabla \vec{e}_i $$

Where $V^i$ are the components of the vector field, $\vec{e}_i$ are the unit vectors, and $\nabla \vec{e}_i$ are the gradients of the basis vectors. The term $\otimes$ indicates a tensor product, resulting in a tensor. For spherical coordinates, we will first derive the derivative of the unit vectors $\vec{e}_r$, $\vec{e}_\theta$, and $\vec{e}_\phi$ with respect to $r$, $\theta$, and $\phi$.

## Derivatives of the Unit Vectors

The unit vectors $\vec{e}_r$, $\vec{e}_\theta$, and $\vec{e}_\phi$ vary with position. To compute the gradient of a vector field, we need their partial derivatives.

### Derivative of $\vec{e}_r$:

$$ \frac{\partial \vec{e}_r}{\partial r} = 0, \quad \frac{\partial \vec{e}_r}{\partial \theta} = \vec{e}_\theta, \quad \frac{\partial \vec{e}_r}{\partial \phi} = \sin \theta \vec{e}_\phi $$

### Derivative of $\vec{e}_\theta$:

$$ \frac{\partial \vec{e}_\theta}{\partial r} = 0, \quad \frac{\partial \vec{e}_\theta}{\partial \theta} = -\vec{e}_r, \quad \frac{\partial \vec{e}_\theta}{\partial \phi} = \cos \theta \vec{e}_\phi $$

### Derivative of $\vec{e}_\phi$:

$$ \frac{\partial \vec{e}_\phi}{\partial r} = 0, \quad \frac{\partial \vec{e}_\phi}{\partial \theta} = 0, \quad \frac{\partial \vec{e}_\phi}{\partial \phi} = -\sin \theta \vec{e}_r - \cos \theta \vec{e}_\theta $$

These derivatives are essential for computing the gradient of a vector field in spherical coordinates.

## Gradient of the Vector Field $\vec{V}$

The gradient of $\vec{V}$ involves taking the derivative of each component in the $r$, $\theta$, and $\phi$ directions, accounting for the variation of both the components $V_r$, $V_\theta$, $V_\phi$ and the basis vectors $\vec{e}_r$, $\vec{e}_\theta$, and $\vec{e}_\phi$. Let's compute each term.

### Radial Derivative $\frac{\partial \vec{V}}{\partial r}$:

$$ \frac{\partial \vec{V}}{\partial r} = \frac{\partial V_r}{\partial r} \vec{e}_r + \frac{\partial V_\theta}{\partial r} \vec{e}_\theta + \frac{\partial V_\phi}{\partial r} \vec{e}_\phi $$

There is no derivative of the basis vectors with respect to $r$, as they are independent of $r$.

### Polar Derivative $\frac{\partial \vec{V}}{\partial \theta}$:

$$ \frac{\partial \vec{V}}{\partial \theta} = \frac{\partial V_r}{\partial \theta} \vec{e}_r + V_r \frac{\partial \vec{e}_r}{\partial \theta} + \frac{\partial V_\theta}{\partial \theta} \vec{e}_\theta + V_\theta \frac{\partial \vec{e}_\theta}{\partial \theta} + \frac{\partial V_\phi}{\partial \theta} \vec{e}_\phi $$

Substituting the derivatives of the basis vectors:

$$ \frac{\partial \vec{V}}{\partial \theta} = \frac{\partial V_r}{\partial \theta} \vec{e}_r + V_r \vec{e}_\theta + \frac{\partial V_\theta}{\partial \theta} \vec{e}_\theta - V_\theta \vec{e}_r + \frac{\partial V_\phi}{\partial \theta} \vec{e}_\phi $$
Combining like terms:

$$ \frac{\partial \vec{V}}{\partial \theta} = \left( \frac{\partial V_r}{\partial \theta} - V_\theta \right) \vec{e}_r + \left( \frac{\partial V_\theta}{\partial \theta} + V_r \right) \vec{e}_\theta + \frac{\partial V_\phi}{\partial \theta} \vec{e}_\phi $$

Azimuthal Derivative $\frac{\partial \vec{V}}{\partial \phi}$:

$$ \frac{\partial \vec{V}}{\partial \phi} = \frac{\partial V_r}{\partial \phi} \vec{e}_r + V_r \frac{\partial \vec{e}_r}{\partial \phi} + \frac{\partial V_\theta}{\partial \phi} \vec{e}_\theta + V_\theta \frac{\partial \vec{e}_\theta}{\partial \phi} + \frac{\partial V_\phi}{\partial \phi} \vec{e}_\phi + V_\phi \frac{\partial \vec{e}_\phi}{\partial \phi} $$

Using the derivatives of the unit vectors:

$$ \frac{\partial \vec{V}}{\partial \phi} = \frac{\partial V_r}{\partial \phi} \vec{e}_r + V_r \sin \theta \vec{e}_\phi + \frac{\partial V_\theta}{\partial \phi} \vec{e}_\theta + V_\theta \cos \theta \vec{e}_\phi + \frac{\partial V_\phi}{\partial \phi} \vec{e}_\phi - V_\phi \sin \theta \vec{e}_r - V_\phi \cos \theta \vec{e}_\theta $$

Combining terms:

$$ \frac{\partial \vec{V}}{\partial \phi} = \left( \frac{\partial V_r}{\partial \phi} - V_\phi \sin \theta \right) \vec{e}_r + \left( \frac{\partial V_\theta}{\partial \phi} - V_\phi \cos \theta \right) \vec{e}_\theta + \left( \frac{\partial V_\phi}{\partial \phi} + V_r \sin \theta + V_\theta \cos \theta \right) \vec{e}_\phi $$

## Gradient of Tensor $\vec{V}$ in Spherical Coordinates

The gradient tensor $\nabla \vec{V}$ in spherical coordinates is then given by:

$$ \nabla \vec{V} = \begin{pmatrix} \frac{\partial V_r}{\partial r} & \frac{1}{r} \left( \frac{\partial V_r}{\partial \theta} - V_\theta \right) & \frac{1}{r \sin \theta} \left( \frac{\partial V_r}{\partial \phi} - V_\phi \sin \theta \right) \\ \frac{\partial V_\theta}{\partial r} & \frac{1}{r} \left( \frac{\partial V_\theta}{\partial \theta} + V_r \right) & \frac{1}{r \sin \theta} \left( \frac{\partial V_\theta}{\partial \phi} - V_\phi \cos \theta \right) \\ \frac{\partial V_\phi}{\partial r} & \frac{1}{r} \left( \frac{\partial V_\phi}{\partial \theta} + V_\theta \cos \theta \right) & \frac{1}{r \sin \theta} \left( \frac{\partial V_\phi}{\partial \phi} + V_r \sin \theta + V_\theta \cos \theta \right) \end{pmatrix} $$

# 14 Divergence $\nabla \cdot T$ of a Second-Order Tensor in Cylindrical Coordinates

To derive the divergence of a second-order tensor in cylindrical coordinates, we begin by recalling that the divergence of a second-order tensor field $T$ in Cartesian coordinates is expressed as:

$$ (\nabla \cdot T)_i = \frac{\partial T_{ij}}{\partial x_j} $$

In cylindrical coordinates, we have a new set of basis vectors corresponding to the radial direction $\vec{e}_r$, the azimuthal direction $\vec{e}_\theta$, and the axial direction $\vec{e}_z$, and the divergence operator becomes more complicated due to the non-orthogonal coordinate system. The coordinates $(r, \theta, z)$ are related to the Cartesian coordinates $(x, y, z)$ by:

$$ x = r \cos \theta, \quad y = r \sin \theta, \quad z = z. $$
## Step 1: Coordinate Setup in Cylindrical Coordinates

The metric tensor in cylindrical coordinates is diagonal, and the components are:

$$g_{rr} = 1, \quad g_{\theta\theta} = r^2, \quad g_{zz} = 1.$$

The volume element associated with the metric is:

$$\sqrt{\det(g_{ij})} = r$$

## Step 2: General Form of the Divergence in Cylindrical Coordinates

In cylindrical coordinates, the divergence of a second-order tensor is given by:

$$(\nabla \cdot \mathbf{T})_i = \frac{1}{\sqrt{\det(g_{ij})}} \frac{\partial}{\partial x^j} \left( \sqrt{\det(g_{ij})} T_{ij} \right).$$

In cylindrical coordinates, this becomes:

$$(\nabla \cdot \mathbf{T})_i = \frac{1}{r} \frac{\partial}{\partial x^j} (r T_{ij})$$

where the summation is over $j = r, \theta, z$. The divergence of the second-order tensor $\mathbf{T}$ in cylindrical coordinates has three components: radial ($r$), azimuthal ($\theta$), and axial ($z$). We will expand each component explicitly, rigorously applying the necessary derivatives.

### Radial Component $(\nabla \cdot \mathbf{T})_r$

The radial component is given by:

$$(\nabla \cdot \mathbf{T})_r = \frac{1}{r} \frac{\partial}{\partial r} (r T_{rr}) + \frac{1}{r} \frac{\partial T_{\theta r}}{\partial \theta} + \frac{\partial T_{zr}}{\partial z} - \frac{T_{\theta\theta}}{r}$$

### First Term

$$\frac{1}{r} \frac{\partial}{\partial r} (r T_{rr})$$

Using the product rule:

$$\frac{\partial}{\partial r} (r T_{rr}) = T_{rr} + r \frac{\partial T_{rr}}{\partial r}$$

so:

$$\frac{1}{r} \frac{\partial}{\partial r} (r T_{rr}) = \frac{T_{rr}}{r} + \frac{\partial T_{rr}}{\partial r}$$

### Second Term

$$\frac{1}{r} \frac{\partial T_{\theta r}}{\partial \theta}.$$

This is a straightforward derivative of the $\theta r$-component with respect to $\theta$, scaled by $1/r$.
### Third Term

$$ \frac{\partial T_{zr}}{\partial z}. $$

This is a straightforward partial derivative with respect to z.

### Fourth Term

$$ -\frac{T_{\theta\theta}}{r}. $$

This term accounts for the divergence in the azimuthal direction, involving the $\theta\theta$-component, scaled by $1/r$.

### Final Expression for Radial Component

Thus, the radial component becomes:

$$ (\nabla \cdot \mathbf{T})_r = \frac{T_{rr}}{r} + \frac{\partial T_{rr}}{\partial r} + \frac{1}{r} \frac{\partial T_{\theta r}}{\partial \theta} + \frac{\partial T_{zr}}{\partial z} - \frac{T_{\theta\theta}}{r} $$

### Azimuthal Component $(\nabla \cdot \mathbf{T})_\theta$

The azimuthal component is:

$$ (\nabla \cdot \mathbf{T})_\theta = \frac{1}{r} \frac{\partial}{\partial r} (r T_{r\theta}) + \frac{1}{r} \frac{\partial T_{\theta\theta}}{\partial \theta} + \frac{\partial T_{z\theta}}{\partial z} + \frac{T_{r\theta}}{r} $$

### First Term

$$ \frac{1}{r} \frac{\partial}{\partial r} (r T_{r\theta}). $$

Using the product rule:

$$ \frac{\partial}{\partial r} (r T_{r\theta}) = T_{r\theta} + r \frac{\partial T_{r\theta}}{\partial r}, $$

so:

$$ \frac{1}{r} \frac{\partial}{\partial r} (r T_{r\theta}) = \frac{T_{r\theta}}{r} + \frac{\partial T_{r\theta}}{\partial r} $$

### Second Term

$$ \frac{1}{r} \frac{\partial T_{\theta\theta}}{\partial \theta}. $$

This is the partial derivative of $T_{\theta\theta}$ with respect to $\theta$, scaled by $1/r$.

### Third Term

$$ \frac{\partial T_{z\theta}}{\partial z}. $$

This is the straightforward partial derivative of the $z\theta$-component with respect to $z$.
## Fourth Term

$$ \frac{T_{r\theta}}{r} $$

This term accounts for the contribution of the radial direction to the divergence in the azimuthal direction.

## Final Expression for Azimuthal Component

Thus, the azimuthal component becomes:

$$ (\nabla \cdot \mathbf{T})_{\theta} = \frac{T_{r\theta}}{r} + \frac{\partial T_{r\theta}}{\partial r} + \frac{1}{r} \frac{\partial T_{\theta\theta}}{\partial \theta} + \frac{\partial T_{z\theta}}{\partial z} + \frac{T_{r\theta}}{r} $$

## Axial Component $(\nabla \cdot \mathbf{T})_z$

The axial component is:

$$ (\nabla \cdot \mathbf{T})_z = \frac{1}{r} \frac{\partial}{\partial r} (r T_{rz}) + \frac{1}{r} \frac{\partial T_{\theta z}}{\partial \theta} + \frac{\partial T_{zz}}{\partial z} $$

## First Term

$$ \frac{1}{r} \frac{\partial}{\partial r} (r T_{rz}) $$

Using the product rule:

$$ \frac{\partial}{\partial r} (r T_{rz}) = T_{rz} + r \frac{\partial T_{rz}}{\partial r}, $$

so:

$$ \frac{1}{r} \frac{\partial}{\partial r} (r T_{rz}) = \frac{T_{rz}}{r} + \frac{\partial T_{rz}}{\partial r} $$

## Second Term

$$ \frac{1}{r} \frac{\partial T_{\theta z}}{\partial \theta} $$

This is the partial derivative of $T_{\theta z}$ with respect to $\theta$, scaled by $1/r$.

## Third Term

$$ \frac{\partial T_{zz}}{\partial z} $$

This is the straightforward partial derivative of the $zz$-component with respect to $z$.

## Final Expression for Axial Component

Thus, the axial component becomes:

$$ (\nabla \cdot \mathbf{T})_z = \frac{T_{rz}}{r} + \frac{\partial T_{rz}}{\partial r} + \frac{1}{r} \frac{\partial T_{\theta z}}{\partial \theta} + \frac{\partial T_{zz}}{\partial z} $$
## Final Complete Answer

The derivation of the second-order tensor divergence in cylindrical coordinates results in the following expressions for the three components:

### 1. Radial Component

$$ (\nabla \cdot \mathbf{T})_r = \frac{T_{rr}}{r} + \frac{\partial T_{rr}}{\partial r} + \frac{1}{r} \frac{\partial T_{\theta r}}{\partial \theta} + \frac{\partial T_{zr}}{\partial z} - \frac{T_{\theta \theta}}{r} $$

### 2. Azimuthal Component

$$ (\nabla \cdot \mathbf{T})_{\theta} = \frac{T_{r\theta}}{r} + \frac{\partial T_{r\theta}}{\partial r} + \frac{1}{r} \frac{\partial T_{\theta\theta}}{\partial \theta} + \frac{\partial T_{z\theta}}{\partial z} + \frac{T_{r\theta}}{r} $$

### 3. Axial Component

$$ (\nabla \cdot \mathbf{T})_z = \frac{T_{rz}}{r} + \frac{\partial T_{rz}}{\partial r} + \frac{1}{r} \frac{\partial T_{\theta z}}{\partial \theta} + \frac{\partial T_{zz}}{\partial z} $$

These three components together form the complete tensor divergence in cylindrical coordinates.

## 15 Divergence $\nabla \cdot \mathbf{T}$ of a Second-Order Tensor in Spherical Coordinates

To derive the divergence of a second-order tensor in spherical coordinates, we begin with the general expression for the divergence of a second-order tensor field $\mathbf{T}$. In Cartesian coordinates, the divergence of a second-order tensor is given by:

$$ (\nabla \cdot \mathbf{T})_i = \frac{\partial T_{ij}}{\partial x_j} $$

However, in spherical coordinates $(r, \theta, \phi)$, where we have the orthonormal basis vectors $\vec{e}_r$, $\vec{e}_\theta$, and $\vec{e}_\phi$, the tensor components must be expressed in terms of the spherical coordinate system, and the divergence operator takes a more complex form due to the non-Cartesian nature of the coordinates.

### Step 1: Coordinate Setup in Spherical Coordinates

In spherical coordinates, the metric tensor $g_{ij}$ is diagonal, with the following non-zero components:

$$ g_{rr} = 1, \quad g_{\theta\theta} = r^2, \quad g_{\phi\phi} = r^2 \sin^2 \theta. $$

Thus, the volume element (related to the determinant of the metric tensor) is:

$$ \sqrt{\det(g_{ij})} = r^2 \sin \theta. $$

### Step 2: General Form of Divergence in Spherical Coordinates

The divergence of a second-order tensor $\mathbf{T}$ in spherical coordinates is expressed as:

$$ (\nabla \cdot \mathbf{T})_i = \frac{1}{\sqrt{\det(g_{ij})}} \frac{\partial}{\partial x^j} \left( \sqrt{\det(g_{ij})} T_{ij} \right) $$
In spherical coordinates, for each direction $i = r, \theta, \phi$, we expand this expression using the appropriate scale factors and differentials in $r, \theta$, and $\phi$. The divergence of the second-order tensor $\mathbf{T}$ has three components corresponding to the radial ($r$), polar ($\theta$), and azimuthal ($\phi$) directions. Let's derive each component explicitly, performing the necessary derivatives.

## Radial Component $(\nabla \cdot \mathbf{T})_r$

The radial component is:

$$ (\nabla \cdot \mathbf{T})_r = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{rr}) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta r}) + \frac{1}{r \sin \theta} \frac{\partial T_{\phi r}}{\partial \phi} $$

### First Term

$$ \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{rr}). $$

Apply the product rule:

$$ \frac{\partial}{\partial r} (r^2 T_{rr}) = 2r T_{rr} + r^2 \frac{\partial T_{rr}}{\partial r}, $$

so:

$$ \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{rr}) = \frac{2T_{rr}}{r} + \frac{\partial T_{rr}}{\partial r} $$

### Second Term

$$ \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta r}) $$

Again, apply the product rule:

$$ \frac{\partial}{\partial \theta} (\sin \theta T_{\theta r}) = \cos \theta T_{\theta r} + \sin \theta \frac{\partial T_{\theta r}}{\partial \theta} $$

so:

$$ \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta r}) = \frac{1}{r \sin \theta} \left( \cos \theta T_{\theta r} + \sin \theta \frac{\partial T_{\theta r}}{\partial \theta} \right) = \frac{\cos \theta}{r \sin \theta} T_{\theta r} + \frac{1}{r} \frac{\partial T_{\theta r}}{\partial \theta} $$

### Third Term

$$ \frac{1}{r \sin \theta} \frac{\partial T_{\phi r}}{\partial \phi}. $$

This is a straightforward partial derivative.

## Final Expression for Radial Component

Thus, the radial component becomes:

$$ (\nabla \cdot \mathbf{T})_r = \frac{2T_{rr}}{r} + \frac{\partial T_{rr}}{\partial r} + \frac{\cos \theta}{r \sin \theta} T_{\theta r} + \frac{1}{r} \frac{\partial T_{\theta r}}{\partial \theta} + \frac{1}{r \sin \theta} \frac{\partial T_{\phi r}}{\partial \phi} $$
## Polar Component $(\nabla \cdot \mathbf{T})_{\theta}$

The polar component is:

$$ (\nabla \cdot \mathbf{T})_{\theta} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{r\theta}) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta\theta}) + \frac{1}{r \sin \theta} \frac{\partial T_{\phi\theta}}{\partial \phi} - \frac{T_{\phi\phi} \cot \theta}{r^2} $$

### First Term

$$ \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{r\theta}) . $$

Using the product rule:

$$ \frac{\partial}{\partial r} (r^2 T_{r\theta}) = 2r T_{r\theta} + r^2 \frac{\partial T_{r\theta}}{\partial r}, $$

so:

$$ \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{r\theta}) = \frac{2T_{r\theta}}{r} + \frac{\partial T_{r\theta}}{\partial r} $$

### Second Term

$$ \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta\theta}) $$

Using the product rule:

$$ \frac{\partial}{\partial \theta} (\sin \theta T_{\theta\theta}) = \cos \theta T_{\theta\theta} + \sin \theta \frac{\partial T_{\theta\theta}}{\partial \theta} $$

so:

$$ \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta\theta}) = \frac{1}{r \sin \theta} \left( \cos \theta T_{\theta\theta} + \sin \theta \frac{\partial T_{\theta\theta}}{\partial \theta} \right) = \frac{\cos \theta}{r \sin \theta} T_{\theta\theta} + \frac{1}{r} \frac{\partial T_{\theta\theta}}{\partial \theta} $$

### Third Term

$$ \frac{1}{r \sin \theta} \frac{\partial T_{\phi\theta}}{\partial \phi} . $$

This is a straightforward partial derivative.

### Fourth Term

$$ -\frac{T_{\phi\phi} \cot \theta}{r^2} . $$

This term arises due to the cot θ factor in the spherical coordinates, and it's already simplified.

## Final Expression for Polar Component

Thus, the polar component becomes:

$$ (\nabla \cdot \mathbf{T})_{\theta} = \frac{2T_{r\theta}}{r} + \frac{\partial T_{r\theta}}{\partial r} + \frac{\cos \theta}{r \sin \theta} T_{\theta\theta} + \frac{1}{r} \frac{\partial T_{\theta\theta}}{\partial \theta} + \frac{1}{r \sin \theta} \frac{\partial T_{\phi\theta}}{\partial \phi} - \frac{T_{\phi\phi} \cot \theta}{r^2} $$
Azimuthal Component $(\nabla \cdot \mathbf{T})_{\phi}$

The azimuthal component is:

$$ (\nabla \cdot \mathbf{T})_{\phi} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{r\phi}) + \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta\phi}) + \frac{1}{r \sin \theta} \frac{\partial T_{\phi\phi}}{\partial \phi} + \frac{T_{\theta\phi} \cot \theta}{r^2} $$

First Term

$$ \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{r\phi}) . $$

Using the product rule:

$$ \frac{\partial}{\partial r} (r^2 T_{r\phi}) = 2r T_{r\phi} + r^2 \frac{\partial T_{r\phi}}{\partial r}, $$

so:

$$ \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 T_{r\phi}) = \frac{2T_{r\phi}}{r} + \frac{\partial T_{r\phi}}{\partial r} $$

Second Term

$$ \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta\phi}) $$

Using the product rule:

$$ \frac{\partial}{\partial \theta} (\sin \theta T_{\theta\phi}) = \cos \theta T_{\theta\phi} + \sin \theta \frac{\partial T_{\theta\phi}}{\partial \theta} $$

so:

$$ \frac{1}{r \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta T_{\theta\phi}) = \frac{1}{r \sin \theta} \left( \cos \theta T_{\theta\phi} + \sin \theta \frac{\partial T_{\theta\phi}}{\partial \theta} \right) = \frac{\cos \theta}{r \sin \theta} T_{\theta\phi} + \frac{1}{r} \frac{\partial T_{\theta\phi}}{\partial \theta} $$

Third Term

$$ \frac{1}{r \sin \theta} \frac{\partial T_{\phi\phi}}{\partial \phi} . $$

This is a straightforward partial derivative.

Fourth Term

$$ \frac{T_{\theta\phi} \cot \theta}{r^2} . $$

This is already simplified.

Final Expression for Azimuthal Component

Thus, the azimuthal component becomes:

$$ (\nabla \cdot \mathbf{T})_{\phi} = \frac{2T_{r\phi}}{r} + \frac{\partial T_{r\phi}}{\partial r} + \frac{\cos \theta}{r \sin \theta} T_{\theta\phi} + \frac{1}{r} \frac{\partial T_{\theta\phi}}{\partial \theta} + \frac{1}{r \sin \theta} \frac{\partial T_{\phi\phi}}{\partial \phi} + \frac{T_{\theta\phi} \cot \theta}{r^2} $$
## Final Complete Answer

Therefore the second-order tensor divergence in spherical coordinates results in the following expressions for the three components:

### 1. Radial Component

$$ (\nabla \cdot \mathbf{T})_r = \frac{2T_{rr}}{r} + \frac{\partial T_{rr}}{\partial r} + \frac{\cos \theta}{r \sin \theta} T_{\theta r} + \frac{1}{r} \frac{\partial T_{\theta r}}{\partial \theta} + \frac{1}{r \sin \theta} \frac{\partial T_{\phi r}}{\partial \phi} $$

### 2. Polar Component

$$ (\nabla \cdot \mathbf{T})_{\theta} = \frac{2T_{r\theta}}{r} + \frac{\partial T_{r\theta}}{\partial r} + \frac{\cos \theta}{r \sin \theta} T_{\theta\theta} + \frac{1}{r} \frac{\partial T_{\theta\theta}}{\partial \theta} + \frac{1}{r \sin \theta} \frac{\partial T_{\phi\theta}}{\partial \phi} - \frac{T_{\phi\phi} \cot \theta}{r^2} $$

### 3. Azimuthal Component

$$ (\nabla \cdot \mathbf{T})_{\phi} = \frac{2T_{r\phi}}{r} + \frac{\partial T_{r\phi}}{\partial r} + \frac{\cos \theta}{r \sin \theta} T_{\theta\phi} + \frac{1}{r} \frac{\partial T_{\theta\phi}}{\partial \theta} + \frac{1}{r \sin \theta} \frac{\partial T_{\phi\phi}}{\partial \phi} + \frac{T_{\theta\phi} \cot \theta}{r^2} $$

These three components together form the complete tensor divergence in spherical coordinates.

## 16 Directional Derivative (A · ∇) ⃗v in Curvilinear Coordinates

The Directional Derivative defined for a **vector field A** by $(\mathbf{A} \cdot \nabla)$, where $\nabla$ is the **gradient operator**. The Directional Derivative operator applied in arbitrary orthogonal three-dimensional coordinates to a **vector field v** becomes:

$$ [ (\mathbf{A} \cdot \nabla) \vec{v} ]_j = \sum_{k=1}^{3} \left[ \frac{A_k}{h_k} \frac{\partial v_j}{\partial q_k} + \frac{v_k}{h_k h_j} \left( A_j \frac{\partial h_j}{\partial q_k} - A_k \frac{\partial h_j}{\partial q_k} \right) \right] $$

where the $h_i$'s are related to the **metric tensors** by $h_i = \sqrt{g_{ii}}$.

### Directional Derivative in Cartesian Coordinates:

In rectangular coordinates, $g_{11} = g_{22} = g_{33} = 1$, therefore the Directional Derivative defined for a **vector field v** in Rectangular Coordinates shall be

$$ (\mathbf{A} \cdot \nabla) \vec{v} = \left( A_x \frac{\partial v_x}{\partial x} + A_y \frac{\partial v_x}{\partial y} + A_z \frac{\partial v_x}{\partial z} \right) \hat{x} + \left( A_x \frac{\partial v_y}{\partial x} + A_y \frac{\partial v_y}{\partial y} + A_z \frac{\partial v_y}{\partial z} \right) \hat{y} + \left( A_x \frac{\partial v_z}{\partial x} + A_y \frac{\partial v_z}{\partial y} + A_z \frac{\partial v_z}{\partial z} \right) \hat{z} $$

### Directional Derivative in Cylindrical Coordinates:

In cylindrical coordinates $(r, \theta, z)$, $g_{11} = 1$, $g_{22} = r^2$, $g_{33} = 1$, therefore the Directional Derivative defined for a **vector field v** in Cylindrical Coordinates shall be

$$ \begin{aligned} (\mathbf{A} \cdot \nabla) \vec{v} = & \left( A_r \frac{\partial v_r}{\partial r} + \frac{A_\phi}{r} \frac{\partial v_r}{\partial \phi} + A_z \frac{\partial v_r}{\partial z} - \frac{A_\phi v_\phi}{r} \right) \hat{r} \\ & + \left( A_r \frac{\partial v_\phi}{\partial r} + \frac{A_\phi}{r} \frac{\partial v_\phi}{\partial \phi} + A_z \frac{\partial v_\phi}{\partial z} + \frac{A_\phi v_r}{r} \right) \hat{\phi} \\ & + \left( A_r \frac{\partial v_z}{\partial r} + \frac{A_\phi}{r} \frac{\partial v_z}{\partial \phi} + A_z \frac{\partial v_z}{\partial z} \right) \hat{z} \end{aligned} $$
Directional Derivative in Spherical Coordinates

In spherical coordinates $(r, \theta, \phi)$, $g_{11} = 1$, $g_{22} = r^2$, $g_{33} = r^2 \sin^2 \theta$, therefore the Directional Derivative defined for a **vector field** $\vec{v}$ in Spherical Coordinates shall be

$$ (\mathbf{A} \cdot \nabla)\vec{v} = \left( A_r \frac{\partial v_r}{\partial r} + \frac{A_\theta}{r} \frac{\partial v_r}{\partial \theta} + \frac{A_\phi}{r \sin \theta} \frac{\partial v_r}{\partial \phi} - \frac{A_\theta v_\theta + A_\phi v_\phi}{r} \right) \hat{r} \\ + \left( A_r \frac{\partial v_\theta}{\partial r} + \frac{A_\theta}{r} \frac{\partial v_\theta}{\partial \theta} + \frac{A_\phi}{r \sin \theta} \frac{\partial v_\theta}{\partial \phi} + \frac{A_\theta v_r}{r} - \frac{A_\phi v_\phi \cot \theta}{r} \right) \hat{\theta} \\ + \left( A_r \frac{\partial v_\phi}{\partial r} + \frac{A_\theta}{r} \frac{\partial v_\phi}{\partial \theta} + \frac{A_\phi}{r \sin \theta} \frac{\partial v_\phi}{\partial \phi} + \frac{A_\phi v_r}{r} + \frac{A_\phi v_\theta \cot \theta}{r} \right) \hat{\phi} $$

17 Vector Laplacian $\Delta \vec{v}$ in Curvilinear Coordinates

Consider the general curvilinear coordinates $(u^1, u^2, u^3)$. We shall limit ourselves to orthogonal coordinate systems in Euclidean 3-space, each system being characterized by the metric coefficients $g_{11}$, $g_{22}$, $g_{33}$. The element of distance is specified by:

$$ (ds)^2 = g_{11}(du^1)^2 + g_{22}(du^2)^2 + g_{33}(du^3)^2. $$

Also,

$$ \operatorname{grad} \phi = a_1 \frac{1}{g_{11}} \frac{\partial \phi}{\partial u^1} + a_2 \frac{1}{g_{22}} \frac{\partial \phi}{\partial u^2} + a_3 \frac{1}{g_{33}} \frac{\partial \phi}{\partial u^3} $$

$$ \operatorname{div} \vec{v} = \frac{1}{\sqrt{g}} \left( \frac{\partial}{\partial u^1} (\sqrt{g} v_1) + \frac{\partial}{\partial u^2} (\sqrt{g} v_2) + \frac{\partial}{\partial u^3} (\sqrt{g} v_3) \right) $$

and

$$ \operatorname{curl} \vec{v} = \frac{1}{g_{11}} \left( \frac{\partial}{\partial u^2} (g_{22} v_3) - \frac{\partial}{\partial u^3} (g_{33} v_2) \right) \\ + \frac{1}{g_{22}} \left( \frac{\partial}{\partial u^3} (g_{33} v_1) - \frac{\partial}{\partial u^1} (g_{11} v_3) \right) \\ + \frac{1}{g_{33}} \left( \frac{\partial}{\partial u^1} (g_{11} v_2) - \frac{\partial}{\partial u^2} (g_{22} v_1) \right) $$

where $a_1$, $a_2$, and $a_3$ are unit vectors, and $g = g_{11}g_{22}g_{33}$. Using the above equations, we obtain the general expression for the vector Laplacian operating on $\vec{v}$:

$$ \begin{aligned} \Delta \vec{v} = & a_1 \left( \frac{1}{g_{11}} \frac{\partial}{\partial u^1} \left( \frac{1}{g_{11}} \frac{\partial v_1}{\partial u^1} \right) + \frac{1}{g_{22}} \frac{\partial}{\partial u^2} \left( \frac{v_1}{g_{22}} \right) + \frac{1}{g_{33}} \frac{\partial}{\partial u^3} \left( \frac{v_1}{g_{33}} \right) \right) \\ & + a_2 \left( \frac{1}{g_{11}} \frac{\partial}{\partial u^1} \left( \frac{v_2}{g_{11}} \right) + \frac{1}{g_{22}} \frac{\partial}{\partial u^2} \left( \frac{1}{g_{22}} \frac{\partial v_2}{\partial u^2} \right) + \frac{1}{g_{33}} \frac{\partial}{\partial u^3} \left( \frac{v_2}{g_{33}} \right) \right) \\ & + a_3 \left( \frac{1}{g_{11}} \frac{\partial}{\partial u^1} \left( \frac{v_3}{g_{11}} \right) + \frac{1}{g_{22}} \frac{\partial}{\partial u^2} \left( \frac{v_3}{g_{22}} \right) + \frac{1}{g_{33}} \frac{\partial}{\partial u^3} \left( \frac{1}{g_{33}} \frac{\partial v_3}{\partial u^3} \right) \right) \end{aligned} $$

This is much more complex than the scalar case:

$$ \nabla^2 \phi = \frac{1}{g_{11}} \frac{\partial^2 \phi}{\partial (u^1)^2} + \frac{1}{g_{22}} \frac{\partial^2 \phi}{\partial (u^2)^2} + \frac{1}{g_{33}} \frac{\partial^2 \phi}{\partial (u^3)^2} $$
## Vector Laplacian in Rectangular Coordinates

In rectangular coordinates, $g_{11} = g_{22} = g_{33} = 1$, therefore the Vector Laplacian $\Delta\vec{v}$ in Rectangular Coordinates shall be

$$ \Delta\vec{v} = a_x \frac{\partial^2 v_x}{\partial x^2} + a_y \frac{\partial^2 v_y}{\partial y^2} + a_z \frac{\partial^2 v_z}{\partial z^2} $$

While

$$ \nabla^2 \phi = \frac{\partial^2 \phi}{\partial x^2} + \frac{\partial^2 \phi}{\partial y^2} + \frac{\partial^2 \phi}{\partial z^2} $$

In this special case, each component of $\Delta\vec{v}$ has the same form as $\nabla^2\phi$.

## Vector Laplacian in Cylindrical Coordinates

In cylindrical coordinates $(r, \theta, z)$, $g_{11} = 1$, $g_{22} = r^2$, $g_{33} = 1$, therefore the Vector Laplacian $\Delta\vec{v}$ in Cylindrical Coordinates shall be

$$ \begin{aligned} \Delta\vec{v} = a_r & \left( \frac{\partial^2 v_r}{\partial r^2} + \frac{1}{r} \frac{\partial v_r}{\partial r} - \frac{v_r}{r^2} + \frac{1}{r^2} \frac{\partial^2 v_r}{\partial \theta^2} + \frac{\partial^2 v_r}{\partial z^2} \right) \\ & + a_\theta \left( \frac{\partial^2 v_\theta}{\partial r^2} + \frac{1}{r} \frac{\partial v_\theta}{\partial r} - \frac{v_\theta}{r^2} + \frac{1}{r^2} \frac{\partial^2 v_\theta}{\partial \theta^2} + \frac{\partial^2 v_\theta}{\partial z^2} \right) \\ & + a_z \left( \frac{\partial^2 v_z}{\partial r^2} + \frac{1}{r} \frac{\partial v_z}{\partial r} + \frac{1}{r^2} \frac{\partial^2 v_z}{\partial \theta^2} + \frac{\partial^2 v_z}{\partial z^2} \right) \end{aligned} $$

and

$$ \nabla^2 \phi = \frac{\partial^2 \phi}{\partial r^2} + \frac{1}{r} \frac{\partial \phi}{\partial r} + \frac{1}{r^2} \frac{\partial^2 \phi}{\partial \theta^2} + \frac{\partial^2 \phi}{\partial z^2} $$

The first two components of $\Delta\vec{v}$ are of different form from $\nabla^2\phi$, each containing two additional terms.

## Vector Laplacian in Spherical Coordinates

In spherical coordinates $(r, \theta, \phi)$, $g_{11} = 1$, $g_{22} = r^2$, $g_{33} = r^2 \sin^2 \theta$, therefore the Vector Laplacian $\Delta\vec{v}$ in Spherical Coordinates shall be

$$ \begin{aligned} \Delta\vec{v} = a_r & \left( \frac{\partial^2 v_r}{\partial r^2} + \frac{2}{r} \frac{\partial v_r}{\partial r} - \frac{2 v_r}{r^2} + \frac{1}{r^2} \frac{\partial^2 v_r}{\partial \theta^2} + \frac{\cot \theta}{r^2} \frac{\partial v_r}{\partial \theta} + \frac{1}{r^2 \sin^2 \theta} \frac{\partial^2 v_r}{\partial \phi^2} \right) \\ & + a_\theta \left( \frac{\partial^2 v_\theta}{\partial r^2} + \frac{2}{r} \frac{\partial v_\theta}{\partial r} - \frac{v_\theta}{r^2} + \frac{1}{r^2} \frac{\partial^2 v_\theta}{\partial \theta^2} + \frac{\cot \theta}{r^2} \frac{\partial v_\theta}{\partial \theta} + \frac{1}{r^2 \sin^2 \theta} \frac{\partial^2 v_\theta}{\partial \phi^2} \right) \\ & + a_\phi \left( \frac{\partial^2 v_\phi}{\partial r^2} + \frac{2}{r} \frac{\partial v_\phi}{\partial r} + \frac{1}{r^2} \frac{\partial^2 v_\phi}{\partial \theta^2} + \frac{\cot \theta}{r^2} \frac{\partial v_\phi}{\partial \theta} + \frac{1}{r^2 \sin^2 \theta} \frac{\partial^2 v_\phi}{\partial \phi^2} \right) \end{aligned} $$

and

$$ \nabla^2 \phi = \frac{\partial^2 \phi}{\partial r^2} + \frac{2}{r} \frac{\partial \phi}{\partial r} + \frac{1}{r^2} \frac{\partial^2 \phi}{\partial \theta^2} + \frac{\cot \theta}{r^2} \frac{\partial \phi}{\partial \theta} + \frac{1}{r^2 \sin^2 \theta} \frac{\partial^2 \phi}{\partial \phi^2} $$

Here each component of $\Delta\vec{v}$ contains more terms than $\nabla^2\phi$. Other coordinates are handled in the same manner as the foregoing three cases. In the more complicated coordinate systems, the difference between the vector and scalar Laplacians becomes even more pronounced.
# 18 Derivatives with respect to vectors and second-order tensors

## 18.1 Derivatives of scalar and vector valued functions of vectors

Let $f(\mathbf{v})$ be a real valued function of the vector $\mathbf{v}$. Then the derivative of $f(\mathbf{v})$ with respect to $\mathbf{v}$ (or at $\mathbf{v}$) is the vector defined through its dot product with any vector $\mathbf{u}$ being

$$ \frac{\partial f}{\partial \mathbf{v}} \cdot \mathbf{u} = Df(\mathbf{v})[\mathbf{u}] = \left[ \frac{d}{d\alpha} f(\mathbf{v} + \alpha \mathbf{u}) \right]_{\alpha=0} $$

for all vectors $\mathbf{u}$. The above dot product yields a scalar, and if $\mathbf{u}$ is a unit vector, it gives the directional derivative of $f$ at $\mathbf{v}$, in the $\mathbf{u}$ direction. If $f(\mathbf{v}) = f_1(\mathbf{v}) + f_2(\mathbf{v})$ then

$$ \frac{\partial f}{\partial \mathbf{v}} \cdot \mathbf{u} = \frac{\partial f_1}{\partial \mathbf{v}} \cdot \mathbf{u} + \frac{\partial f_2}{\partial \mathbf{v}} \cdot \mathbf{u} $$

If $f(\mathbf{v}) = f_1(\mathbf{v})f_2(\mathbf{v})$ then

$$ \frac{\partial f}{\partial \mathbf{v}} \cdot \mathbf{u} = \left( \frac{\partial f_1}{\partial \mathbf{v}} \cdot \mathbf{u} \right) f_2(\mathbf{v}) + f_1(\mathbf{v}) \left( \frac{\partial f_2}{\partial \mathbf{v}} \cdot \mathbf{u} \right) $$

If $f(\mathbf{v}) = f_1(f_2(\mathbf{v}))$ then

$$ \frac{\partial f}{\partial \mathbf{v}} \cdot \mathbf{u} = \frac{\partial f_1}{\partial f_2} \frac{\partial f_2}{\partial \mathbf{v}} \cdot \mathbf{u} $$

Let $f(\mathbf{v})$ be a vector valued function of the vector $\mathbf{v}$. Then the derivative of $f(\mathbf{v})$ with respect to $\mathbf{v}$ (or at $\mathbf{v}$) is the second order tensor defined through its dot product with any vector $\mathbf{u}$ being

$$ \frac{\partial f}{\partial \mathbf{v}} \cdot \mathbf{u} = Df(\mathbf{v})[\mathbf{u}] = \left[ \frac{d}{d\alpha} f(\mathbf{v} + \alpha \mathbf{u}) \right]_{\alpha=0} $$

for all vectors $\mathbf{u}$. The above dot product yields a vector, and if $\mathbf{u}$ is a unit vector, it gives the directional derivative of $f$ at $\mathbf{v}$, in the $\mathbf{u}$ direction. If $f(\mathbf{v}) = f_1(\mathbf{v}) + f_2(\mathbf{v})$ then

$$ \frac{\partial f}{\partial \mathbf{v}} \cdot \mathbf{u} = \frac{\partial f_1}{\partial \mathbf{v}} \cdot \mathbf{u} + \frac{\partial f_2}{\partial \mathbf{v}} \cdot \mathbf{u} $$

If $f(\mathbf{v}) = f_1(\mathbf{v}) \times f_2(\mathbf{v})$ then

$$ \frac{\partial f}{\partial \mathbf{v}} \cdot \mathbf{u} = \left( \frac{\partial f_1}{\partial \mathbf{v}} \cdot \mathbf{u} \right) \times \mathbf{f}_2(\mathbf{v}) + \mathbf{f}_1(\mathbf{v}) \times \left( \frac{\partial \mathbf{f}_2}{\partial \mathbf{v}} \cdot \mathbf{u} \right) $$

If $f(\mathbf{v}) = f_1(\mathbf{f}_2(\mathbf{v}))$ then

$$ \frac{\partial f}{\partial \mathbf{v}} \cdot \mathbf{u} = \frac{\partial f_1}{\partial f_2} \left( \frac{\partial f_2}{\partial \mathbf{v}} \cdot \mathbf{u} \right) $$

## 18.2 Derivatives of scalar and vector valued functions of second-order tensors

Let $f(\mathbf{S})$ be a real valued function of the second order tensor $\mathbf{S}$. Then the derivative of $f(\mathbf{S})$ with respect to $\mathbf{S}$ (or at $\mathbf{S}$) in the direction $\mathbf{T}$ is the second order tensor defined as

$$ \frac{\partial f}{\partial \mathbf{S}} : \mathbf{T} = Df(\mathbf{S})[\mathbf{T}] = \left[ \frac{d}{d\alpha} f(\mathbf{S} + \alpha \mathbf{T}) \right]_{\alpha=0} $$

for all second order tensors $\mathbf{T}$. If $F(\mathbf{S}) = \mathbf{F}_1(\mathbf{S}) + \mathbf{F}_2(\mathbf{S})$ then

$$ \frac{\partial \mathbf{F}}{\partial \mathbf{S}} : \mathbf{T} = \left( \frac{\partial \mathbf{F}_1}{\partial \mathbf{S}} + \frac{\partial \mathbf{F}_2}{\partial \mathbf{S}} \right) : \mathbf{T} $$
If $\mathbf{F}(\mathbf{S}) = \mathbf{F}_1(\mathbf{S}) \cdot \mathbf{F}_2(\mathbf{S})$ then

$$ \frac{\partial \mathbf{F}}{\partial \mathbf{S}} : \mathbf{T} = \left( \frac{\partial \mathbf{F}_1}{\partial \mathbf{S}} : \mathbf{T} \right) \cdot \mathbf{F}_2(\mathbf{S}) + \mathbf{F}_1(\mathbf{S}) \cdot \left( \frac{\partial \mathbf{F}_2}{\partial \mathbf{S}} : \mathbf{T} \right) $$

If $\mathbf{F}(\mathbf{S}) = \mathbf{F}_1(\mathbf{F}_2(\mathbf{S}))$ then

$$ \frac{\partial \mathbf{F}}{\partial \mathbf{S}} : \mathbf{T} = \frac{\partial \mathbf{F}_1}{\partial \mathbf{F}_2} : \left( \frac{\partial \mathbf{F}_2}{\partial \mathbf{S}} : \mathbf{T} \right) $$

If $f(\mathbf{S}) = f_1(\mathbf{F}_2(\mathbf{S}))$ then

$$ \frac{\partial f}{\partial \mathbf{S}} : \mathbf{T} = \frac{\partial f_1}{\partial \mathbf{F}_2} : \left( \frac{\partial \mathbf{F}_2}{\partial \mathbf{S}} : \mathbf{T} \right) $$

# 19 Advanced Tensor Derivatives

## 19.1 Christoffel symbols

This section introduces the Christoffel symbols as part of the formalism used to express the connection on a manifold in local coordinates. These symbols help define the covariant derivative, which is critical in differential geometry, particularly in curved spaces. Here's what we need to rigorously derive:

* Manifold, Coordinate system setup and the metric tensor

* Covariant differentiation of a vector.

Let's break this down step-by-step with detailed mathematical rigor.

### 19.1.1 Manifold, Coordinate System setup and the metric tensor

Let $\mathcal{M}$ be a differentiable manifold of dimension $n$. At each point $p \in \mathcal{M}$, the tangent space $T_p\mathcal{M}$ is an $n$-dimensional vector space. To specify the geometry of $\mathcal{M}$, we introduce a coordinate chart $(U, \varphi)$, where $U \subset \mathcal{M}$ is an open set and $\varphi: U \to \mathbb{R}^n$ is a smooth, bijective map. For each point $p \in U$, $\varphi(p) = (x^1(p), x^2(p), \dots, x^n(p))$ gives the local coordinates of $p$. The coordinate basis vectors at each point are denoted by $\frac{\partial}{\partial x^i}$, abbreviated as $\partial_i$. These vectors span the tangent space $T_p\mathcal{M}$ at each point $p$.

To define distances and angles on the manifold, we introduce the *metric tensor* $g$, which is a smooth, symmetric, positive-definite (0,2)-tensor field. In a coordinate chart, the metric is represented as:

$$ g = g_{ij} dx^i \otimes dx^j $$

where $g_{ij} = g(\frac{\partial}{\partial x^i}, \frac{\partial}{\partial x^j})$ are the components of the metric in the chosen coordinates, and $dx^i$ are the dual basis 1-forms. The metric components $g_{ij}$ are smooth functions on the manifold, and $g_{ij} = g_{ji}$, ensuring the symmetry of the metric tensor. The inverse of the metric tensor is denoted by $g^{ij}$, where:

$$ g^{ik} g_{kj} = \delta_j^i $$

where $\delta_j^i$ is the Kronecker delta.

### 19.1.2 Covariant Derivative of a Vector Field

On a manifold, the *covariant derivative* extends the notion of differentiation to curved spaces, ensuring that differentiation is consistent with the manifold's geometry. To define it, we need the notion of a connection. The covariant derivative of a vector field $X$ in the direction of another vector field $Y$, denoted $\nabla_Y X$, must satisfy the following properties:

1. **Linearity**: $\nabla_Y(aX + bZ) = a\nabla_Y X + b\nabla_Y Z$ for any scalar functions $a$ and $b$, and vector fields $X, Z$.
2. **Leibniz Rule**: $\nabla_Y(fX) = f\nabla_Y X + (Yf)X$ for any scalar function $f$.

3. **Compatibility with the Metric**: $Y(g(X, Z)) = g(\nabla_Y X, Z) + g(X, \nabla_Y Z)$, ensuring that the covariant derivative preserves the inner product structure defined by the metric tensor.

The Christoffel symbols $\Gamma^k_{ij}$ are the components of the connection in a coordinate basis. They provide a way to express the covariant derivative in terms of local coordinates. The Christoffel symbols are defined by the condition that the covariant derivative of the basis vector field $\partial_j$ is a linear combination of the basis vectors:

$$ \nabla_{\partial_i} \partial_j = \Gamma^k_{ij} \partial_k $$

The Christoffel symbols $\Gamma^k_{ij}$ are related to the metric tensor by the following expression, derived from the requirement that the covariant derivative preserves the metric (i.e., $\nabla g = 0$):

$$ \Gamma^k_{ij} = \frac{1}{2} g^{kl} (\partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij}) $$

where $g^{kl}$ is the inverse of the metric tensor, and $\partial_i g_{jl}$ denotes the partial derivative of the metric component $g_{jl}$ with respect to the coordinate $x^i$. Let's derive the expression for the Christoffel symbols step-by-step:

1. Start from the compatibility condition for the metric tensor:

$$ \nabla_k g_{ij} = 0 $$

This implies that the metric is covariantly constant.

2. Expanding this condition in terms of the Christoffel symbols:

$$ \partial_k g_{ij} - \Gamma^l_{ki} g_{lj} - \Gamma^l_{kj} g_{il} = 0 $$

3. Rearranging terms gives the following equation:

$$ \partial_k g_{ij} = \Gamma^l_{ki} g_{lj} + \Gamma^l_{kj} g_{il} $$

4. Using the symmetry of the metric $g_{ij}$, cyclically permute the indices $i, j$, and $k$ in the above equation, then add and subtract the resulting equations to isolate the Christoffel symbols. After some algebra, we arrive at the expression:

$$ \Gamma^k_{ij} = \frac{1}{2} g^{kl} (\partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij}) $$

Thus, the Christoffel symbols are completely determined by the metric tensor and its first derivatives. Given a vector field $X = X^i \partial_i$, the covariant derivative of $X$ in the direction of $\partial_j$ is:

$$ \nabla_j X^i = \partial_j X^i + \Gamma^i_{jk} X^k $$

This formula expresses the covariant derivative of a vector field in terms of the Christoffel symbols and the partial derivatives of the components of the vector field.

### 19.1.3 Christoffel symbols in Euclidean Space

The section defines the Christoffel symbols in a Euclidean space, where the coordinates are typically Cartesian, but we can also consider curvilinear coordinates (e.g., polar, cylindrical, spherical). Christoffel symbols appear when we want to express derivatives of vector fields in a non-Cartesian coordinate system. In Euclidean space, the Christoffel symbols represent how the coordinate basis vectors change as we move from one point to another. We will rigorously derive the following key components:

* Euclidean space and coordinate systems.
* Connection between the Christoffel symbols and coordinate transformations.

* The role of Christoffel symbols in non-Cartesian coordinates.

* Detailed derivation of Christoffel symbols in Euclidean space.

We begin by considering the standard $n$-dimensional Euclidean space $\mathbb{R}^n$. The *Euclidean space* is a flat space, and it can be equipped with different coordinate systems:

* **Cartesian coordinates** ($x^1, x^2, \dots, x^n$): These coordinates are orthogonal and have a straightforward metric, which is the identity matrix.

* **Curvilinear coordinates** ($q^1, q^2, \dots, q^n$): These coordinates can be functions of the Cartesian coordinates, such as polar or spherical coordinates.

The key idea is that while Euclidean space has no intrinsic curvature, when we introduce non-Cartesian coordinates, the *coordinate basis vectors* change from point to point. This change is precisely captured by the Christoffel symbols. In a general coordinate system ($q^1, q^2, \dots, q^n$), the basis vectors $\frac{\partial}{\partial q^i}$ span the tangent space at each point. These basis vectors are not necessarily orthogonal, and their inner products define the components of the *metric tensor* $g_{ij}$, which in Euclidean space is:

$$g_{ij} = \left(\frac{\partial x^k}{\partial q^i}\right) \left(\frac{\partial x^l}{\partial q^j}\right) \delta_{kl}$$

where $\delta_{kl}$ is the Kronecker delta, representing the flat Cartesian metric of Euclidean space. Thus, the metric tensor in curvilinear coordinates is:

$$g_{ij} = \sum_{k=1}^{n} \frac{\partial x^k}{\partial q^i} \frac{\partial x^k}{\partial q^j}$$

In Cartesian coordinates, the covariant derivative reduces to the partial derivative because the Christoffel symbols vanish. However, in curvilinear coordinates, the basis vectors $\frac{\partial}{\partial q^i}$ vary from point to point, and this variation is captured by the Christoffel symbols. The *covariant derivative* $\nabla_j$ of a vector field $V^i$ is given by:

$$\nabla_j V^i = \partial_j V^i + \Gamma^i_{jk} V^k$$

where $\Gamma^i_{jk}$ are the Christoffel symbols. The Christoffel symbols in Euclidean space are derived from the requirement that the covariant derivative of the metric tensor is zero: $\nabla_k g_{ij} = 0$. This is the *metric compatibility condition*. Expanding it gives:

$$\partial_k g_{ij} - \Gamma^l_{ki} g_{lj} - \Gamma^l_{kj} g_{il} = 0$$

Rearranging this expression gives:

$$\partial_k g_{ij} = \Gamma^l_{ki} g_{lj} + \Gamma^l_{kj} g_{il}$$

After some manipulation, we obtain the Christoffel symbols as:

$$\Gamma^k_{ij} = \frac{1}{2} g^{kl} (\partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij})$$

In Cartesian coordinates, the metric tensor $g_{ij}$ is the identity matrix, $g_{ij} = \delta_{ij}$, and its derivatives vanish. Thus, the Christoffel symbols are: $\Gamma^k_{ij} = 0$. In curvilinear coordinates, the Christoffel symbols are generally non-zero. For example, in 2D polar coordinates $(r, \theta)$, the metric tensor is:

$$g_{ij} = \begin{pmatrix} 1 & 0 \\ 0 & r^2 \end{pmatrix}$$

One of the non-zero Christoffel symbols in polar coordinates is: $\Gamma^\theta_{r\theta} = \frac{1}{r}$.
### 19.1.4 Christoffel Symbols of the Second Kind

The Christoffel symbols of the second kind, often denoted as $\Gamma^k_{ij}$, represent the components of the Levi-Civita connection in a local coordinate system on a differentiable manifold. They are used to express the covariant derivative of tensor fields and play a crucial role in general relativity, Riemannian geometry, and differential geometry in general.

Let $\mathcal{M}$ be an $n$-dimensional differentiable manifold with a smooth Riemannian metric tensor $g$. The Christoffel symbols of the second kind $\Gamma^k_{ij}$ represent the components of the connection in a coordinate basis. The Christoffel symbols are defined by the following equation for the covariant derivative of the basis vector fields $\frac{\partial}{\partial x^i}$:

$$ \nabla_{\frac{\partial}{\partial x^i}} \frac{\partial}{\partial x^j} = \Gamma^k_{ij} \frac{\partial}{\partial x^k} $$

The covariant derivative on a manifold must satisfy the condition of *metric compatibility*, meaning that the covariant derivative of the metric tensor $g$ is zero $\nabla_k g_{ij} = 0$. Expanding the covariant derivative of the metric tensor gives:

$$ \partial_k g_{ij} - \Gamma^l_{ki} g_{lj} - \Gamma^l_{kj} g_{il} = 0 $$

Rearranging the equation from metric compatibility:

$$ \partial_k g_{ij} = \Gamma^l_{ki} g_{lj} + \Gamma^l_{kj} g_{il} $$

Cyclically permuting the indices $i, j$, and $k$, and adding/subtracting the resulting equations, we obtain:

$$ \partial_k g_{ij} + \partial_i g_{jk} - \partial_j g_{ki} = 2 \Gamma^l_{ki} g_{lj} $$

Multiplying by $g^{kl}$, we find the Christoffel symbols:

$$ \Gamma^k_{ij} = \frac{1}{2} g^{kl} (\partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij}) $$

The Christoffel symbols are symmetric in the lower two indices: $\Gamma^k_{ij} = \Gamma^k_{ji}$. This follows from the symmetry of the metric tensor $g_{ij} = g_{ji}$. The Christoffel symbols describe how basis vectors change as we move on the manifold. In general relativity, they are used in the geodesic equation:

$$ \frac{d^2 x^i}{d\tau^2} + \Gamma^i_{jk} \frac{dx^j}{d\tau} \frac{dx^k}{d\tau} = 0 $$

In a holonomic basis, the basis vectors $\frac{\partial}{\partial x^i}$ are derived directly from a coordinate system. These vectors commute: $[\frac{\partial}{\partial x^i}, \frac{\partial}{\partial x^j}] = 0$. In a nonholonomic basis, the basis vectors $\mathbf{e}_a$ may not commute $[\mathbf{e}_a, \mathbf{e}_b] = C^c_{ab} \mathbf{e}_c$ where $C^c_{ab}$ are the structure constants. The covariant derivative in a nonholonomic basis $\{\mathbf{e}_a\}$ is given by:

$$ \nabla_{\mathbf{e}_a} \mathbf{e}_b = \omega^c_{ab} \mathbf{e}_c $$

where $\omega^c_{ab}$ are the connection coefficients. The structure constants $C^c_{ab}$ are defined by: $[\mathbf{e}_a, \mathbf{e}_b] = C^c_{ab} \mathbf{e}_c$. These constants are antisymmetric $C^c_{ab} = -C^c_{ba}$. In a nonholonomic basis, the connection coefficients are related to the Christoffel symbols $\Gamma^c_{ab}$ by:

$$ \omega^c_{ab} = \Gamma^c_{ab} + \frac{1}{2} C^c_{ab} $$

We derive the connection coefficients as:

$$ \omega^c_{ab} = \frac{1}{2} g^{cd} (\partial_a g_{bd} + \partial_b g_{ad} - \partial_d g_{ab}) + \frac{1}{2} C^c_{ab} $$

In general, the connection coefficients $\omega^c_{ab}$ are not symmetric in their lower indices due to the structure constants.
### 19.1.5 Transformation Law for Christoffel Symbols

The Christoffel symbols $\Gamma^k_{ij}$ define the covariant derivative in a given coordinate system. In this document, we derive the transformation law for the Christoffel symbols under a change of variables, focusing on the relationship between the original and transformed coordinates. The Christoffel symbols in a local coordinate system ($x^i$) are defined through the covariant derivative of the basis vectors:

$$ \nabla_{\frac{\partial}{\partial x^j}} \frac{\partial}{\partial x^k} = \Gamma^i_{jk} \frac{\partial}{\partial x^i} $$

Let $(x^1, \dots, x^n)$ and $(\bar{x}^1, \dots, \bar{x}^n)$ be two coordinate systems related by a smooth map $\bar{x}^i = \bar{x}^i(x^1, \dots, x^n)$. The Jacobian matrix is given by: $\frac{\partial \bar{x}^i}{\partial x^j}$. The basis vectors transform as:

$$ \frac{\partial}{\partial x^i} = \frac{\partial \bar{x}^j}{\partial x^i} \frac{\partial}{\partial \bar{x}^j} $$

The transformation law for the Christoffel symbols is:

$$ \bar{\Gamma}_{kl}^{m} = \frac{\partial \bar{x}^{m}}{\partial x^{i}} \frac{\partial x^{j}}{\partial \bar{x}^{k}} \frac{\partial x^{n}}{\partial \bar{x}^{l}} \Gamma_{jn}^{i} + \frac{\partial \bar{x}^{m}}{\partial x^{p}} \frac{\partial^{2} x^{p}}{\partial \bar{x}^{k} \partial \bar{x}^{l}} $$

The Christoffel symbols are symmetric in their lower indices, and this symmetry is preserved under the transformation:

$$ \Gamma_{ij}^{k} = \Gamma_{ji}^{k} $$

## 19.2 Parallel Transport in Riemannian Space

A Riemannian manifold $(M, g)$ consists of a differentiable manifold equipped with a smooth, symmetric, positive-definite metric tensor $g$, which defines an inner product at each point. In local coordinates, the metric tensor is:

$$ g = g_{ij}(x) \, dx^i \otimes dx^j $$

where $g_{ij} = g(\frac{\partial}{\partial x^i}, \frac{\partial}{\partial x^j})$. Parallel transport describes how a vector field $V(t)$ is moved along a curve $\gamma(t)$ such that its covariant derivative vanishes:

$$ \nabla_{\gamma(t)} V(t) = 0 $$

The covariant derivative $\nabla$ satisfies linearity, the Leibniz rule, and metric compatibility. The Christoffel symbols $\Gamma^k_{ij}$ are defined by:

$$ \nabla_j V^i = \partial_j V^i + \Gamma^i_{jk} V^k $$

The Christoffel symbols are determined by the metric compatibility condition: $\nabla_k g_{ij} = 0$. Expanding this, we get:

$$ \partial_k g_{ij} - \Gamma^l_{ki} g_{lj} - \Gamma^l_{kj} g_{il} = 0 $$

By permuting indices and solving, we find:

$$ \Gamma^k_{ij} = \frac{1}{2} g^{kl} (\partial_i g_{jl} + \partial_j g_{il} - \partial_l g_{ij}) $$

The Christoffel symbols describe how vectors are parallel transported along curves. For a vector $V^i(t)$ being parallel transported along a curve $\gamma(t)$, the condition is:

$$ \frac{dV^i}{dt} + \Gamma^i_{jk} \frac{d\gamma^j}{dt} V^k = 0 $$

The Christoffel symbols $\Gamma^k_{ij}$ describe the covariant derivative of a vector field $V^i$ in the direction of $\frac{\partial}{\partial x^j}$:

$$ \nabla_j V^i = \partial_j V^i + \Gamma^i_{jk} V^k $$
In index-free notation, the covariant derivative $\nabla_X V$ of a vector field $V$ along $X$ satisfies linearity and the Leibniz rule:

$$ \nabla_X(fV) = f\nabla_X V + (Xf)V $$

In a coordinate system, the covariant derivative is expressed in indexed notation as:

$$ \nabla_X Y = (X^i \partial_i Y^j + X^i \Gamma^j_{ik} Y^k) \frac{\partial}{\partial x^j} $$

In index-free notation, it is written abstractly as:

$$ \nabla_X Y = \text{abstract connection operator acting on } X \text{ and } Y $$

The Levi-Civita connection satisfies the metric compatibility condition $\nabla g = 0$, expressed in indexed notation as: $\nabla_k g_{ij} = 0$. In index-free notation, this is written as:

$$ (\nabla_X g)(Y, Z) = 0 $$

The Christoffel symbols provide a coordinate-based description of the connection, while index-free notation describes the connection in an abstract, coordinate-independent manner.

### 19.2.1 Derivation of the Relationship to Index-Free Notation

The Christoffel symbols in the indexed notation are used to represent the covariant derivative in a coordinate basis. For a Riemannian manifold ($M, g$) with local coordinates $(x^1, x^2, \dots, x^n)$, the Christoffel symbols $\Gamma^k_{ij}$ are defined through the covariant derivative of a vector field $V^i$ in the direction of a coordinate basis vector $\frac{\partial}{\partial x^j}$:

$$ \nabla_j V^i = \partial_j V^i + \Gamma^i_{jk} V^k $$

Here, the covariant derivative is expressed in terms of the partial derivative $\partial_j = \frac{\partial}{\partial x^j}$ and the Christoffel symbols $\Gamma^i_{jk}$, which describe how the coordinate basis vectors $\frac{\partial}{\partial x^i}$ change as one moves through the manifold.

In contrast to the indexed representation, the *index-free notation* expresses geometric objects and operations without explicit reference to coordinates. Instead, the focus is on the intrinsic geometric meaning of these objects.

The covariant derivative of a vector field $V$ in the direction of a vector field $X$ is denoted by $\nabla_X V$ in index-free notation. This can be understood as a *directional derivative* of the vector field $V$ along $X$, and is defined such that:

1. $\nabla_X (aV + bW) = a\nabla_X V + b\nabla_X W$ (linearity),

2. $\nabla_X (fV) = f\nabla_X V + (Xf)V$ (Leibniz rule).

Here, $f$ is a smooth scalar function, and $a$ and $b$ are constants. In *index-free notation*, the Christoffel symbols do not appear explicitly. Instead, the connection $\nabla$ is defined abstractly as a map that takes two vector fields $X$ and $Y$ and returns another vector field $\nabla_X Y$. This abstract map satisfies the linearity and Leibniz rules described above.

Let $\{e_i\}$ be a local frame (or basis vector fields) on the manifold, such that $e_i = \frac{\partial}{\partial x^i}$ in local coordinates. The Christoffel symbols describe how these basis vectors change with respect to each other under parallel transport, and in index-free notation, the covariant derivative $\nabla_{e_i} e_j$ (in terms of the basis vectors) can be written as:

$$ \nabla_{e_i} e_j = \Gamma^k_{ij} e_k $$

This relation defines the Christoffel symbols $\Gamma^k_{ij}$ in terms of how the basis vector $e_j$ changes in the direction of the basis vector $e_i$. In index-free notation, we avoid explicitly writing the indices and instead describe the relationship in terms of the abstract covariant derivative and vector fields. The *Levi-Civita connection* is the unique connection $\nabla$ on a Riemannian manifold that satisfies two important properties:
1. **Metric compatibility**: $\nabla g = 0$, meaning that the covariant derivative of the metric tensor $g$ is zero. In other words, the inner product of vector fields is preserved under parallel transport.

2. **Torsion-free condition**: The connection is symmetric, meaning that for any two vector fields $X$ and $Y$,

$$ \nabla_X Y - \nabla_Y X = [X, Y] $$

where $[X, Y]$ denotes the *Lie bracket* of the vector fields $X$ and $Y$. This condition ensures that the connection is *torsion-free*.

In index-free notation, these two conditions provide an abstract way to define the connection without referring to the Christoffel symbols explicitly. The connection is understood as a map that satisfies these two properties. The Christoffel symbols can be derived from the *metric compatibility condition* in both indexed and index-free notation. In *indexed notation*, the condition $\nabla g = 0$ is written as:

$$ \nabla_k g_{ij} = 0 $$

Expanding this in terms of the Christoffel symbols gives:

$$ \partial_k g_{ij} - \Gamma^l_{ki} g_{lj} - \Gamma^l_{kj} g_{il} = 0 $$

This equation shows how the Christoffel symbols are related to the partial derivatives of the metric tensor.

In *index-free notation*, the same condition is expressed without reference to a coordinate system. The covariant derivative of the metric tensor is written as:

$$ (\nabla_X g)(Y, Z) = 0 $$

for any vector fields $X$, $Y$, and $Z$. This equation means that the inner product $g(Y, Z)$ remains constant under parallel transport in the direction of $X$. Using this condition, we can derive the Christoffel symbols by working with the abstract covariant derivative and the metric in an intrinsic manner, but without introducing explicit coordinate indices.

In indexed notation, the Christoffel symbols explicitly describe the connection coefficients in terms of the coordinates. However, in index-free notation, the *connection* itself is viewed as an abstract operator that satisfies the properties of linearity, the Leibniz rule, and metric compatibility, without direct reference to the coordinate system. To see the relationship between these two notations, we observe that in *local coordinates*, the covariant derivative $\nabla_X Y$ can be written as:

$$ \nabla_X Y = (X^i \partial_i Y^j + X^i \Gamma^j_{ik} Y^k) \frac{\partial}{\partial x^j} $$

This is the *indexed version* of the covariant derivative. In *index-free notation*, we express this in terms of abstract vector fields and operators:

$$ \nabla_X Y = \text{abstract connection operator acting on } X \text{ and } Y $$

The *relationship* between the two notations is that the Christoffel symbols $\Gamma^j_{ik}$ in indexed notation provide the components of the abstract connection $\nabla$ in a local coordinate system. The index-free notation is more geometric and abstract, emphasizing the intrinsic properties of the connection, while the indexed notation provides a detailed, coordinate-based description.

In many geometric applications, especially in differential geometry and general relativity, index-free notation is preferred because it abstracts away the dependence on specific coordinates and emphasizes the geometric properties of objects like vectors, tensors, and connections. This allows us to express geometric concepts such as curvature and geodesics in a coordinate-independent manner. For example, the *Riemann curvature tensor* can be written in index-free notation as:

$$ R(X, Y)Z = \nabla_X \nabla_Y Z - \nabla_Y \nabla_X Z - \nabla_{[X, Y]} Z $$

This expression highlights the curvature as a map that depends on vector fields $X$, $Y$, and $Z$, without requiring explicit coordinate indices.
### 19.2.2 Christoffel Symbols In Earth Surface Coordinates

Given a spherical coordinate system, which describes points on the Earth surface (approximated as an ideal sphere),

$$x(R, \theta, \varphi) = (R \cos \theta \cos \varphi, R \cos \theta \sin \varphi, R \sin \theta)$$

For a point $x$, $R$ is the distance to the Earth's core (usually approximately the Earth radius). $\theta$ and $\varphi$ are the latitude and longitude. Positive $\theta$ is the northern hemisphere. To simplify the derivatives, the angles are given in radians (where $d\sin(x)/dx = \cos(x)$, the degree values introduce an additional factor of $360/2\pi$).

At any location, the tangent directions are $e_R$ (up), $e_\theta$ (north), and $e_\varphi$ (east) - you can also use indices 1, 2, 3.

$$e_R = (\cos \theta \cos \varphi, \cos \theta \sin \varphi, \sin \theta)$$ $$e_\theta = R \cdot (-\sin \theta \cos \varphi, -\sin \theta \sin \varphi, \cos \theta)$$ $$e_\varphi = R \cdot (-\cos \theta \sin \varphi, \cos \theta \cos \varphi, 0)$$

The related metric tensor has only diagonal elements (the squared vector lengths). This is an advantage of the coordinate system and not generally true.

$$g_{RR} = 1 \qquad g_{\theta\theta} = R^2 \qquad g_{\varphi\varphi} = R^2 \cos^2 \theta$$ $$g_{ij} = 0 \qquad \text{else}$$ $$g^{RR} = 1 \qquad g^{\theta\theta} = \frac{1}{R^2} \qquad g^{\varphi\varphi} = \frac{1}{R^2 \cos^2 \theta}$$ $$g^{ij} = 0 \qquad \text{else}$$

Now the necessary quantities can be calculated. Examples:

$$e^R = g^{RR} e_R \cdot e_R = (\cos \theta \cos \varphi, \cos \theta \sin \varphi, \sin \theta)$$ $$\Gamma_{\varphi R}^{\varphi} = e^{\varphi} \cdot \frac{\partial}{\partial R} e_{\varphi} = e^{\varphi} \cdot (-R \cos \theta \cos \varphi, -R \cos \theta \sin \varphi, 0) = -R \cos^2 \theta$$

The resulting Christoffel symbols of the second kind $\Gamma_{ji}^k = e^k \cdot \frac{\partial e_j}{\partial x^i}$ then are (organized by the "derivative" index $i$ in a matrix):

$$\begin{pmatrix} \Gamma_{RR}^R & \Gamma_{\theta R}^R & \Gamma_{\varphi R}^R \\ \Gamma_{RR}^\theta & \Gamma_{\theta R}^\theta & \Gamma_{\varphi R}^\theta \\ \Gamma_{RR}^\varphi & \Gamma_{\theta R}^\varphi & \Gamma_{\varphi R}^\varphi \end{pmatrix} = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & \frac{1}{R} \\ 0 & \frac{1}{R} & 0 \end{pmatrix}$$ $$\begin{pmatrix} \Gamma_{R\theta}^R & \Gamma_{\theta\theta}^R & \Gamma_{\varphi\theta}^R \\ \Gamma_{R\theta}^\theta & \Gamma_{\theta\theta}^\theta & \Gamma_{\varphi\theta}^\theta \\ \Gamma_{R\theta}^\varphi & \Gamma_{\theta\theta}^\varphi & \Gamma_{\varphi\theta}^\varphi \end{pmatrix} = \begin{pmatrix} 0 & -\frac{1}{R} & 0 \\ \frac{1}{R} & 0 & -\tan \theta \\ 0 & 0 & 0 \end{pmatrix}$$ $$\begin{pmatrix} \Gamma_{R\varphi}^R & \Gamma_{\theta\varphi}^R & \Gamma_{\varphi\varphi}^R \\ \Gamma_{R\varphi}^\theta & \Gamma_{\theta\varphi}^\theta & \Gamma_{\varphi\varphi}^\theta \\ \Gamma_{R\varphi}^\varphi & \Gamma_{\theta\varphi}^\varphi & \Gamma_{\varphi\varphi}^\varphi \end{pmatrix} = \begin{pmatrix} 0 & 0 & -R \cos^2 \theta \\ 0 & 0 & -\tan \theta \\ \frac{1}{R} & \frac{1}{R} & 0 \end{pmatrix}$$

These values show how the tangent directions (columns: $e_R$, $e_\theta$, $e_\varphi$) change, seen from an outside perspective (e.g., from space), but given in the tangent directions of the actual location (rows: $R$, $\theta$, $\varphi$).
## 19.3 Covariant Derivative of Tensors

We begin with the simplest case: the covariant derivative of a vector field. Let $V = V^i \frac{\partial}{\partial x^i}$ be a vector field on a Riemannian manifold $(M, g)$. The covariant derivative of the vector field $V$ in the direction of another vector field $X = X^j \frac{\partial}{\partial x^j}$ is denoted by $\nabla_X V$, and is given in local coordinates as:

$$ \nabla_X V = (X^j \partial_j V^i + X^j \Gamma^i_{jk} V^k) \frac{\partial}{\partial x^i} $$

where $\Gamma^i_{jk}$ are the Christoffel symbols of the Levi-Civita connection, and $\partial_j V^i$ represents the partial derivative of the component $V^i$ of the vector field. This expression can be understood as a directional derivative that is adjusted by the Christoffel symbols to account for the curvature of the manifold.

Next, consider a covector field (also known as a 1-form) $\omega = \omega_i dx^i$. The covariant derivative of a covector field is slightly different because the Christoffel symbols must be applied in a way that respects the transformation properties of covectors. The covariant derivative of the covector field $\omega$ in the direction of a vector field $X = X^j \frac{\partial}{\partial x^j}$ is denoted by $\nabla_X \omega$, and in local coordinates is given by:

$$ \nabla_X \omega = (X^j \partial_j \omega_i - X^j \Gamma^k_{ji} \omega_k) dx^i $$

Here:

* $\partial_j \omega_i$ is the partial derivative of the component $\omega_i$ of the covector field.

* The Christoffel symbols $\Gamma^k_{ji}$ account for the change in the basis for the covector components.

The minus sign in the second term arises because covectors transform contragrediently to vectors.

Let's now extend the notion of the covariant derivative to a general tensor field. A tensor field $T$ of type $(r, s)$ has $r$ contravariant indices (upper indices) and $s$ covariant indices (lower indices). The components of such a tensor are denoted by $T^{i_1 i_2 \dots i_r}_{j_1 j_2 \dots j_s}$, and it can be written as:

$$ T = T^{i_1 i_2 \dots i_r}_{j_1 j_2 \dots j_s} \frac{\partial}{\partial x^{i_1}} \otimes \frac{\partial}{\partial x^{i_2}} \otimes \dots \otimes dx^{j_1} \otimes dx^{j_2} \otimes \dots $$

The covariant derivative of the tensor $T$ in the direction of a vector field $X = X^k \frac{\partial}{\partial x^k}$ is denoted $\nabla_X T$, and in local coordinates, the covariant derivative is defined as:

$$ \nabla_X T = X^k \nabla_k T $$

where $\nabla_k$ is the covariant derivative with respect to the coordinate direction $\frac{\partial}{\partial x^k}$. The components of the covariant derivative of $T$ are given by:

$$ \nabla_k T^{i_1 i_2 \dots i_r}_{j_1 j_2 \dots j_s} = \partial_k T^{i_1 i_2 \dots i_r}_{j_1 j_2 \dots j_s} + \sum_{m=1}^{r} \Gamma^{i_m}_{kl} T^{i_1 \dots l \dots i_r}_{j_1 j_2 \dots j_s} - \sum_{n=1}^{s} \Gamma^{l}_{kj_n} T^{i_1 i_2 \dots i_r}_{j_1 \dots l \dots j_s} $$

$\partial_k T^{i_1 i_2 \dots i_r}_{j_1 j_2 \dots j_s}$ is the ordinary partial derivative of the tensor components. The first summation $\sum_{m=1}^r \Gamma^{i_m}_{kl} T^{i_1 \dots l \dots i_r}_{j_1 j_2 \dots j_s}$ involves the Christoffel symbols acting on the contravariant indices (upper indices). Each contravariant index contributes a positive term involving the Christoffel symbol. The second summation $-\sum_{n=1}^s \Gamma^{l}_{kj_n} T^{i_1 i_2 \dots i_r}_{j_1 \dots l \dots j_s}$ involves the Christoffel symbols acting on the covariant indices (lower indices). Each covariant index contributes a negative term involving the Christoffel symbol.

This formula ensures that the covariant derivative transforms correctly under coordinate changes, respecting the tensorial nature of $T$. As an example, consider a *rank-2* tensor field $T^{i_1 i_2}$, which is a tensor with two contravariant indices. The covariant derivative of this tensor is given by:
$$ \nabla_k T^{i_1 i_2} = \partial_k T^{i_1 i_2} + \Gamma^{i_1}_{kl} T^{li_2} + \Gamma^{i_2}_{kl} T^{i_1 l} $$

Similarly, for a rank-2 covariant tensor $T_{j_1 j_2}$, the covariant derivative is:

$$ \nabla_k T_{j_1 j_2} = \partial_k T_{j_1 j_2} - \Gamma^l_{kj_1} T_{lj_2} - \Gamma^l_{kj_2} T_{jl_1} $$

These formulas are special cases of the general formula for the covariant derivative of a tensor field, with the Christoffel symbols acting appropriately on each index.

The covariant derivative of a tensor field can be interpreted geometrically as a measure of how the tensor field changes as we move from one point to another on the manifold, taking into account the manifold's curvature. The Christoffel symbols adjust the ordinary derivative by accounting for how the basis vectors and the metric change across the manifold. For example:

* In the case of a vector field, the covariant derivative measures how the vector changes as we move along the manifold while accounting for the curvature.

* In the case of a covector field, the covariant derivative measures how the covector changes along the manifold, again incorporating the manifold's geometry.

The geometric importance of the covariant derivative lies in its ability to describe derivatives on curved spaces in a way that respects the underlying geometry, which ordinary partial derivatives cannot do. Substituting equation (61) into equation (60), we get:

$$ \frac{\partial \mathbf{A}}{\partial x^j} = \frac{\partial A^i}{\partial x^j} \mathbf{e}_i + \Gamma^k_{ij} A^i \mathbf{e}_k = \left( \frac{\partial A^i}{\partial x^j} + \Gamma^i_{jk} A^k \right) \mathbf{e}_i, \qquad (75) $$

where the names of the dummy indices $i$ and $k$ are swapped after the second equality.

**Definition 4.3.** The covariant derivative of a contravariant vector, $A^i$, is given by:

$$ \nabla_j A^i = \frac{\partial A^i}{\partial x^j} + \Gamma^i_{jk} A^k, \qquad (76) $$

where the adjective *covariant* refers to the fact that the index on the differentiation operator ($j$) is in the covariant (lower) position. Thus, equation (75) becomes:

$$ \frac{\partial \mathbf{A}}{\partial x^j} = \nabla_j A^i \mathbf{e}_i. \qquad (77) $$

Thus, the $i$-th contravariant component of the vector $\frac{\partial \mathbf{A}}{\partial x^j}$ relative to the covariant basis $\mathbf{e}_i$ is the covariant derivative of the $i$-th contravariant component of the vector, $A^i$, with respect to the coordinate $x^j$. In general, covariant derivatives are much more cumbersome than partial derivatives as the covariant derivative of any one tensor component involves all tensor components for non-zero Christoffel symbols. Only for Cartesian coordinates—where all Christoffel symbols are zero—do covariant derivatives reduce to ordinary partial derivatives.

Consider now the transformation of the covariant derivative of a contravariant vector from the coordinate system $x^i$ to $\tilde{x}^p$. Thus, using equations (59) and (74), we have:

$$ \nabla_{\tilde{q}} \tilde{A}^p = \frac{\partial \tilde{A}^p}{\partial \tilde{x}^q} + \tilde{\Gamma}_{qr}^p \tilde{A}^r = \frac{\partial x^j}{\partial \tilde{x}^q} \frac{\partial \tilde{x}^p}{\partial x^i} \frac{\partial A^i}{\partial x^j} + \frac{\partial x^j}{\partial \tilde{x}^q} \frac{\partial^2 \tilde{x}^p}{\partial x^j \partial x^i} A^i + \left( \Gamma^i_{jk} \frac{\partial x^j}{\partial \tilde{x}^q} \frac{\partial x^k}{\partial \tilde{x}^r} \frac{\partial \tilde{x}^p}{\partial x^i} + \frac{\partial \tilde{x}^p}{\partial x^i} \frac{\partial^2 x^i}{\partial \tilde{x}^q \partial \tilde{x}^r} \right) \frac{\partial \tilde{x}^r}{\partial x^l} A^l. \qquad (78) $$

Now for some fun. Remembering we can swap the order of differentiation between linearly independent quantities, and exploiting our freedom to rename dummy indices at whim, we rewrite the last term of equation (78) as:

$$ \frac{\partial \tilde{x}^p}{\partial x^i} \frac{\partial \tilde{x}^r}{\partial x^l} \frac{\partial}{\partial \tilde{x}^q} \left( \frac{\partial x^i}{\partial \tilde{x}^q} \right) A^l = \frac{\partial \tilde{x}^p}{\partial x^i} \frac{\partial}{\partial x^l} \left( \frac{\partial x^i}{\partial \tilde{x}^q} \right) A^l = \left( \frac{\partial}{\partial x^l} \left[ \frac{\partial \tilde{x}^p}{\partial x^i} \frac{\partial x^i}{\partial \tilde{x}^q} \right] - \frac{\partial x^i}{\partial \tilde{x}^q} \frac{\partial}{\partial x^l} \left( \frac{\partial \tilde{x}^p}{\partial x^i} \right) \right) A^l. $$
Thus, equation (78) becomes:

$$ \nabla_{\tilde{q}} \tilde{A}^p = \frac{\partial x^j}{\partial \tilde{x}^q} \frac{\partial \tilde{x}^p}{\partial x^i} \nabla_j A^i, $$

and the covariant derivative of a contravariant vector is a mixed rank 2 tensor.

# 19.4 Applications

## 19.4.1 Application 1: Geodesic Equation

A geodesic is the shortest path between two points on a curved manifold, analogous to a straight line in flat Euclidean space. On a Riemannian manifold, the equation that describes a geodesic is derived using the concept of *parallel transport* and involves the *Christoffel symbols*.

Let $\gamma(t)$ be a curve on the manifold, parametrized by $t$, and let $\dot{\gamma}(t)$ represent the tangent vector to the curve at each point. The condition that $\gamma(t)$ is a geodesic is that the tangent vector $\dot{\gamma}(t)$ is *parallel transported* along the curve. This gives the *geodesic equation*:

$$ \nabla_{\dot{\gamma}(t)} \dot{\gamma}(t) = 0 $$

In local coordinates, the components of the geodesic equation can be written as:

$$ \frac{d^2 \gamma^i}{dt^2} + \Gamma^i_{jk} \frac{d \gamma^j}{dt} \frac{d \gamma^k}{dt} = 0 $$

This is the *geodesic equation* in terms of the Christoffel symbols $\Gamma^i_{jk}$, which account for the curvature of the manifold. Here:

* $\frac{d^2 \gamma^i}{dt^2}$ represents the second derivative of the coordinates of the curve $\gamma(t)$.

* $\Gamma^i_{jk}$ are the Christoffel symbols that describe how the coordinate basis vectors change as we move along the curve.

Consider a curve $\gamma(t)$ on the manifold, with tangent vector $\dot{\gamma}(t)$. The condition for $\gamma(t)$ to be a geodesic is that the covariant derivative of $\dot{\gamma}(t)$ along itself vanishes:

$$ \nabla_{\dot{\gamma}} \dot{\gamma} = 0 $$

In local coordinates, the tangent vector is $\dot{\gamma}^i = \frac{d\gamma^i}{dt}$, and the covariant derivative of the tangent vector along itself is:

$$ \nabla_{\dot{\gamma}} \dot{\gamma}^i = \frac{d^2 \gamma^i}{dt^2} + \Gamma^i_{jk} \frac{d \gamma^j}{dt} \frac{d \gamma^k}{dt} $$

Setting this equal to zero gives the geodesic equation:

$$ \frac{d^2 \gamma^i}{dt^2} + \Gamma^i_{jk} \frac{d \gamma^j}{dt} \frac{d \gamma^k}{dt} = 0 $$

Geodesics are the paths that particles or objects follow when moving under no external forces in curved spacetime, and the Christoffel symbols account for the effects of curvature on these paths.

## 19.4.2 Application 2: Riemann Curvature Tensor

The *Riemann curvature tensor* is a fundamental object in differential geometry that measures the curvature of a Riemannian manifold. It describes how the geometry of the manifold deviates from being flat and is defined in terms of the *Christoffel symbols* and their derivatives.

The Riemann curvature tensor $R^i_{jkl}$ is given by:

$$ R^i_{jkl} = \partial_k \Gamma^i_{jl} - \partial_l \Gamma^i_{jk} + \Gamma^i_{km} \Gamma^m_{jl} - \Gamma^i_{lm} \Gamma^m_{jk} $$
This equation describes the curvature in terms of the change in the Christoffel symbols as we move across the manifold. $\partial_k \Gamma^i_{jl} - \partial_l \Gamma^i_{jk}$: These terms represent how the Christoffel symbols vary from point to point on the manifold, which is related to how the geometry changes. $\Gamma^i_{km} \Gamma^m_{jl} - \Gamma^i_{lm} \Gamma^m_{jk}$: These terms account for how the Christoffel symbols interact with each other, capturing the nonlinearity of the space. The Riemann curvature tensor measures the failure of parallel transport to be path-independent. Specifically, it quantifies how much a vector changes when parallel transported around a small closed loop on the manifold. If the manifold is flat (like Euclidean space), the Riemann curvature tensor vanishes.

### 19.4.3 Application 3: Ricci Tensor and Ricci Scalar

The Ricci tensor $R_{ij}$ is obtained by contracting the Riemann curvature tensor over one of its indices. It is defined as:

$$R_{ij} = R^k_{ikj}$$

The Ricci tensor is a trace of the Riemann curvature tensor and describes how the volume of a small geodesic ball deviates from the volume of a similar ball in flat space due to curvature. The Ricci scalar $R$ is obtained by further contracting the Ricci tensor:

$$R = g^{ij} R_{ij}$$

The Ricci scalar provides a single number at each point on the manifold that describes the degree to which the manifold is curved. Start with the Riemann curvature tensor $R^i_{jkl}$. Contract over the first and third indices to obtain the Ricci tensor:

$$R_{ij} = R^k_{ikj} = \partial_k \Gamma^k_{ij} - \partial_j \Gamma^k_{ik} + \Gamma^k_{kl} \Gamma^l_{ij} - \Gamma^k_{jl} \Gamma^l_{ik}$$

Contract the Ricci tensor with the metric $g^{ij}$ to get the Ricci scalar:

$$R = g^{ij} R_{ij}$$

The Ricci tensor and Ricci scalar are important in general relativity, as they appear in the *Einstein field equations* that describe the relationship between the curvature of spacetime and the distribution of matter and energy. The *Einstein field equations* are the fundamental equations of general relativity, describing how matter and energy influence the curvature of spacetime. They are given by:

$$R_{ij} - \frac{1}{2} g_{ij} R = 8 \pi G T_{ij}$$

where: $R_{ij}$ is the Ricci tensor, $R$ is the Ricci scalar, $g_{ij}$ is the metric tensor, $T_{ij}$ is the stress-energy tensor, which describes the distribution of matter and energy in spacetime, $G$ is the gravitational constant.

The Einstein field equations relate the *geometry* of spacetime (represented by the Ricci tensor, Ricci scalar, and metric) to the *matter and energy content* of spacetime (represented by the stress-energy tensor). The term $R_{ij} - \frac{1}{2}g_{ij}R$ describes the curvature of spacetime, and the right-hand side $8\pi G T_{ij}$ describes the matter and energy that cause this curvature. The equations are derived by combining the geometric properties of the Ricci tensor and scalar with physical principles such as the conservation of energy and momentum. In this extremely rigorous derivation, we have covered the following key points:

* The *geodesic equation*, which describes the motion of particles in curved space and involves the Christoffel symbols to account for curvature.

* The *Riemann curvature tensor*, which measures the intrinsic curvature of a manifold and is expressed in terms of the Christoffel symbols and their derivatives.

* The *Ricci tensor* and *Ricci scalar*, which are contractions of the Riemann curvature tensor and describe aspects of curvature related to volume distortion.

* The *Einstein field equations*, which link the geometry of spacetime (curvature) to the matter and energy content through the stress-energy tensor.

These applications of the Christoffel symbols are foundational to the study of Riemannian geometry and general relativity. They provide the framework for understanding the relationship between curvature, geometry, and physical phenomena in both mathematics and physics.
20 References

1. Borisenko, A. I. (1968). Vector and tensor analysis with applications. Courier Corporation.

2. Salençon, J. (2012). Handbook of continuum mechanics: General concepts thermoelasticity. Springer Science and Business Media.

3. Lebedev, L. P., Cloud, M. J., and Eremeyev, V. A. (2010). Tensor analysis with applications in mechanics. World Scientific.

4. Basar, Y., and Weichert, D. (2013). Nonlinear continuum mechanics of solids: fundamental mathematical and physical concepts. Springer Science and Business Media.

5. Papastavridis, J. G. (2018). Tensor calculus and analytical dynamics. Routledge.

6. Sahraee, S., and Wriggers, P. (2023). Representation of Tensorial Variables in Curvilinear Coordinates. In Tensor Calculus and Differential Geometry for Engineers: With Solved Exercises (pp. 169-207). Cham: Springer Nature Switzerland.

7. Naghdi, P. M., and Wainwright, W. L. (1961). On the time derivative of tensors in mechanics of continua. Quarterly of Applied Mathematics, 19(2), 95-109.

8. Shapiro, I. L. (2019). Derivatives of Tensors, Covariant Derivatives. In A Primer in Tensor Analysis and Relativity (pp. 55-65). Cham: Springer International Publishing.

9. Langlois, W. E., Deville, M. O., Langlois, W. E., and Deville, M. O. (2014). Curvilinear Coordinates. Slow Viscous Flow, 81-104.

10. Grinfeld, P. (2013). Introduction to tensor analysis and the calculus of moving surfaces (pp. 135-36). New York: Springer.

11. Bishop, R. L., and Goldberg, S. I. (2012). Tensor analysis on manifolds. Courier Corporation.

12. Do Carmo, M. P. (2016). Differential geometry of curves and surfaces: revised and updated second edition. Courier Dover Publications.

13. Flügge, W. (1972). Tensor analysis and continuum mechanics (p. 153). New York: Springer.

14. Willmore, T. J. (2013). An introduction to differential geometry. Courier Corporation.

15. Boehler, J. P. (1987). Applications of tensor functions in solid mechanics (Vol. 292, pp. 13-30). J. P. Boehler (Ed.). New York: Springer.

16. Synge, J. L., and Schild, A. (1978). Tensor calculus (Vol. 5). Courier Corporation.

17. Guggenheimer, H. W. (2012). Differential geometry. Courier Corporation.

18. Kobayashi, S., and Nomizu, K. (1996). Foundations of differential geometry, volume 2 (Vol. 61). John Wiley and Sons.

19. Lee, J. M., and Lee, J. M. (2012). Smooth manifolds (pp. 1-31). Springer New York.

20. Wald, R. M. (2010). General relativity. University of Chicago press.