Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

4.6: Gradient, Divergence, Curl, and Laplacian

( \newcommand{\kernel}{\mathrm{null}\,}\)

In this final section we will establish some relationships between the gradient, divergence and curl, and we will also introduce a new quantity called the Laplacian. We will then show how to write these quantities in cylindrical and spherical coordinates.

Gradient

For a real-valued function f(x,y,z) on R3, the gradient f(x,y,z) is a vector-valued function on R3, that is, its value at a point (x,y,z) is the vector

f(x,y,z)=(fx,fy,fz)=fxi+fyj+fzk

in R3, where each of the partial derivatives is evaluated at the point (x,y,z). So in this way, you can think of the symbol as being “applied” to a real-valued function f to produce a vector f.

It turns out that the divergence and curl can also be expressed in terms of the symbol . This is done by thinking of as a vector in R3, namely

(4.6.1)=xi+yj+zk.

Here, the symbols x,y and z are to be thought of as “partial derivative operators” that will get “applied” to a real-valued function, say f(x,y,z), to produce the partial derivatives fx,fy and fz. For instance, x “applied” to f(x,y,z) produces fx.

Is really a vector? Strictly speaking, no, since x,y and z are not actual numbers. But it helps to think of as a vector, especially with the divergence and curl, as we will soon see. The process of “applying” x,y,z to a real-valued function f(x,y,z) is normally thought of as multiplying the quantities:

(x)(f)=fx,(y)(f)=fy,(z)(f)=fz

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)=f1(x,y,z)i+f2(x,y,z)j+f3(x,y,z)k, the dot product of f with (thought of as a vector) makes sense:

(4.6.2)·f=(xi+yj+zk)·(f1(x,y,z)i+f2(x,y,z)j+f3(x,y,z)k)=(x)(f1)+(y)(f2)+(z)(f3)=f1x+f2y+f3z=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:

×f=|ijkxyzP(x,y,z)Q(x,y,z)R(x,y,z)|=(RyQz)i(RxPz)j+(QxPy)k=(RyQz)i+(PzRx)j+(QxPy)k=curl f

For a real-valued function f(x,y,z), the gradient f(x,y,z)=fxi+fyj+fzk is a vector field, so we can take its divergence:

(4.6.3)div f=·f=(xi+yj+zk)·(fxi+fyj+fzk)=x(fx)+y(fy)+z(fz)=2fx2+2fy2+2fz2

Note that this is a real-valued function, to which we will give a special name:

Definition 4.7: Laplacian

For a real-valued function f(x,y,z), the Laplacian of f, denoted by f, is given by

(4.6.4)f(x,y,z)=·f=2fx2+2fy2+2fz2.

Often the notation 2f is used for the Laplacian instead of f, using the convention 2=·.

Example 4.17

Let r(x,y,z)=xi+yj+zk be the position vector field on R3. Then r(x,y,z)2=r·r=x2+y2+z2 is a real-valued function. Find

  1. the gradient of r2
  2. the divergence of r
  3. the curl of r
  4. the Laplacian of r2

Solution:

(a) r2=2xi+2yj+2zk=2r

(b) ·r=x(x)+y(y)+z(z)=1+1+1=3

(c)

×r=|ijkxyzxyz|=(00)i(00)j+(00)k=0

(d) r2=2x2(x2+y2+z2)+2y2(x2+y2+z2)+2z2(x2+y2+z2)=2+2+2=6

Note that we could have calculated r2 another way, using the notation along with parts (a) and (b):

r2=·r2=·2r=2·r=2(3)=6

Notice that in Example 4.17 if we take the curl of the gradient of r2 we get

×(r2)=×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

(4.6.5)×(f)=|ijkxyzfxfyfz|(4.6.6)=(2fyz2fzy)i(2fxz2fzx)j+(2fxy2fyx)k=0,

since the mixed partial derivatives in each component are equal.

Corollary 4.16

If a vector field f(x,y,z) has a potential, then curl f=0.

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

(4.6.7)·(×r)=·0=0.

The following theorem shows that this will be the case in general:

Theorem 4.17.

For any smooth vector field f(x,y,z),·(×f)=0.

The proof is straightforward and left as an exercise for the reader.

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

(4.6.8)Σ(×f)·dσ=S·(×f)dV (by the Divergence Theorem)(4.6.9)=S0dV (by Theorem 4.17)(4.6.10)=0

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 R3 ), then we must have f(x,y,z)=0 throughout that 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 R3. Let C be a simple closed curve in R3 and let Σ be any capping surface for C (i.e. Σ is orientable and its boundary is C). Since f is a vector field, then

(4.6.11)Σ(×(f))·ndσ=Cf·dr by Stokes’ Theorem, so=0 by Corollary 4.13.

Since the choice of Σ was arbitrary, then we must have (×(f))·n=0 throughout R3, where n is any unit vector. Using i, j and k in place of n, we see that we must have ×(f)=0 in R3, which completes the proof.

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πSρdV

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

(4.6.12)S·EdV=ΣE·dσ=4πSρdV by Gauss’ Law, so combining the integrals givesS(·E4πρ)dV=0 , so·E4πρ=0 since Σ and hence S was arbitrary, 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=rcosθ,y=rsinθ,z=z. At each point (r,θ,z), let er,eθ,ez be unit vectors in the direction of increasing r,θ,z, respectively (see Figure 4.6.1). Then er,eθ,ez form an orthonormal set of vectors. Note, by the right-hand rule, that ez×er=eθ.

