Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random |  
Login
create new user
Username:
Password:
forget your password?
Main Menu
Sections

Meta

Talkback

Downloads

Information
[parent] Antennas Electromagnetic Waves (Example)

Electromagnetic Waves, Antennas, and RF: Gradient, Divergence, and Curl - Exercises and Complete Worked Solutions

This companion article provides self-study exercises for EM03, Spatial Derivatives of fields: gradient, divergence, and curl. All exercises are stated first. Complete worked solutions follow in Part II.

The goal is not only to compute formulas mechanically, but also to connect each differential operator with its physical meaning:

  • the gradient of a scalar field points in the direction of fastest increase,
  • the divergence of a vector field measures local source or sink strength, and
  • the curl of a vector field measures local oriented circulation.

The central definitions used throughout are

--------------------------
|       ∂      ∂      ∂  |
|∇ =  ˆx--- + ˆy--- + ˆz---.|
-------∂x-----∂y-----∂z---
(1)

For a scalar field ϕ(x,y,z),

|--------------------------|
|        ∂ϕ     ∂ϕ     ∂ϕ  |
|∇ ϕ = ˆx ---+ ˆy ---+  ˆz---.|
---------∂x-----∂y-----∂z--
(2)

For a vector field A = Axx + Ayy + Azz,

|----------------------------|
|         ∂Ax-   ∂Ay-   ∂Az- |
|∇ ⋅ A =  ∂x  +   ∂y  +  ∂z  |
-----------------------------
(3)

and

|---------(-------------)-----(------------)-----(-------------)---|
|           ∂Az-   ∂Ay-         ∂Ax-   ∂Az-        ∂Ay-   ∂Ax-     |
|∇ × A  =    ∂y  −  ∂z    ˆx +    ∂z −   ∂x   ˆy +    ∂x  −  ∂y    ˆz.|
-------------------------------------------------------------------
(4)

The directional derivative of a scalar field in the unit direction n is

|--------------|
D-ˆnϕ-=--∇-ϕ-⋅ ˆn.
(5)

For plane-wave phase,

|------------------|
𝜃(r,t) = k ⋅ r − ωt,
--------------------
(6)

so that

|--------|
|∇ 𝜃 = k.|
----------
(7)

These are the same conventions developed in EM03 and in standard references on vector calculus and electrodynamics [1234].

How to use this problem set

Attempt all exercises in Part I before reading Part II. For each answer, keep three questions separate:

  1. What is the operator acting on?
  2. What kind of object should the result be: scalar or vector?
  3. What local physical or geometric meaning does the result have?

Many mistakes in vector calculus are not arithmetic errors but type errors: for example, expecting a scalar from a gradient or expecting a vector from a divergence.

Part I: Exercises

Exercise 1: partial derivatives of a scalar field

Let

ϕ (x, y,z) = x2y + 3yz − z2.
(8)

Compute

∂-ϕ      ∂ϕ-      ∂ϕ-
∂x ,     ∂y ,     ∂z.
(9)

Exercise 2: gradient at a point

Let

             2     2
ϕ (x,y,z) = x  + 2y  + z.
(10)

Find:

  1. ϕ;
  2. ϕ at the point (1,1, 2);
  3. the magnitude |∇ϕ| at that point;
  4. the unit direction of fastest increase at that point.

PIC

Figure. The gradient is normal to level curves and points toward larger scalar-field values.

Exercise 3: directional derivative

Using the scalar field from Exercise 2, find the directional derivative at (1,1, 2) in the unit direction

     1---   -1--
ˆn =  √2-ˆx + √2-ˆy.
(11)

Interpret the sign of the result.

Exercise 4: level surfaces and normals

Consider the scalar field

ϕ (x,y,z) = x + 2y − z.
(12)

Show that the surfaces ϕ = C are planes. Find a normal vector to these planes and explain its relation to the gradient.

Exercise 5: divergence of a linear field

Let

A(x, y,z) = xˆx − 2y ˆy + 3zˆz.
(13)

