4.06 Gradient Divergence Curl and Laplacian
4.06 Gradient Divergence Curl and Laplacian
4.06 Gradient Divergence Curl and Laplacian
Gradient
For a real-valued function f (x, y, z) on R , the gradient ∇f (x, y, z) is a vector-valued function on R , that is, its value at a point
3 3
∂f ∂f ∂f ∂f ∂f ∂f
∇f (x, y, z) = ( , , ) = i+ j+ k
∂x ∂y ∂z ∂x ∂y ∂z
∂ ∂ ∂
∇ = i+ j+ k. (4.6.1)
∂x ∂y ∂z
∂ ∂ ∂
Here, the symbols , and are to be thought of as “partial derivative operators” that will get “applied” to a real-valued
∂x ∂y ∂z
∂f ∂f ∂f ∂
function, say f (x, y, z) , to produce the partial derivatives , and . For instance, “applied” to
∂x ∂y ∂z ∂x
∂f
f (x, y, z) produces .
∂x
∂ ∂ ∂
Is ∇ really a vector? Strictly speaking, no, since , and are not actual numbers. But it helps to think of ∇ as a vector,
∂x ∂y ∂z
∂ ∂ ∂
especially with the divergence and curl, as we will soon see. The process of “applying” , , to a real-valued function
∂x ∂y ∂z
For this reason, ∇ is often referred to as the “del operator”, since it “operates” on functions.
Divergence
For example, it is often convenient to write the divergence div f as ∇ ⋅ f , since for a vector field
f(x, y, z) = f (x, y, z)i + f (x, y, z)j + f (x, y, z)k , the dot product of f with ∇ (thought of as a vector) makes sense:
1 2 3
∂ ∂ ∂
∇⋅f =( i+ j+ k) ⋅ (f1 (x, y, z)i + f2 (x, y, z)j + f3 (x, y, z)k)
∂x ∂y ∂z
∂ ∂ ∂
=( ) (f1 ) + ( ) (f2 ) + ( ) (f3 )
∂x ∂y ∂z
= div f
We can also write curl f in terms of ∇, namely as ∇×f , since for a vector field
f(x, y, z) = P (x, y, z)i + Q(x, y, z)j + R(x, y, z)k , we have:
∂R ∂Q ∂R ∂P ∂Q ∂P
=( − ) i−( − ) j +( − )k
∂y ∂z ∂x ∂z ∂x ∂y
∂R ∂Q ∂P ∂R ∂Q ∂P
=( − ) i+( − ) j +( − )k
∂y ∂z ∂z ∂x ∂x ∂y
= curl f
∂f ∂f ∂f
For a real-valued function f (x, y, z), the gradient ∇f (x, y, z) = i+ j+ k is a vector field, so we can take its
∂x ∂y ∂z
divergence:
div ∇f = ∇ ⋅ ∇f
∂ ∂ ∂ ∂f ∂f ∂f
=( i+ j+ k) ⋅ ( i+ j+ k)
∂x ∂y ∂z ∂x ∂y ∂z
∂ ∂f ∂ ∂f ∂ ∂f
= ( )+ ( )+ ( )
∂x ∂x ∂y ∂y ∂z ∂z
2 2 2
∂ f ∂ f ∂ f
= + +
∂x2 ∂y 2 ∂z 2
Note that this is a real-valued function, to which we will give a special name:
Example 4.17
b. the divergence of r
c. the curl of r
d. the Laplacian of ∥r∥ 2
Solution:
(a) ∇∥r∥ 2
= 2xi + 2yj + 2zk = 2r
∂ ∂ ∂
(b) ∇ ⋅ r = (x) + (y) + (z) = 1 + 1 + 1 = 3
∂x ∂y ∂z
(c)
∣ i j k ∣
∣ ∣
∣ ∂ ∂ ∂ ∣
∇×r = ∣ ∣ = (0 − 0)i − (0 − 0)j + (0 − 0)k = 0
∣ ∂x ∂y ∂z ∣
∣ ∣
∣ x y z ∣
2
(x
2
+y
2 2
+z ) = 2 +2 +2 = 6
∂x ∂y ∂z
Note that we could have calculated Δ∥r∥ another way, using the ∇ notation along with parts (a) and (b):
2
2 2
Δ∥r∥ = ∇ ⋅ ∇∥r∥ = ∇ ⋅ 2r = 2∇ ⋅ r = 2(3) = 6
Notice that in Example 4.17 if we take the curl of the gradient of ∥r∥ we get 2
2
∇ × (∇∥r∥ ) = ∇ × 2r = 2∇ × r = 20 = 0.
The following theorem shows that this will be the case in general:
Theorem 4.15.
For any smooth real-valued function f (x, y, z), ∇ × (∇f ) = 0 .
Proof
We see by the smoothness of f that
∣ i j k ∣
∣ ∣
∣ ∂ ∂ ∂ ∣
∣ ∣
∇ × (∇f ) = ∂x ∂y ∂z (4.6.3)
∣ ∣
∣ ∣
∂f ∂f ∂f
∣ ∣
∣ ∂x ∂y ∂z ∣
2 2 2 2 2 2
∂ f ∂ f ∂ f ∂ f ∂ f ∂ f
=( − ) i−( − ) j +( − ) k = 0, (4.6.4)
∂y∂z ∂z∂y ∂x∂z ∂z∂x ∂x∂y ∂y∂x
Corollary 4.16
Another way of stating Theorem 4.15 is that gradients are irrotational. Also, notice that in Example 4.17 if we take the divergence
of the curl of r we trivially get
∇ ⋅ (∇ × r) = ∇ ⋅ 0 = 0. (4.6.5)
The following theorem shows that this will be the case in general:
Theorem 4.17.
Corollary 4.18
The flux of the curl of a smooth vector field f (x, y, z) through any closed surface is zero.
Proof: Let Σ be a closed surface which bounds a solid S . The flux of ∇ × f through Σ is
Σ S
=0 (4.6.8)
(QED)
There is another method for proving Theorem 4.15 which can be useful, and is often used in physics. Namely, if the surface integral
∬ f (x, y, z) dσ = 0 for all surfaces Σ in some solid region (usually all of R ), then we must have f (x, y, z) = 0 throughout that
3
region. The proof is not trivial, and physicists do not usually bother to prove it. But the result is true, and can also be applied to
double and triple integrals.
For instance, to prove Theorem 4.15, assume that f (x, y, z) is a smooth real-valued function on R . Let C be a simple closed curve
3
in R and let Σ be any capping surface for C (i.e. Σ is orientable and its boundary is C ). Since ∇f is a vector field, then
3
= 0 by Corollary 4.13.
Since the choice of Σ was arbitrary, then we must have (∇ × (∇f )) ⋅ n = 0 throughout R , where n is any unit vector. Using i, j
3
and k in place of n, we see that we must have ∇ × (∇f ) = 0 in R , which completes the proof.
3
Example 4.18
A system of electric charges has a charge density ρ(x, y, z) and produces an electrostatic field E(x, y, z) at points (x, y, z) in
space. Gauss’ Law states that
∬ E ⋅ dσ = 4π ∭ ρ dV
Σ S
for any closed surface Σ which encloses the charges, with S being the solid region enclosed by Σ . Show that ∇ ⋅ E = 4πρ .
This is one of Maxwell’s Equations.
Solution
By the Divergence Theorem, we have
∭ ∇ ⋅ EdV =∬ E ⋅ dσ
S Σ
∭ (∇ ⋅ E − 4πρ) dV = 0 , so
∇ ⋅ E = 4πρ.
Often (especially in physics) it is convenient to use other coordinate systems when dealing with quantities such as the gradient,
divergence, curl and Laplacian. We will present the formulas for these in cylindrical and spherical coordinates.
Recall from Section 1.7 that a point (x, y, z) can be represented in cylindrical coordinates
(r, θ, z), where x = r cos θ, y = r sin θ, z = z. At each point
Figure 4.6.1 Orthonormal vectors e r, eθ , ez in cylindrical coordinates (left) and spherical coordinates (right).
Similarly, a point be
(x, y, z) represented canin spherical coordinates (ρ, θ, φ), where
x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ. At each point (ρ, θ, φ), let e , e , e be unit vectors in the direction of increasing
ρ θ φ
ρ, θ, φ, respectively (see Figure 4.6.2). Then the vectors e , e , e are orthonormal. By the right-hand rule, we see that
ρ θ φ
e ×e = e
θ ρ . φ
We can now summarize the expressions for the gradient, divergence, curl and Laplacian in Cartesian, cylindrical and spherical
coordinates in the following tables:
Cartesian
(x, y, z) : Scalar function F ; Vector field f = f 1i + f2 j + f3 k
∂F ∂F ∂F
gradient : ∇F = i+ j+ k
∂x ∂y ∂z
Cylindrical
(r, θ, z) : Scalar function F ; Vector field f = f r er + fθ eθ + fz ez
∂F 1 ∂F ∂F
gradient : ∇F = er + eθ + ez
∂r r ∂θ ∂z
1 ∂ 1 ∂fθ ∂fz
divergence : ∇ ⋅ f = (rfr ) + +
r ∂r r ∂θ ∂z
1 ∂fz ∂fθ ∂fr ∂fz 1 ∂ ∂fr
curl : ∇ × f = ( − ) er + ( − ) eθ + ( (rfθ ) − ) ez
r ∂θ ∂z ∂z ∂r r ∂r ∂θ
2 2
1 ∂ ∂F 1 ∂ F ∂ F
Laplacian : ΔF = (r )+
2 2
+
2
r ∂r ∂r r ∂θ ∂z
∂F 1 ∂F 1 ∂F
gradient : ∇F = eρ + eθ + eφ
∂ρ ρ sin φ ∂θ ρ ∂φ
1 ∂ 1 ∂fθ 1 ∂
divergence : ∇ ⋅ f = 2
2
(ρ fρ ) + sin φ + (sin φ fθ )
ρ ∂ρ ρ ∂θ ρ sin φ ∂φ
The derivation of the above formulas for cylindrical and spherical coordinates is straightforward 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.
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 φ ∂θ ρ ∂φ
∂F ∂F ∂F
Idea: In the Cartesian gradient formula ∇F (x, y, z) = i+ j+ k , put the Cartesian basis vectors i, j, k in terms of the
∂x ∂y ∂z
∂F ∂F ∂F
spherical coordinate basis vectors e ρ, eθ , eφ and functions of ρ, θ and φ . Then put the partial derivatives , , in terms
∂x ∂y ∂z
∂F ∂F ∂F
of , , and functions of ρ, θ and φ .
∂ρ ∂θ ∂φ
r xi + yj + zk
eρ = = ,
−−−−−−−−−−
∥r∥ 2 2 2
√x +y +z
−−−−−−−−− −
so using x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ, 2 2
and ρ = √x + y + z
2
, we get:
Now, since the angle θ is measured in the xy-plane, then the unit vector e in the θ direction must be parallel to the xy-plane. That θ
is, e is of the form ai + bj + 0k . To figure out what a and b are, note that since e ⊥ e , then in particular e ⊥ e when
θ θ ρ θ ρ
e is in the xy -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
ρ ρ
eθ = − sin θi + cos θj + 0k
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.
θ
so that
2 2
sin θ(sin φ eρ + cos φ eφ ) + cos θeθ = (sin θ + cos θ)j = j,
and so:
and so:
k = cos φ eρ − sin φ eφ
∂F ∂F ∂F ∂F ∂F ∂F
Step 3: Get formulas for , , in terms of , , .
∂ρ ∂θ ∂φ ∂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 θ (4.6.9)
∂θ ∂x ∂y
∂F ∂F ∂F ∂F
= ρ cos φ cos θ + ρ cos φ sin θ − ρ sin φ
∂φ ∂x ∂y ∂z
∂F ∂F ∂F ∂F ∂F ∂F
Step 4: Use the three formulas from Step 3 to solve for , , in terms of , , .
∂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
2
= (ρ sin φ cos θ − sin θ + sin φ cos φ cos θ )
∂x ρ sin φ ∂ρ ∂θ ∂φ
∂F 1 2
∂F ∂F ∂F
= (ρ sin φ sin θ + cos θ + sin φ cos φ sin θ ) (4.6.10)
∂y ρ sin φ ∂ρ ∂θ ∂φ
∂F 1 ∂F ∂F
= (ρ cos φ − sin φ )
∂z ρ ∂ρ ∂φ
∂F ∂F ∂F
formula ∇F (x, y, z) = i+ j+ k .
∂x ∂y ∂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
2
∇F = (ρ sin φ cos θ − sin θ + sin φ cos φ cos θ ) (sin φ cos θeρ − sin θeθ + cos φ cos θeφ )
ρ sin φ ∂ρ ∂θ ∂φ
1 ∂F ∂F ∂F
2
+ (ρ sin φ sin θ + cos θ + sin φ cos φ sin θ ) (sin φ sin θeρ + cos θeθ + cos φ sin θeφ )
ρ sin φ ∂ρ ∂θ ∂φ
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φ ✓ (4.6.11)
∂ρ ρ sin φ ∂θ ρ ∂φ
Example 4.19
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
ρ
2
1 ∂ ∂F 1 ∂ F 1 ∂ ∂F
2
ΔF = (ρ )+ + (sin φ )
2 2 2 2 2
ρ ∂ρ ∂ρ ρ sin φ ∂θ ρ sin φ ∂φ ∂φ
1 ∂ 2
1 1 ∂
= (ρ 2ρ) + (0) + (sin φ(0))
2 2 2
ρ ∂ρ ρ sin φ ρ sin φ ∂φ
1 ∂ 3
= (2 ρ ) + 0 + 0
2
ρ ∂ρ
1
2
= (6 ρ ) = 6, as expected.
2
ρ
This page titled 4.6: Gradient, Divergence, Curl, and Laplacian is shared under a GNU Free Documentation License 1.3 license and was authored,
remixed, and/or curated by Michael Corral via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit
history is available upon request.