You are on page 1of 9

MAS2104/MAS3104

Problems, Part 4

Gradient, Divergence and Curl


Solutions presented below are given in both coordinate and subscript notation. The latter has only
been presented in a handout and is optional. You are free to use any method you wish when
solving the problems.
Operator (read nabla or del) is defined as a symbolic vector whose components are partial
derivatives. In Cartesian coordinates, the definition is

b+
b+
=
x
y
zb
x
y
z


, ,
x y z

.
xi

For a scalar field f (r) f (x, y, z), its gradient is a vector field, given in Cartesian
coordinates (x, y, z) by
f
f
f
b+
b+
x
y
zb
x
y
z
!
f f f

,
,
x y z
f

.
xi

grad f = f

The directional derivative of a scalar field f (r) in the direction of a vector b is


f
b f bb f ,
=b
i
b
xi

(1)

b = b/|b| is the unit vector in the direction of b.


where b
Here and henceforth, the summation convention applies wherever the subscript notation is
P
used, i.e., summation over repeated indices is understood, that is ai bi 3i=1 ai bi .
b + vy (x, y, z)y
b + vz (x, y, z)z
b, its divergence is a scalar
For a vector field v(r) = vx (x, y, z)x
field, given in Cartesian coordinates by

div v = v
vx vy vz

+
+
x
y
z
vi

.
xi
b + vy (x, y, z)y
b + vz (x, y, z)z
b, its curl is a vector field,
For a vector field v(r) = vx (x, y, z)x
given in Cartesian coordinates by

curl v =

b
x

x
vx

b
y

y
vy
!

zb

z
vz

vx vz
vy vx
vz vy
b
b
x

+y

+ zb

y
z
z
x
x
y
!
vz vy vx vz vy vx

y
z
z
x
x
y
vk
ijk
.
xj

(2)

MAS2104/MAS3104

Problems, Part 4

The divergence and curl of v can be expressed as the dot product and cross product of the
symbolic vector and v, respectively.
The calculations can often be significantly simplified by taking advantage of symmetries of the
expressions, e.g., with respect to cyclic permutations.
The subscript notation is devised to allow for such symmetries. When using the subscript notation, note the following. The definition of the LeviCivita tensor is
1. 123 = 1 ;
2. ijk = 1 if the set i, j, k differs from 1, 2, 3 by an even number of permutations, e.g., 231 = 1 ;
3. ijk = 1 if the set i, j, k differs from 1, 2, 3 by an odd number of permutations, e.g., 213 = 1 ;
4. ijk = 0 if any two indices are equal to each other.
The folowing idenities are useful:
ijk ipq = jp kq jq kp ,

ijk ijq = 2kq ,

ijk ijk = 6 ,

where the summation convention applies and ik is the Kronecker delta,


ij = 1 if i = j , and ij = 0 if i 6= j .
Using subscript notation, the dot and cross products of vectors u and v are expressed as
u v = ui v i ,

u v = ijk uj vk .

With u replaced by , we then obtain expressions for the divergence and curl in terms of subscript
notation.

Question 1
x2 y 2 z 2
(a) Find the directional derivative of the field f = 2 + 2 + 2 at a point (x, y, z) in the direction
a
b
c
of the vector r = (x, y, z). Here a, b, and c are constants.
(b) In what case the directional derivative of Part (a) is equal to the modulus of the gradient?

Question 2
Find the directional derivative of a two-dimensional scalar field f = x2 + y 2 at a point (1, 1) in the
directions of the following vectors:
(a) b = (1, 1) ,
(b) b = (0, 1) , and (c) b = (1, 1) .
(d) Also find f at (x, y) = (1, 1) and compare the above directional derivatives with |f |.

Question 3
Find v for the following vector fields:
b + (z 2 + x2 )(y + z)y
b + (x2 + y 2 )(z + x)z
b,
(a) v = (y 2 + z 2 )(x + y)x
b + f2 (x, z)y
b + f3 (x, y)z
b,
(b) v = f1 (y, z)x

http://www.mas.ncl.ac.uk/nas13/mas2104

MAS2104/MAS3104

Problems, Part 4

b + yf2 (x, z)y


b + zf3 (x, y)z
b.
(c) v = xf1 (y, z)x

Question 4
Find (a) r ,

(b)

r
, (c) (r4 r) , where r = |r| and r = (x, y, z).
r