Compute ∇⋅ A and state whether the field behaves locally like a net source, a net sink, or neither.

Exercise 6: zero-divergence field

Let

B (x,y,z ) = − yxˆ+ xˆy.
(14)

Compute ∇⋅ B and interpret the result physically.

PIC

Figure. Divergence compares local outward and inward flux through a small closed box.

Exercise 7: divergence as flux density

A vector field is

F(x, y,z) = 2xˆx + yyˆ.
(15)

At the point (1, 2, 0):

  1. compute ∇⋅ F;
  2. estimate the net outward flux through a small rectangular box of volume
                 3
ΔV  = 0.02 m
    (16)

    centered at that point using the local relation

    net outward flux ≈  (∇ ⋅ F )ΔV.
    (17)

Exercise 8: curl of a rotational field

Let

C (x,y, z) = − yxˆ+ xˆy.
(18)

Compute ∇× C.

Exercise 9: curl of a gradient field

Let

ψ(x,y, z) = x2 + y2 + z2
(19)

and let

G  = ∇ ψ.
(20)

Find G and then compute ∇× G.

PIC

Figure. Curl measures the oriented circulation tendency around a small loop.

Exercise 10: compare zero divergence and zero curl

For the two vector fields

U  = xxˆ+  yˆy
(21)

and

V  = − yˆx + xˆy,
(22)

compute both ∇⋅ and ∇× for each field. Which field is source-like? Which field is rotational?

Exercise 11: gradient of plane-wave phase

Let the phase be

𝜃(x,y,z,t) = 2x − 3y + 4z − ωt.
(23)

Find:

  1. 𝜃;
  2. the wave vector k;
  3. the magnitude |k|.

PIC

Figure. For a plane wave, the gradient of phase is the wave vector, normal to constant-phase planes.

Exercise 12: gradient of a scalar plane wave

Let

ψ (x, t) = ψ0 cos(kx − ωt ).
(24)

Treat this as a three-dimensional scalar field that depends only on x.

Find:

  1. ∂ψ∕∂x;
  2. ψ;
  3. the direction of ψ.

Exercise 13: divergence and curl of a transverse field

Let

E (z,t) = E0 cos(kz − ωt)ˆx.
(25)

Compute:

  1. ∇⋅ E;
  2. ∇× E.

State clearly whether each result is zero or nonzero.

Exercise 14: identify the operator type and meaning

For each expression below, state whether the result is a scalar or a vector, and give its local physical meaning.

  1. ϕ;
  2. ∇⋅ A;
  3. ∇× A;
  4. 𝜃 for 𝜃 = k r ωt.

Part II: Complete worked solutions

Solution 1: partial derivatives of a scalar field

Given

ϕ (x, y,z) = x2y + 3yz − z2,
(26)

we differentiate with respect to one variable at a time while holding the others fixed.

For x,

∂ϕ-=  2xy.
∂x
(27)

For y,

∂ϕ-    2
∂y =  x +  3z.
(28)

For z,

∂ϕ-=  3y − 2z.
∂z
(29)

Therefore,

|------------------------------------------------|
|∂ϕ             ∂ϕ                 ∂ϕ            |
|---=  2xy,     ---=  x2 + 3z,     ---=  3y − 2z.|
-∂x-------------∂y-----------------∂z-------------
(30)

Solution 2: gradient at a point

The field is

ϕ (x,y,z) = x2 + 2y2 + z.
(31)

Its partial derivatives are

∂ϕ-=  2x,     ∂ϕ-=  4y,     ∂ϕ-=  1.
∂x            ∂y            ∂z
(32)

Hence

|----------------------|
|∇ ϕ = 2x ˆx + 4yˆy + ˆz. |
-----------------------
(33)

At (1,1, 2),

|----------------------------|
|∇ ϕ(1,− 1,2) = 2ˆx − 4yˆ+  ˆz.|
-----------------------------
(34)

Its magnitude is

          ----------------
|∇ ϕ| = ∘ 22 + (− 4 )2 + 12 = √21.
(35)

