17.3 The Divergence in Spherical Coordinates

When you describe vectors in spherical or cylindric coordinates, that is, write vectors as sums of multiples of unit vectors in the directions defined by these coordinates, you encounter a problem in computing derivatives.

The unit vectors themselves change as you change coordinates, so that the change in your vector consists of terms arising from the changes of the multiples and also those from changes in the unit vectors.

We can find neat expressions for the divergence in these coordinate systems by finding vectors pointing in the directions of these unit vectors that have 0 divergence.

Then we write our vector field as a linear combination of these instead of as linear combinations of unit vectors.

By the product rule, the expression for the divergence we seek will be a sum over the three directions of the dot product of one of these vectors with the gradient of its coefficient. The second terms in the product rule will all be 0.

You may very well encounter a need to express divergence in these coordinates in your future life, so we will carry this approach out with spherical coordinates.

First please notice: whenever you differentiate functions in polar coordinates you must treat the origin in them separately and carefully. The coordinates themselves are singular there! The safest thing is to add "except perhaps at r = 0" or some similar statement, unless you are sure that your conclusion is sensible there. Often it will NOT hold at the origin of your coordinates.

Such caviats are omitted below but you should assume that they are present whenever differentiation by a polar parameter is involved.

The only non-trivial step in doing this is finding vectors in the various required directions that have 0 divergence. This can be done by finding the divergence of any vectors in these directions and figuring out what multiple you need apply in each case to cancel its divergence out, again using the product theorem for divergence.

The vector (x, y, z) points in the radial direction in spherical coordinates, which we call the direction. Its divergence is 3.
It can also be written as or as

A multiplier which will convert its divergence to 0 must therefore have, by the product theorem, a gradient that is multiplied by itself.

The function does this very thing, so the 0-divergence function in the direction is

Exercise 17.2 Notice that the divergence of (x, y, 0) otherwise known as r or as rur is 2. What function of r should you multiply it by to get a vector with divergence 0?

The vector (-y, x) points in the direction and has 0 divergence already. It can be written as

The direction is normal to both of these and you can get a vector in it by taking the cross product of (-y, x, 0) and (x, y, z), with result (xz, yz, -r2).
This vector has divergence 2z, and the form rzur - r2uz.

It is the first of these two terms, rzur (which is (xz, yz)) that has the non-vanishing divergence and it is the x and y which lead to it, not the z factor. We can invoke the result of the last exercise to introduce a multiplier that will get rid of that divergence.

The resulting vector has the form whose length is It can therefore be written as

To summarize, the vectors have 0 divergence.

If we define these combinations to be respectively, a vector of the form is also writable as

and its divergence is

or

or

and this is the form of the divergence in spherical coordinates.
In the last line here we used the form of the gradient in spherical coordinates: recall that is a polar variable with radius r and is a polar variable with radius . Also recall that r is sin.

This last expression is not very pretty but it is quite important in physical applications.

It appears in particular in the combination which is called the Laplacian of f.

In rectangular coordinates and spherical coordinates the Laplacian takes the following forms, which follow from the expressions for the gradient and divergence

Exercises:

17.3 Find the divergence of

17.4 Deduce the form of the divergence in cylindric coordinates using the logic used above for spherical coordinates. Apply it to find the Laplacian in cylindric coordinates.