Question 5
Find v for v =

z
x
y
b+ y
b+ z
b at the points (a) (x, y, z) and (b) (1, 1, 1).
x
x
y
z

Question 6
Find v at a point (1, 1, 2) for
b + xz
b,
b + xy
b ,
(a) v = yz 2 y
(b) v = yz 2 x

b .
(c) v = yz 2 zb + xx

Question 7
Find v for the following vector fields:
b + 2xyz 2 y
b + 3xy 2 z 2 z
b , (b) v = yz x
b + z(x + 2y)y
b + y(x + y)z
b,
(a) v = y 2 z 3 x
1
y
b z
b,
y
2
x
x
1
y
b .
(e) v = 2 zb x
x
x

(d) v =

(c) v =

y
1
b y
b ,
x
2
x
x

Question 8
Find (a) r ,

(b)

r
,
r

(c)

r
, where r = |r| and r = (x, y, z).
r3

Question 9


Find a function g(z) such that the vector field 2y, 2x + g(z), 3yz 2 = 0 is irrotational.

Question 10
Which of the following vector fields are irrotational?
(a) (2xyz, x2 z, x2 y) ,
(b) (0, 1, xy) .

Question 11
Which of the fields of Question 10 are solenoidal?

Question 12


Consider a scalar field f (x, y, z), where x, y and z lie on a curve t 7 x(t), y(t), z(t) . Show that
df
= (v )f , where v is tangent to the curve.
dt

Question 13
Prove that

1 df 2
c f (r)r = 2f (r)c +
[cr r(c r)] .
r dr
Here f (x, y, z) is a scalar field, r = (x, y, z) is the position vector, r = |r|, and c is a constant vector.

http://www.mas.ncl.ac.uk/nas13/mas2104

MAS2104/MAS3104

Problems, Part 4

Solutions
Solution 1
(a) We first calculate the gradient of f (it is useful to take advantage of the symmetry of f in x, y
and z, but note that x combines with a, y with b and z with c):
2x
2y
2z
b+
b+
b .
x
y
y
2
2
a
b
c2
x
y
r
b+ y
b+
The unit vector in the direction r = (x, y, z) is br = = x
r
r
r
Hence,
!
2 x2 y 2 z 2
2f
f
= br f =
=
+
+
r
r a2
b2
c2
r
f =

z
zb, where r = x2 + y 2 + z 2 .
r
.

x2i
2xi
, where a1 = a, a2 = b, a3 = c. So, f = ei 2 . With br = xi /r, we obtain
2
ai
ai
2
2xi xi
x 1
f
f br = 2
= 2 2i = 2 .
ai r
ai r
r
Otherwise, f =

(b) The modulus of the gradient is given by |f | = 2

x2 y 2 z 2
+ 4 + 4 and this is equal to f /r
a4
b
c

only if a = b = c, and then both are equal to 2r/a2 .


To understand this result, we can observe that f is a normal to the surface f (x, y, z) = const.
For f given above, this surface is an ellipsoid, which reduces to a sphere if only a = b = c. The
b along which the derivative
directional derivative can be equal to the gradient if only the direction b,
is calculated, is the direction of the normal vector. However, r is a normal to an ellipsoidal surface
only if the surface is in fact a sphere, a = b = c.

Solution 2
b + 2y y
b . At a point (1, 1), we have f (1, 1) = 2x
b + 2y
b.
We first find the gradient of f : f = 2xx
Using Eq. (1), we obtain:

(a)
(b)
(c)