Thus

|----------------------|
|                √ --- |
-|∇-ϕ(1,−-1,2)| =--21.-
(36)

The unit direction of fastest increase is the normalized gradient:

|------------------|
|ˆu =  2ˆx-−√-4ˆy-+-ˆz-.|
-----------21------|
(37)

Solution 3: directional derivative

From Solution 2,

∇ ϕ(1,− 1,2) = 2ˆx − 4yˆ+  ˆz.
(38)

The unit direction is

ˆn =  1√--ˆx + √1-ˆy.
      2       2
(39)

Therefore,

                           (           )
                              1   1
D ˆnϕ = ∇ ϕ ⋅ ˆn = (2,− 4,1) ⋅ √--,√---,0  .
                               2   2
(40)

So

        2     4        2      √ --
D ˆnϕ = √---−  √--=  − √---= −   2.
         2     2        2
(41)

Thus

|--------√----|
D-ˆnϕ-=--−--2.--
(42)

The negative sign means the scalar field decreases as one moves locally in the direction n.

Solution 4: level surfaces and normals

If

ϕ (x,y,z) = x + 2y − z,
(43)

then the level surfaces ϕ = C satisfy

x + 2y − z = C,
(44)

which is the equation of a plane.

The gradient is

∇ ϕ = ˆx + 2yˆ−  ˆz.
(45)

Therefore a normal vector to the level planes is

|------------|
|ˆx + 2ˆy − ˆz. |
-------------
(46)

This illustrates the general rule that the gradient is normal to a constant-value surface.

Solution 5: divergence of a linear field

For

A  = xxˆ−  2yˆy + 3zˆz,
(47)

we identify

Ax = x,     Ay =  − 2y,    Az =  3z.
(48)

Then

         ∂x-   ∂(−-2y)-  ∂(3z)-
∇ ⋅ A =  ∂x +    ∂y   +   ∂z   = 1 − 2 + 3 = 2.
(49)

Hence

|----------|
∇--⋅ A-=-2.-
(50)

Because the divergence is positive, the field behaves locally like a net source.

Solution 6: zero-divergence field

For

B =  − yˆx + xˆy,
(51)

the components are

Bx = − y,     By = x,     Bz =  0.
(52)

Therefore,

         ∂(−-y)   ∂x-   ∂0-
∇  ⋅ B =  ∂x    + ∂y +  ∂z = 0 + 0 + 0 = 0.
(53)

So

|----------|
-∇-⋅ B-=-0.-
(54)

The field has no local net source or sink strength, even though it may still circulate.

Solution 7: divergence as flux density

Given

F  = 2xxˆ+  yˆy,
(55)

we compute

        ∂(2x-)   ∂y-  ∂0-
∇ ⋅ F =  ∂x   +  ∂y + ∂z  = 2 + 1 + 0 = 3.
(56)

Thus,

|----------|
|∇ ⋅ F = 3.|
------------
(57)

Since the field is linear, this value is the same at (1, 2, 0).

Using

net outward flux ≈  (∇ ⋅ F )ΔV,
(58)

with ΔV = 0.02 m3, we obtain

net outward flux  ≈ 3(0.02) = 0.06.
(59)

Therefore,

|------------------------|
|net outward  flux ≈ 0.06 |
-------------------------
(60)

in the corresponding flux units of the field.

Solution 8: curl of a rotational field

Let

C =  − yˆx + xˆy.
(61)

Then

Cx = − y,     Cy = x,     Cz =  0.
(62)

Using the component formula for curl,

          (            )     (            )     (            )
            ∂Cz-   ∂Cy-        ∂Cx-   ∂Cz-        ∂Cy-   ∂Cx-
∇ ×  C =    ∂y  −  ∂z    ˆx +   ∂z  −   ∂x   ˆy +    ∂x  −  ∂y   ˆz.
(63)

The first two components are zero. The third is

∂C     ∂C
---y − ---x = 1 − (− 1) = 2.
 ∂x     ∂y
(64)

Hence

