ρ 2 ∂F
+
+
sin φ
ρ 2 ∂ρ
∂ρ
ρ 2 sin2 φ ∂θ 2
ρ 2 sin φ ∂φ
∂φ
The derivation of the above formulas for cylindrical and spherical coordinates is straight-
forward but extremely tedious. The basic idea is to take the Cartesian equivalent of the
quantity in question and to substitute into that formula using the appropriate coordinate
transformation. As an example, we will derive the formula for the gradient in spherical
coordinates.
4.6 Gradient, Divergence, Curl and Laplacian
183
Goal: Show that the gradient of a real-valued function F( ρ, θ, φ) in spherical coordinates is:
∂F
1
∂F
1 ∂F
∇ F =
e ρ +
e θ +
e φ
∂ρ
ρ sin φ ∂θ
ρ ∂φ
Idea: In the Cartesian gradient formula ∇ F( x, y, z) = ∂F i
j
k, put the Cartesian ba-
∂x
+ ∂F
∂ y
+ ∂F
∂z
sis vectors i, j, k in terms of the spherical coordinate basis vectors e ρ, e θ, e φ and functions of ρ, θ and φ. Then put the partial derivatives ∂F , ∂F , ∂F in terms of ∂F , ∂F , ∂F and functions
∂x
∂ y
∂z
∂ρ
∂θ
∂φ
of ρ, θ and φ.
Step 1: Get formulas for e ρ, e θ, e φ in terms of i, j, k.
We can see from Figure 4.6.2 that the unit vector e ρ in the ρ direction at a general point
( ρ, θ, φ) is e ρ = r , where r
r
= x i + yj + z k is the position vector of the point in Cartesian
coordinates. Thus,
r
x i + yj + z k
e ρ =
=
,
r
x 2 + y 2 + z 2
so using x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ, and ρ =
x 2 + y 2 + z 2, we get:
e ρ = sin φ cos θ i + sin φ sin θ j + cos φk
Now, since the angle θ is measured in the x y-plane, then the unit vector e θ in the θ
direction must be parallel to the x y-plane. That is, e θ is of the form a i + b j + 0k. To figure out what a and b are, note that since e θ ⊥ e ρ, then in particular e θ ⊥ e ρ when e ρ is in the x y-plane. That occurs when the angle φ is π/2. Putting φ = π/2 into the formula for e ρ gives
e ρ = cos θ i+sin θ j+0k, and we see that a vector perpendicular to that is −sin θ i+cos θ j+0k.
Since this vector is also a unit vector and points in the (positive) θ direction, it must be e θ:
e θ = −sin θ i + cos θ j + 0k
Lastly, since e φ = e θ × e ρ, we get:
e φ = cos φ cos θ i + cos φ sin θ j − sin φk
Step 2: Use the three formulas from Step 1 to solve for i, j, k in terms of e ρ, e θ, e φ.
This comes down to solving a system of three equations in three unknowns. There are
many ways of doing this, but we will do it by combining the formulas for e ρ and e φ to
eliminate k, which will give us an equation involving just i and j. This, with the formula for
e θ, will then leave us with a system of two equations in two unknowns (i and j), which we
will use to solve first for j then for i. Lastly, we will solve for k.
First, note that
sin φ e ρ + cos φe φ = cos θ i + sin θ j
184
CHAPTER 4. LINE AND SURFACE INTEGRALS
so that
sin θ (sin φ e ρ + cos φe φ) + cos θ e θ = (sin2 θ + cos2 θ)j = j , and so:
j = sin φ sin θ e ρ + cos θ e θ + cos φ sin θ e φ
Likewise, we see that
cos θ (sin φ e ρ + cos φe φ) − sin θ e θ = (cos2 θ + sin2 θ)i = i , and so:
i = sin φ cos θ e ρ − sin θ e θ + cos φ cos θ e φ
Lastly, we see that:
k = cos φe ρ − sin φe φ
Step 3: Get formulas for ∂F , ∂F , ∂F in terms of ∂F , ∂F , ∂F .
∂ρ
∂θ
∂φ
∂x
∂ y
∂z
By the Chain Rule, we have
∂F
∂F ∂x
∂F ∂y
∂F ∂z
=
+
+
,
∂ρ
∂x ∂ρ
∂y ∂ρ
∂z ∂ρ
∂F
∂F ∂x
∂F ∂y
∂F ∂z
=
+
+
,
∂θ
∂x ∂θ
∂y ∂θ
∂z ∂θ
∂F
∂F ∂x
∂F ∂y
∂F ∂z
=
+
+
,
∂φ
∂x ∂φ
∂y ∂φ
∂z ∂φ
which yields:
∂F
∂F
∂F
∂F
= sin φ cos θ
+ sin φ sin θ
+ cos φ
∂ρ
∂x
∂y
∂z
∂F
∂F
∂F
= − ρ sin φ sin θ
+ ρ sin φ cos θ
∂θ
∂x
∂y
∂F
∂F
∂F
∂F
= ρ cos φ cos θ
+ ρ cos φ sin θ
− ρ sin φ
∂φ
∂x
∂y
∂z
Step 4: Use the three formulas from Step 3 to solve for ∂F , ∂F , ∂F in terms of ∂F , ∂F , ∂F .
∂x
∂ y
∂z
∂ρ
∂θ
∂φ
Again, this involves solving a system of three equations in three unknowns. Using a
similar process of elimination as in Step 2, we get:
∂F
1
∂F
∂F
∂F
=
ρ sin2 φ cos θ
− sin θ
+ sin φ cos φ cos θ
∂x
ρ sin φ
∂ρ
∂θ
∂φ
∂F
1
∂F
∂F
∂F
=
ρ sin2 φ sin θ
+ cos θ
+ sin φ cos φ sin θ
∂y
ρ sin φ
∂ρ
∂θ
∂φ
∂F
1
∂F
∂F
=
ρ cos φ
− sin φ
∂z
ρ
∂ρ
∂φ
4.6 Gradient, Divergence, Curl and Laplacian
185
Step 5: Substitute the formulas for i, j, k from Step 2 and the formulas for ∂F , ∂F , ∂F from
∂x
∂ y
∂z
Step 4 into the Cartesian gradient formula ∇ F( x, y, z) = ∂F i
j
k.
∂x
+ ∂F
∂ y
+ ∂F
∂z
Doing this last step is perhaps the most tedious, since it involves simplifying 3 ×3+3×3+
2 × 2 = 22 terms! Namely,
1
∂F
∂F
∂F
∇ F =
ρ sin2 φ cos θ
− sin θ
+ sin φ cos φ cos θ
(sin φ cos θ e ρ − sin θ e θ
ρ sin φ
∂ρ
∂θ
∂φ
+ cos φ cos θ e φ)
1
∂F
∂F
∂F
+
ρ sin2 φ sin θ
+ cos θ
+ sin φ cos φ sin θ
(sin φ sin θ e ρ + cos θ e θ
ρ sin φ
∂ρ
∂θ
∂φ
+ cos φ sin θ e φ)
1
∂F
∂F
+
ρ cos φ
− sin φ
(cos φ e ρ − sin φe φ) ,
ρ
∂ρ
∂φ
which we see has 8 terms involving e ρ, 6 terms involving e θ, and 8 terms involving e φ. But
the algebra is straightforward and yields the desired result:
∂F
1
∂F
1 ∂F
∇ F =
e ρ +
e θ +
e φ
∂ρ
ρ sin φ ∂θ
ρ ∂φ
Example 4.19. In Example 4.17 we showed that ∇ r 2 = 2r and ∆ r 2 = 6, where r( x, y, z) =
x i + yj + z k in Cartesian coordinates. Verify that we get the same answers if we switch to
spherical coordinates.
Solution: Since r 2 = x 2 + y 2 + z 2 = ρ 2 in spherical coordinates, let F( ρ, θ, φ) = ρ 2 (so that F( ρ, θ, φ) = r 2). The gradient of F in spherical coordinates is
∂F
1
∂F
1 ∂F
∇ F =
e ρ +
e θ +
e φ
∂ρ
ρ sin φ ∂θ
ρ ∂φ
1
1
= 2 ρ e ρ +
(0) e θ +
(0) e φ
ρ sin φ
ρ
r
= 2 ρ e ρ = 2 ρ
, as we showed earlier, so
r
r
= 2 ρ
= 2r , as expected. And the Laplacian is
ρ
1 ∂
1
∂ 2 F
1
∂
∂F
∆ F =
ρ 2 ∂F
+
+
sin φ
ρ 2 ∂ρ
∂ρ
ρ 2 sin2 φ ∂θ 2
ρ 2 sin φ ∂φ
∂φ
1 ∂
1
1
∂
=
( ρ 2 2 ρ) +
(0) +
sin φ (0)
ρ 2 ∂ρ
ρ 2 sin φ
ρ 2 sin φ ∂φ
1 ∂
=
(2 ρ 3) + 0 + 0
ρ 2 ∂ρ
1
=
(6 ρ 2) = 6 , as expected.
ρ 2
186
CHAPTER 4. LINE AND SURFACE INTEGRALS
Exercises
A
For Exercises 1-6, find the Laplacian of the function f ( x, y, z) in Cartesian coordinates.
1. f ( x, y, z) = x + y + z
2. f ( x, y, z) = x 5
3. f ( x, y, z) = ( x 2 + y 2 + z 2)3/2
4. f ( x, y, z) = ex+ y+ z
5. f ( x, y, z) = x 3 + y 3 + z 3
6. f ( x, y, z) = e− x 2− y 2− z 2
7. Find the Laplacian of the function in Exercise 3 in spherical coordinates.