b + 1y
b
1x
4
f
b + 2y
b)
=2 2,
= (2x
=
b
12 + 12
2
b + 1y
b
f
0x
2
b + 2y
b)
= (2x
= =2,
2
2
b
0 +1
1
b + 1y
b
1x
0
f
b + 2y
b) q
= (2x
= =0.
b
2
(1)2 + 12

(d) |f (1, 1)| = 22 + 22 = 2 2. The modulus of the gradient is equal to the directional derivative
in (a). This is not surprising since here b = (1, 1) is parallel to f (1, 1) = (2, 2).
The modulus of the gradient is larger than the directional derivative in (b) and (c); this must be
so since |f | is the maximum rate of change of f .
Note that the directional derivative is zero in (c). It is easy to verify that b = (1, 1) is orthogonal
to f = (2, 2): indeed, b f = 1 2 + 1 2 = 0. Since f is a normal to a surface f = const, b
must be tangent to the surface. We conclude that the directional derivative is zero in those directions
which are tangent to the surface.

Solution 3
2 2

(y +z )(x+y)+ (z 2 +x2 )(y+z)+ (x2 +y 2 )(z+x) = (y 2 +z 2 )+(z 2 +x2 )+(x2 +y 2 )


x
y
z
= 2(x2 + y 2 + z 2 ) = 2r2 .

(a) v =

http://www.mas.ncl.ac.uk/nas13/mas2104

MAS2104/MAS3104

Problems, Part 4

f1 (y, z) +
f2 (x, z) + f3 (x, y) = 0 + 0 + 0 = 0.
x
y
z

(c) v =
[xf1 (y, z)] +
[yf2 (x, z)] + [zf3 (x, y)] = f1 (y, z) + f2 (x, z) + f3 (x, y).
x
y
z
(b) v =

Solution 4
Taking advantage of the symmetry of expressions containing r can significantly accelerate calculations and help to avoid errors.
x y z
(a) r =
+
+
= 1 + 1 + 1 = 3.
x y z
xi
Otherwise, r =
= ii = 1 + 1 + 1 = 3 (remember the summation convention).
xi
x
y
z
r (x/r)x r (y/r)y r (z/r)z
r
+
+
=
(b) =
+
+
r
x r y r z r
r2
r2
r2
2
2
2
3r (x + y + z )/r
3r r
2
=
(we recall that, e.g., r/x = x/r).
=
=
r2
r2
r
r
xi
r xi xi /r
xi
r
Alternatively, =
=
= . Thus,
since
2
r
xi r
r
xi
r

r
r 3r
2
=
=

r
r2
r

since xi xi = r2 .

4
4

x
y
z
(r x) +
(r y) + (r4 z) = 4r3 x + r4 + 4r3 y + r4 + 4r3 z + r4
x
y
z
r
r
r
= 4r2 (x2 + y 2 + z 2 ) + 3r4 = 7r4 .
4
4

xi
Alternatively, (r4 r) =
r xi = xi
r + r4
xi = xi 4r3 + 3r4 = 4r4 + 3r4 = 7r4 . Note
xi
xi
xi
r
r
xi
xi
2
that
= , xi xi = r and
ii = 3 because of the summation convention.
xi
r
xi

(c) (r4 r) =

Solution 5
In this example we can take advantage of another, more subtle form of symmetry. The three components of the vector v in this question can be obtained from each other by the cyclic permutations
of x, y and z according to the following pattern: x y, y z, z x. The order here corresponds
to the standard ordering of the coordinates x, y and z.
b we replace x by y and y by z, we obtain the yIn other words, if in the x-component (y/x)x
b , and replacing here y by z and z by x, we obtain the z-component of v. It can
component (z/y)y
be easily verified (just inspect closer Eq. (2) from this viewpoint) that the operator and the cross
product also possess this symmetry. Therefore, it is sufficient to calculate only one component of
the curl, and the remaining two will follow via cyclic permutations.
(a) Applying the definition of curl, we have

x
b

v =
x

y/x

b
y
zb
!
!
!


z
y
x
z
y
x
b
b

+y

+ zb

=x
y z
y z z y
z x x z
x y y x
z/y x/z
1
1
1
b y
b z
b.
= x
y
z
x

b+y
b+z
b=r.
(b) For x = 1, y = 1 and z = 1, we obtain v = x

http://www.mas.ncl.ac.uk/nas13/mas2104

MAS2104/MAS3104

Problems, Part 4

Solution 6
(a)

x
b

v =
x

0

b
y
zb
!
!
!

b
b
b y
b .
=x
x yz + y
0
x + zb
yz
0 = 2yz x
y z
y
z
z
x
x
y
yz 2 x

by
b.
Thus, v(1, 1, 2) = 4x

(b)

x
b


v =
x

yz 2

b
y

y
x

zb

z
0






b
=x


2
b
0 x +y
yz
0 + zb
x
yz
y
z
z
x
x
y

b + (1 z 2 )z
b.
= 2yz y
b 3z
b.
Thus, v(1, 1, 2) = 4y

(c)




v =


b
x

x
x

b
y
zb

y z
0 yz 2






b
=x


b
b .
yz 0 + y
x
yz + zb
0
x = 2yz x
y
z
z
x
x
y

b.
Thus, v(1, 1, 2) = 4x

Solution 7
(a) There is no symmetry with respect to cyclic permutations in this example [and also in Parts
(b)(e) below)], so each component must be evaluated separately.