|------------|
∇  × C  = 2ˆz.|
--------------
(65)

So the field has nonzero local circulation about the z axis.

Solution 9: curl of a gradient field

Given

ψ =  x2 + y2 + z2,
(66)

its gradient is

G  = ∇ ψ =  2xˆx + 2y ˆy + 2zˆz.
(67)

Now compute the curl:

          (               )     (                )     (               )
            ∂(2z )   ∂(2y)        ∂ (2x )   ∂(2z)         ∂(2y)   ∂ (2x )
∇  × G  =   ------−  ------ ˆx +   ------−  ------  ˆy +   ------− ------  ˆz.
              ∂y      ∂z            ∂z      ∂x            ∂x       ∂y
(68)

Every derivative above is zero, so

|------------|
-∇-×-G--=--0.|
(69)

This is a standard example that a gradient field is irrotational.

Solution 10: compare zero divergence and zero curl

First consider

U =  xˆx + yyˆ.
(70)

Its divergence is

        ∂x-   ∂y-
∇ ⋅ U = ∂x  + ∂y  = 1 + 1 = 2.
(71)

Its curl is

          ( ∂y   ∂x )
∇ ×  U =    ---− ---  ˆz = 0 ˆz.
            ∂x   ∂y
(72)

Thus

|---------------------------|
∇  ⋅ U = 2,    ∇  × U  = 0. |
-----------------------------
(73)

So U is source-like but not rotational.

Now consider

V  = − yˆx + xˆy.
(74)

Its divergence is

∇ ⋅ V =  ∂(−-y)+  ∂x-=  0.
          ∂x      ∂y
(75)

Its curl is

          ( ∂x   ∂ (− y ))
∇ ×  V =    ---− ------   ˆz = (1 − (− 1))ˆz = 2ˆz.
            ∂x     ∂y
(76)

Therefore,

|----------------------------|
-∇-⋅ V-=-0,-----∇-×--V-=--2ˆz.-
(77)

So V is rotational but not source-like.

Solution 11: gradient of plane-wave phase

For

𝜃(x,y,z,t) = 2x − 3y + 4z − ωt,
(78)

we compute

∂𝜃-= 2,     ∂-𝜃 = − 3,    -∂𝜃 = 4.
∂x          ∂y            ∂z
(79)

Hence

|--------------------|
-∇-𝜃-=-2ˆx-−-3ˆy-+-4-ˆz.|
(80)

By comparison with 𝜃 = k r ωt, we identify

|------------------|
-k-=-2ˆx-−-3yˆ+--4ˆz.-
(81)

Its magnitude is

      ∘ ----------------  √ ---
|k| =   22 + (− 3)2 + 42 =  29.
(82)

Thus

|-----√----|
|k| =   29.|
------------
(83)

Solution 12: gradient of a scalar plane wave

Let

ψ (x, t) = ψ0 cos(kx − ωt ).
(84)

Differentiate with respect to x:

∂-ψ
 ∂x =  − k ψ0sin(kx − ωt ).
(85)

Because the field depends only on x,

∂-ψ = 0,     ∂-ψ = 0.
 ∂y          ∂z
(86)

Therefore,

|--------------------------|
∇-ψ--=-−-kψ0-sin(kx-−--ωt)ˆx.-
(87)

So the gradient points purely in the ±x direction, depending on the sign of the sine factor.

Solution 13: divergence and curl of a transverse field

The field is

E (z,t) = E0 cos(kz − ωt)ˆx.
(88)

Its components are

E  = E  cos(kz − ωt ),    E  =  0,    E  =  0.
 x     0                    y           z
(89)

For the divergence,

∇ ⋅ E = ∂Ex- +  ∂Ey-+  ∂Ez-.
         ∂x     ∂y     ∂z
(90)

Since Ex depends on z but not on x, and Ey = Ez = 0,

|----------|
-∇-⋅ E-=-0.-
(91)

For the curl, only the y component survives. More explicitly,

            ∂Ex-   ∂Ez-    ∂Ex-