altalt
Figure 4.6.1 Orthonormal vectors er,eθ,ez in cylindrical coordinates (left) and spherical coordinates (right).

Similarly, a point (x,y,z) can be represented in 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=f1i+f2j+f3k

  • gradient : F=Fxi+Fyj+Fzk
  • divergence : ·f=f1x+f2y+f3z
  • curl : ×f=(f3yf2z)i+(f1zf3x)j+(f2xf1y)k
  • Laplacian : F=2Fx2+2Fy2+2Fz2

Cylindrical

(r,θ,z): Scalar function F; Vector field f=frer+fθeθ+fzez

  • gradient : F=Frer+1rFθeθ+Fzez
  • divergence : ·f=1rr(rfr)+1rfθθ+fzz
  • curl : ×f=(1rfzθfθz)er+(frzfzr)eθ+1r(r(rfθ)frθ)ez
  • Laplacian : F=1rr(rFr)+1r22Fθ2+2Fz2

Spherical

(ρ,θ,φ): Scalar function F; Vector field f=fρeρ+fθeθ+fφeφ

  • gradient : F=Fρeρ+1ρsinφFθeθ+1ρFφeφ
  • divergence : ·f=1ρ2ρ(ρ2fρ)+1ρsinφfθθ+1ρsinφφ(sinφfθ)
  • curl : ×f=1ρsinφ(φ(sinφfθ)fφθ)eρ+1ρ(ρ(ρfφ)fρφ)eθ+(1ρsinφfρθ1ρρ(ρfθ))eφ
  • Laplacian : F=1ρ2ρ(ρ2Fρ)+1ρ2sin2φ2Fθ2+1ρ2sinφφ(sinφFφ)

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=Fρeρ+1ρsinφFθeθ+1ρFφeφ

Idea: In the Cartesian gradient formula F(x,y,z)=Fxi+Fyj+Fzk, put the Cartesian basis vectors i, j, k in terms of the spherical coordinate basis vectors eρ,eθ,eφ and functions of ρ,θ and φ. Then put the partial derivatives Fx,Fy,Fz in terms of Fρ,Fθ,Fφ and functions 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ρ=rr, where r=xi+yj+zk is the position vector of the point in Cartesian coordinates. Thus,

eρ=rr=xi+yj+zkx2+y2+z2,

so using x=ρsinφcosθ,y=ρsinφsinθ,z=ρcosφ, and ρ=x2+y2+z2, we get:

eρ=sinφcosθi+sinφsinθj+cosφk

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 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θjsinφ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

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 Fx,Fy,Fz.

By the Chain Rule, we have

(4.6.13)Fρ=Fxxρ+Fyyρ+Fzzρ,Fθ=Fxxθ+Fyyθ+Fzzθ,Fφ=Fxxφ+Fyyφ+Fzzφ,

which yields:

(4.6.14)Fρ=sinφcosθFx+sinφsinθFy+cosφFzFθ=ρsinφsinθFx+ρsinφcosθFyFφ=ρcosφcosθFx+ρcosφsinθFyρsinφFz

Step 4: Use the three formulas from Step 3 to solve for Fx,Fy,Fz in terms of Fρ,Fθ,Fφ.

Again, this involves solving a system of three equations in three unknowns. Using a similar process of elimination as in Step 2, we get:

(4.6.15)Fx=1ρsinφ(ρsin2φcosθFρsinθFθ+sinφcosφcosθFφ)Fy=1ρsinφ(ρsin2φsinθFρ+cosθFθ+sinφcosφsinθFφ)Fz=1ρ(ρcosφFρsinφFφ)

Step 5: Substitute the formulas for i, j, k from Step 2 and the formulas for Fx,Fy,Fz from Step 4 into the Cartesian gradient formula F(x,y,z)=Fxi+Fyj+Fzk.

Doing this last step is perhaps the most tedious, since it involves simplifying 3×3+3×3+2×2=22 terms! Namely,

(4.6.16)F=1ρsinφ(ρsin2φcosθFρsinθFθ+sinφcosφcosθFφ)(sinφcosθeρsinθeθ+cosφcosθeφ)+1ρsinφ(ρsin2φsinθFρ+cosθFθ+sinφcosφsinθFφ)(sinφsinθeρ+cosθeθ+cosφsinθeφ)+1ρ(ρcosφFρsinφFφ)(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:

(4.6.17)F=Fρeρ+1ρsinφFθeθ+1ρFφeφ

Example 4.19

In Example 4.17 we showed that r2=2r and r2=6, where r(x,y,z)=xi+yj+zk in Cartesian coordinates. Verify that we get the same answers if we switch to spherical coordinates.

Solution

Since r2=x2+y2+z2=ρ2 in spherical coordinates, let F(ρ,θ,φ)=ρ2 (so that F(ρ,θ,φ)=r2 ). The gradient of F in spherical coordinates is

(4.6.18)F=Fρeρ+1ρsinφFθeθ+1ρFφeφ=2ρeρ+1ρsinφ(0)eθ+1ρ(0)eφ=2ρeρ=2ρrr, as we showed earlier, so=2ρrρ=2r, as expected. And the Laplacian isF=1ρ2ρ(ρ2Fρ)+1ρ2sin2φ2Fθ2+1ρ2sinφφ(sinφFφ)=1ρ2ρ(ρ22ρ)+1ρ2sinφ(0)+1ρ2sinφφ(sinφ(0))=1ρ2ρ(2ρ3)+0+0=1ρ2(6ρ2)=6, as expected.


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.

  • Was this article helpful?

Support Center

How can we help?