x
b

v =
x
2 3
y z

b
y
zb

y
z
2xyz 2 3xy 2 z 2

2 3

2 3

b
b
= x
3xy 2 z 2 2xyz 2 + y
y z
3xy 2 z 2 + zb
2xyz 2
y z
y
z
z
x
x
y
b + (3y 2 z 2 3y 2 z 2 )y
b + (2yz 2 2yz 3 )z
b
= (6xyz 2 4xyz)x
b + 2yz 2 (1 z)z
b.
= 2xyz(3z 2)x





v =


b
b
x
y
zb



(b)

x
y
z

yz z(x + 2y) !y(x + y)
!
!

b
b
=x
y(x + y) z(x + 2y) + y
yz
y(x + y) + zb
z(x + 2y)
yz
y
z
z
x
x
y
b + (y y)y
b + (z z)z
b=0.
= (x + 2y x 2y)x

(c)


x
b


v =
x
0

b
y
zb

y
z
y/x2 1/x




!

1
y

b
b
=x

+y

y x z x2

1
2y
b
y
zb .
2
x
x3

http://www.mas.ncl.ac.uk/nas13/mas2104

1
y

0+
+ zb

0
2
z
x x
x x
y

MAS2104/MAS3104

x
b


(d) v =
x2
y/x

Problems, Part 4

b
y
zb
!
!
!

1
y
1
y

b
b
=x
0+
+y
0 + zb

y
z
y
z x
z x2 x
x x y x2
1/x 0

=0.
(e)



b
x


v =
x

1/x

b
y
zb

y z
0 y/x2






b
=x


y
1
y

0 +y
2
y x
z
z x x x2

+ zb 0 +
x
y x

1
2y
b+
b .
x
y
2
x
x3

Solution 8
Symmetry with respect to cyclic
permutations can be employed here with a very rewarding effect.
x

b
b
b
y
z


!
!
!


z y
x z
y x

b
b
=x
(a) r =

+y

+ zb

=0.
x y z
y z
z x
x y


x
y
z
xk
Otherwise, using subscript notation, r = ijk
= ijk jk = ijj = 0.
xj
y
1
1 r
1z
yz
= y
= y 2
= y 2 = 3 . The x-component of
z r
z r
r z
r r
r

x
b
y
zb
b


y
z
yz
yz
(r/r) =
is given by

= 3 + 3 = 0 . From symmetry w.r.t.


x y

z
z r
y r
r
r

x/r y/r z/r
cyclic permutation, we obtain (r/r) = 0.
r
xk
jk r xk xj /r
Alternatively, with subscript notation: = ijk
= ijk
r
xj r
r2
ijj r ijk xk xj /r
ijk xj xk
rr
= ei
=
= 3 = 0, since ijj = 0 , ijk xj xk = r r and u u = 0
2
3
r
r
r
for any vector u.
(b) First note that, say,

(c)


x
b


The x-component of (r/r3 ) =
x3
x/r

b
y
zb

y
z
3
y/r z/r3





y
z
3yz

+
is given by

z r3
y r3
r5

yz
= 0 . From symmetry w.r.t. cyclic permutation, we obtain (r/r3 ) = 0.
r5
xk
jk r3 xk 3r2 xj /r
Alternatively, with subscript notation: (r/r3 ) = ijk
=

=
ijk
xj r3
r6
ijj r3 3ijk xk xj r
ijk xj xk
rr
=
3
=
3
= 0, since ijj = 0 , ijk xj xk = r r and u u = 0 for
r6
r5
r5
any vector u.
3

One more method to obtain the above results uses the identity of Question 13, for example
1
(rr) = r r + r r = r r + 0 = 0 .
r
Vector rf (r) is irrotational for any f (r), i.e., its curl vanishes, because it is parallel to r, while
r = 0.

http://www.mas.ncl.ac.uk/nas13/mas2104

MAS2104/MAS3104

Problems, Part 4

Solution 9


A vector field v is irrotational if v = 0. Then 2y, 2x+g(z), 3yz


if

dg
= 3z 2
dz

dg
= 3z , 0, 0 = 0
dz
2

g = z 3 + C, where C is an arbitrary constant.