(∇ × E )y =  ∂z  −  ∂x  =  ∂z  .
(92)

However, from the standard component formula,

         ( ∂E     ∂E   )     ( ∂E     ∂E  )     ( ∂E     ∂E  )
∇ ×  E =   ---z − ---y   ˆx +   ---x−  ---z  ˆy +   ---y − ---x  zˆ.
            ∂y     ∂z          ∂z     ∂x           ∂x     ∂y
(93)

Thus,

∂Ex- = − kE  sin(kz − ωt),
 ∂z         0
(94)

and therefore

|------------------------------|
-∇-×--E-=-−-kE0-sin(kz-−-ωt)ˆy.-|
(95)

So the divergence is zero while the curl is generally nonzero.

Solution 14: identify the operator type and meaning

  1. ϕ is a vector. It points in the direction of fastest increase of the scalar field and has magnitude equal to the maximum local rate of increase.
  2. ∇⋅ A is a scalar. It measures local source or sink strength, or equivalently the net outward flux per unit volume in the small-volume limit.
  3. ∇×A is a vector. It measures local oriented circulation, with the direction set by the right-hand rule.
  4. 𝜃 is a vector. For plane-wave phase 𝜃 = krωt, it equals the wave vector k, which is normal to constant-phase planes and points in the propagation direction.

Concluding remarks

The key lesson from EM03 and EM03E is that three different questions about spatial change lead to three different operators:

|----|
-∇-ϕ-|
(96)

asks how a scalar field rises,

|------|
-∇-⋅ A-|
(97)

asks whether a vector field spreads out or converges, and

|-------|
∇  × A  |
--------
(98)

asks whether a vector field circulates.

For plane-wave phase,

|------------------|
-∇-(k-⋅ r −-ωt) =-k|
(99)

connects vector calculus directly to wave geometry.

The next lesson, EM04, combines these ideas further by introducing the Laplacian and the three-dimensional wave equation.

References

[1]   H. M. Schey, Div, Grad, Curl, and All That, 4th ed., W. W. Norton & Company, 2005.

[2]   David J. Griffiths, Introduction to Electrodynamics, 4th ed., Cambridge University Press, 2017.

[3]   Gilbert Strang and Edwin “Jed” Herman, Calculus, Volume 3, OpenStax, 2016, chapters on vector fields and vector calculus.

[4]   Massachusetts Institute of Technology, 18.02SC Multivariable Calculus, MIT OpenCourseWare, materials on gradient, divergence, curl, flux, and line integrals.

[5]   Samuel J. Ling, Jeff Sanny, and William Moebs, University Physics, Volume 2, OpenStax, 2016, chapters on electric and magnetic fields and electromagnetic waves.

[6]   Richard P. Feynman, Robert B. Leighton, and Matthew Sands, The Feynman Lectures on Physics, Volume II, Addison-Wesley, 1964, chapters on vector electromagnetic fields and Maxwell’s equations.


"Antennas Electromagnetic Waves" is owned by bloftin.
(view preamble)
View style:
Other names:  EM03E1
Keywords:  electromagnetic waves, vector calculus, gradient, divergence, curl, directional derivative, flux, circulation, nabla operator, scalar field, vector field, plane wave, wave vector, electric field, exercises, worked solutions

This object's parent.

Cross-references: wave equation, Laplacian, operators, wave, volume, flux, relation, magnitude, type, vector, vector field, scalar, operator, formulas, curl, divergence, gradient, fields, EM03

This is version 2 of Antennas Electromagnetic Waves, born on 2026-09-16, modified 2026-09-16.
Object id is 1214, canonical name is AntennasElectromagneticWaves6.
Accessed 5 times total.

Classification:
Physics Classification03.50.De (Classical electromagnetism, Maxwell equations )
 02.30.Em (Potential theory)
 41.20.-q (Applied classical electromagnetism)
 41.20.Jb (Electromagnetic wave propagation; radiowave propagation )
Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:

No messages.

Interact
rate | post | correct | update request | add example | add (any)