Where does the formula for gradient and divergence come for curvilinear systems come from?

519 Views Asked by At

can anyone help me understand where the formula for the gradient and divergence in spherical and cylindrical coordinates? I am currently in a vector calculus course and I am having trouble reaching an intuitive understanding of curvilinear systems. Thanks in advance :D

1

There are 1 best solutions below

0
On BEST ANSWER

Essentially what is happening is that in curvilinear coordinates, the basis vectors for the space where vector fields live (the tangent space, or strictly speaking, tangent bundle) are no longer the same at every point of space. (You actually already know this: the (unit) vector in the direction of increasing $r$, $\mathbf{e}_r$, points in different directions for different $\mathbf{x}$, whereas, for example, the Cartesian unit vector $\hat{\mathbf{x}}$ does not.)

It is worth stressing that vector fields do not live in the same space as the positions/points: if the space is a small chunk of $\mathbb{R}^3$, we can still have vector fields with values as far out as we like in $\mathbb{R}^3$. Or think about vector fields on a surface: for example, the wind on a planet's surface has a direction and length at each point, so by itself has nothing to do with the curvature of the surface; that comes from joining it up over larger areas. And lastly, the position of the origin is irrelevant for positions (remember that we choose it), but a vector field very much cares whether it is zero or not at a point: if it is, it doesn't have a well-defined direction, for one thing.

Therefore in order to talk about how a scalar or vector field changes from point to point (i.e. take derivatives), we need to account for the way the basis vectors change, as well as how the field itself changes.

For all vector derivatives, the problem is that changing one coordinate by a certain amount does not result in a change that is the same everywhere (and hence looks like a unit vector). An easy example to understand is the angle variable in polar coordinates: if I change $\theta$ by a certain amount, the actual distance the point moves depends on the radius: changing $\theta$ by $\delta\theta$ causes the point to move a length $\delta s = r\delta \theta$, as it moves along the circle of radius $r$. This is a good example to keep in mind when working through formulae.


Now let's look at the gradient, with this in mind. The gradient satisfies the useful relationship (or, depending on the approach used, has the definition) $$ \left.\frac{d}{dt} f(\mathbf{x}+t\mathbf{n}) \right|_{t=0} = \mathbf{n} \cdot \nabla f(\mathbf{x}). $$ The nice thing about this definition is that it doesn't care what the coordinates are: no coordinates appear here. This means that we can change the basis, and use this to write down the right definition of $\nabla f$ in the new coordinates. We just use the chain rule to do this. In Cartesians, the above definition gives the familiar $$ \nabla f = \sum_i \mathbf{e}_i \frac{\partial f}{\partial x_i}, $$ where $\mathbf{e}_i$ is the unit vector in the direction in which the $i$th coordinate is increasing. If now $x_i$ is a function of new coordinates $u_a$ with unit vectors $\mathbf{E}_a$, $$ \mathbf{n} \cdot \nabla f = \sum_{i,a,b} n_{a} \mathbf{E}_a \cdot \left( \mathbf{e}_i \frac{\partial u_b}{\partial x_i} \frac{\partial f}{\partial u_b} \right) = \sum_{i,a,b} n_{a} \mathbf{E}_a \cdot (\nabla u_b) \frac{\partial f}{\partial u_b}. $$ The last factor is the new derivatives we want. The first term is the component of $\mathbf{n}$. The middle term is the awkward bit: this is expressible as $ \sum_c \left(\mathbf{E}_c \cdot \nabla u_b \right) \mathbf{E}_c $, so in the new coordinates, $$ \nabla f = \sum_{b} \sum_c \left(\mathbf{E}_c \cdot \nabla u_b \right) \mathbf{E}_c \frac{\partial f}{\partial u_b}, $$ and the key to understanding the scale factors is the matrix $\mathbf{E}_c \cdot \nabla u_b$.

In the case of orthogonal coordinates, this matrix turns out to be diagonal (indeed, this may be taken as the definition of orthogonal). To return to the polar coordinates example $ r = \sqrt{x^2+y^2} $, $\theta = \arctan{(y/x)}$ (or equivalent to make $\theta$ continuous), we compute in the old coordinates $$ \frac{\partial r}{\partial x} = \frac{x}{r}, \qquad \frac{\partial r}{\partial y} = \frac{y}{r}, \\ \frac{\partial \theta}{\partial x} = -\frac{y}{r^2}, \qquad \frac{\partial \theta}{\partial y} = \frac{x}{r^2}, $$ and then $$ \nabla r = \frac{x}{r} \mathbf{e}_x + \frac{y}{r} \mathbf{e}_y, \qquad \nabla \theta = -\frac{y}{r^2} \mathbf{e}_x + \frac{x}{r^2} \mathbf{e}_y $$ (we had to do it this way since we only know what $\nabla f$ is in Cartesians at present). Then the new basis vectors are $$ \mathbf{E}_r = \frac{x}{r} \mathbf{e}_x + \frac{y}{r} \mathbf{e}_y, \qquad \mathbf{E}_{\theta} = -\frac{y}{r} \mathbf{e}_x + \frac{x}{r} \mathbf{e}_y $$ by a tedious computation involving rotation matrices, and hence $$ \nabla r = \mathbf{E}_r, \qquad \nabla \theta = \frac{1}{r}\mathbf{E}_{\theta}. $$ Thus in polar coordinates, $$ \nabla f = \mathbf{E}_r \frac{\partial f}{\partial r} + \mathbf{E}_{\theta} \frac{1}{r} \frac{\partial f}{\partial \theta}. $$ The calculations for cylindricals and sphericals can be done in exactly the same way, but are more complicated (especially sphericals).


The divergence is rather different, in that we are going from a vector field to a scalar one. This means that we have to take into account the derivatives of the basis vectors. But this is not the easiest way to get at the formulae: the following is a nice trick to make things easier.

Green's identity gives $$ \int_V \nabla \varphi \cdot \mathbf{F} \, dV = \int_S \varphi \mathbf{F} \cdot d\mathbf{S} - \int_V \varphi \nabla \cdot \mathbf{F} \, dV. $$ This again has the magic property of being coordinate-independent. The left-hand side we know about since we know now how to find the gradient. The right-hand side has the divergence. But we can write this out component by component and use ordinary integration by parts to find a coordinate expression for the right-hand side. All we need is how $dV$ relates to $du_1 \dotsm du_n$. But of course this is just the Jacobian from Cartesians, say $J$. Then we find using integration by parts that $$ \nabla \cdot \mathbf{F} = \sum_{a,b} \frac{1}{J} \frac{\partial}{\partial u_a} \left( J (\mathbf{E}_b \cdot \nabla u_a) F_b \right). $$ Often, $J$ is independent of some of the coordinates or a product, so bits cancel. For example, in polar coordinates, $dV = r \, dr \, d\theta$, so $J=r$, and $$ \nabla \cdot \mathbf{F} = \frac{1}{r} \frac{\partial}{\partial r} (rF_r) + \frac{1}{r} \frac{\partial }{\partial \theta } (r\frac{1}{r}F_{\theta}) = \frac{1}{r} \frac{\partial}{\partial r} (rF_r) + \frac{1}{r} \frac{\partial }{\partial \theta } F_{\theta}. $$


The calculation is the same in cylindrical and spherical coordinates, but much more annoying in sphericals (cylindricals are basically polars with an extra Cartesian axis, so the formulae all just have an extra $z$ term inherited from Cartesians, basically).