Home | 18.013A | Chapter 17 | | Tools Glossary Index Up Previous Next

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 ρ u ^ ρ .

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

The function 1 ρ 3 does this very thing, so the 0-divergence function in the ρ direction is u ^ ρ ρ 2 .

Exercise 17.2 Notice that the divergence of ( x , y , 0 ) otherwise known as r or as r u ^ r 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 r u ^ θ .

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 ( x z , y z , − r 2 ) .
This vector has divergence 2 z , and the form r z u ^ r − r 2 u ^ z .

It is the first of these two terms, r z u ^ r (which is ( x z , y z ) ) 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 z u ^ r r − u ^ z whose length is ( z r ) 2 + 1 or ( z 2 + r 2 r 2 ) 2 or ρ r or 1 sin ⁡ φ . It can therefore be written as u ^ φ sin ⁡ φ .

To summarize, the vectors u ^ ρ ρ 2 , r u ^ θ and u ^ φ sin ⁡ φ have 0 divergence.

If we define these combinations to be p ⟶ ρ , p ⟶ θ , p ⟶ φ , respectively, a vector of the form v 1 u ^ ρ + v 2 u ^ θ + v 3 u ^ φ is also writable as

p ⟶ ρ ρ 2 v 1 + p ⟶ θ v 2 r + p ⟶ φ sin ⁡ φ v 3

and its divergence is

p ⟶ ρ · ∇ ⟶ ( ρ 2 v 1 ) + p ⟶ θ · ∇ ⟶ ( v 2 r ) + p ⟶ φ · ∇ ⟶ ( sin ⁡ φ v 3 )

or

u ^ ρ ρ 2 · ∇ ⟶ ( ρ 2 v 1 ) + r u ^ θ · ∇ ⟶ ( v 2 r ) + u ^ φ sin ⁡ φ · ∇ ⟶ ( sin ⁡ φ v 3 )

or

1 ρ 2 ∂ ∂ ρ ( ρ 2 v 1 ) + 1 r ∂ ∂ θ ( v 2 ) + 1 ρ sin ⁡ φ ∂ ∂ φ ( sin ⁡ φ v 3 )

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 ( ∇ ⟶ · ∇ ⟶ ) f 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

( ∇ ⟶ · ∇ ⟶ ) f = ( ∂ 2 ∂ x 2 + ∂ 2 ∂ y 2 + ∂ 2 ∂ z 2 ) f = ( 1 ρ 2 ∂ ∂ ρ ρ 2 ∂ ∂ ρ + 1 ( ρ sin ⁡ φ ) 2 ∂ 2 ∂ θ 2 + ρ − 2 1 sin ⁡ φ ∂ ∂ φ sin ⁡ φ ∂ ∂ φ ) f

Exercises:

17.3 Find the divergence of r ⟶ r 2 and of z ⟶ z .

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.

Up Previous Next