Solution 10
(a) (2xyz, x2 z, x2 y) = (0, 0, 0)
(b) (0, 1, xy) = (x, y, 0) 6= 0

irrotational.
not irrotational.

Solution 11
(a) (2xyz, x2 z, x2 y) = 2yz not solenoidal.
(b) (0, 1, xy) = 0 solenoidal.

Solution 12
Using the chain rule,

f dx f dy f dz
df
=
+
+
= v f .
dt
x dt
y dt
z dt

Solution 13
All the expresions below are symmetric with respect to cyclic permutations, x y, y z, z x.
Therefore, it is sufficient to calculate just one component of the vector idenitity. The solution
given below includes all three components only for illustrative purposes.
f (r)
df
x
We use the following relation:
= f 0 , where f 0 = , and similarly for y and z.
x
r
dr

x
b

c f (r)r = cx

fx

c f (r)r

b
y
zb
cy cz
fy fz





= (cy f z cz f y, cz f x cx f z, cx f y cy f x) .



b
b
x
y
zb


=
x
y
z

f (cy z cz y) f (cz x cx z) f (cx y cy x)
"
#

f (cx y cy x) f (cz x cx z)
y
z
"
#

b
+y
f (cy z cz y)
f (cx y cy x)
z
x
"
#

+ zb
f (cz x cx z)
f (cy z cz y)
x
y


y
z
0
0
b f (cx y cy x) + f cx f (cz x cx z) + f cx
= x
r 
r

z
x
0
0
b f (cy z cz y) + f cy f (cx y cy x) + f cy
+y
r
r

x
y
0
0
+ zb f (cz x cx z) + f cz f (cy z cz y) + f cz
r
r

f0 h  2
b cx y cy xy cz xz + cx z 2
= 2f c +
x
r


b cy z 2 cz yz cx xy + cy x2
+y
b
= x

+ zb cz x2 cx xz cy yz + cz y 2
http://www.mas.ncl.ac.uk/nas13/mas2104

i

MAS2104/MAS3104

Problems, Part 4

= 2f c +

i
f0 n h
b cx (x2 + y 2 + z 2 ) cx x2 cy xy cz xz
x
r
i
h
b cy (x2 + y 2 + z 2 ) cy y 2 cz yz cx xy
+y
h

+ zb cz (x2 + y 2 + z 2 ) cz z 2 cx xz cy yz

io

f0 2 f0
b x(c r) + y
b y(c r) + z
bz(c r)]
= 2f c + cr [x
r
r
1 df 2
= 2f (r)c +
[cr r(c r)] .
r dr
Otherwise, using the subscript notation, consider the ith component of the identity:
[ (c f (r)r]i = ijk j [c f (r)r]k .
To find [c f (r)r]k , we use the definition [a b]i = ijk aj bk , where we replace i by k and j, k by p, q:
[c f (r)r]k = kpq cp f (r)xq .
Therefore,
[ (c f (r)r]i = ijk kpq j [cp f (r)xq ]
= ijk kpq cp j [f (r)xq ] (since c is a constant vector)


0 xj
= ijk kpq cp f xq + f jq ,
r
df r
xj

df
f (r) =
= f 0 , where f 0 = .
xj
dr xj
r
dr
To evaluate ijk kpq , we use the identity ijk ipq = jp kq jq kp . However, summation is carried
over the first index in this identity, but the index k, over which summation is understood in ijk kpq ,
is not the first one. So, we should first transform the expression to be evaluated in order to make k
the first index, and only then the above identity can be applied after suitably renaming the indices:

since

ijk kpq = ikj kpq = kij kpq = ip jq iq jp ,


so that we obtain


[ (c f (r)r]i = (ip jq iq jp )cp f




= ip jq f

0 xj

0 xj

xq + f jq

xq + f jq iq jp f

0 xj

xq + f jq .

Now note that, say, ip cp = ci , jq xq = xj , that jq jq = jj = 11 + 22 + 33 = 3, and that


iq jp jq = iq pq = ip to obtain
xj xj
+ 3ci f
r
xj xi
f 0 cj
ci
r

[ (c f (r)r]i = f 0 ci

xi
1 0 2
f ci r + 2ci f f 0 (r c) ,
r
r

which represents the ith component of the identity to be proved. Here f 0 = df /dr.

http://www.mas.ncl.ac.uk/nas13/mas2104

You might also like