1 The gradient of a scalar field

Consider the height ϕ above sea level at various points on a hill. Some contours for such a hill are shown in Figure 14.

Figure 14:

A contour map, labeled with elevation values, shows several connected points labeled A, B, C, D, and E.

Long description

We are interested in how ϕ changes from one point to another. Starting from A and making a displacement d ̲ the change in height ( ϕ ) depends on the direction of the displacement. The magnitude of each d ̲ is the same.

Displacement Change in ϕ
A B 40 − 30 = 10
A C 40 − 30 = 10
A D 30 − 30 = 0
A E 20 − 30 = − 10

The change in ϕ clearly depends on the direction of the displacement. For the paths shown ϕ increases most rapidly along A B , does not increase at all along A D (as A and D are both on the same contour and so are both at the same height) and decreases along A E .

The direction in which ϕ changes fastest is along the line of greatest slope which is orthogonal (i.e. perpendicular) to the contours. Hence, at each point of a scalar field we can define a vector field giving the magnitude and direction of the greatest rate of change of ϕ locally.

A vector field, called the gradient, written grad ϕ , can be associated with a scalar field ϕ so that at every point the direction of the vector field is orthogonal to the scalar field contour which is the direction of the maximum rate of change of ϕ .

For a second example consider a metal plate heated at one corner and cooled by an ice bag at the opposite corner. All edges and surfaces are insulated. After a while a steady state situation exists in which the temperature ϕ at any point remains the same. Some temperature contours are shown in Figure 15.

Figure 15:

Two diagrams, (a) and (b), show temperature contours and heat flow lines across a metal plate subjected to a heat source.

Long description

The direction of the heat flow is along the flow lines which are orthogonal to the contours (see the dashed lines in Figure 15(b)); this heat flow is proportional to F ̲ = grad ϕ .

Definition
The gradient of the scalar field ϕ = f ( x , y , z ) is grad ϕ = ∇ ̲ ϕ = ∂ ϕ ∂ x i ̲ + ∂ ϕ ∂ y j ̲ + ∂ ϕ ∂ z k ̲

Often, instead of grad ϕ , the notation ∇ ̲ ϕ is used. ( ∇ ̲ is a vector differential operator called ‘del’ or ‘nabla’ defined by ∂ ∂ x i ̲ + ∂ ∂ y j ̲ + ∂ ∂ z k ̲ . As a vector differential operator, it retains the characteristics of a vector while also carrying out differentiation.)

The vector grad ϕ gives the magnitude and direction of the greatest rate of change of ϕ at any point, and is always orthogonal to the contours of ϕ . For example, in Figure 14, grad ϕ points in the direction of A B while the contour line is parallel to A D i.e. perpendicular to A B . Similarly, in Figure 15(b), the various intersections of the contours with the lines representing grad ϕ occur at right-angles.

For the hill considered earlier the direction and magnitude of grad ϕ are shown at various points in Figure 16. Note that the magnitude of grad ϕ is greatest (as indicated by the length of the arrow) when the hill is at its steepest (as indicated by the closeness of the contours).

Figure 16:

A set of concentric, elongated contour lines illustrating the gradient and direction of steepest ascent for a hill.

Long description
Key Point 3

ϕ is a scalar field but grad ϕ is a vector field.

Example 9

Find grad ϕ for

  1. ϕ = x 2 − 3 y
  2. ϕ = x y 2 z 3
Solution
  1. grad ϕ = ∂ ∂ x ( x 2 − 3 y ) i ̲ + ∂ ∂ y ( x 2 − 3 y ) j ̲ + ∂ ∂ z ( x 2 − 3 y ) k ̲ = 2 x i ̲ + ( − 3 ) j ̲ + 0 k ̲ = 2 x i ̲ − 3 j ̲
  2. grad ϕ = ∂ ∂ x ( x y 2 z 3 ) i ̲ + ∂ ∂ y ( x y 2 z 3 ) j ̲ + ∂ ∂ z ( x y 2 z 3 ) k ̲ = y 2 z 3 i ̲ + 2 x y z 3 j ̲ + 3 x y 2 z 2 k ̲
Example 10

For f = x 2 + y 2 find grad f at the point A ( 1 , 2 ) . Show that the direction of grad  f is orthogonal to the contour at this point.

Solution

grad  f = ∂ f ∂ x i ̲ + ∂ f ∂ y j ̲ + ∂ f ∂ z k ̲ = 2 x i ̲ + 2 y j ̲ + 0 k ̲ = 2 x i ̲ + 2 y j ̲

and at A ( 1 , 2 ) this equals 2 × 1 i ̲ + 2 × 2 j ̲ = 2 i ̲ + 4 j ̲ .

Since f = x 2 + y 2 then the contours are defined by x 2 + y 2 = constant, so the contours are circles centred at the origin. The vector grad f at A ( 1 , 2 ) points directly away from the origin and hence grad f and the contour are orthogonal; see Figure 17. Note that r ̲ ( A ) = i ̲ + 2 j ̲ = 1 2 grad f .

Figure 17:

The image illustrates that the gradient vector, denoted as grad f, is perpendicular to the contour lines on a two-dimensional coordinate system.

Long description

The change in a function ϕ in a given direction (specified as a unit vector a ̲ ) is determined from the scalar product ( grad ϕ ) ⋅ a ̲ . This scalar quantity is called the directional derivative.

Note:

Task!

Given ϕ = x 2 y 2 z 2 , find

  1. grad ϕ
  2. grad ϕ at ( − 1 , 1 , 1 ) and a unit vector in this direction.
  3. the derivative of ϕ at ( 2 , 1 , − 1 ) in the direction of
    1. i ̲
    2. d ̲ = 3 5 i ̲ + 4 5 k ̲ .
  1. grad  ϕ = ∂ ϕ ∂ x i ̲ + ∂ ϕ ∂ y j ̲ + ∂ ϕ ∂ z k ̲ = 2 x y 2 z 2 i ̲ + 2 x 2 y z 2 j ̲ + 2 x 2 y 2 z k ̲
  2. At ( − 1 , 1 , 1 ) , grad ϕ = − 2 i ̲ + 2 j ̲ + 2 k ̲
    A unit vector in this direction is

    grad ϕ grad ϕ = − 2 i ̲ + 2 j ̲ + 2 k ̲ ( − 2 ) 2 + 2 2 + 2 2 = 1 2 3 ( − 2 i ̲ + 2 j ̲ + 2 k ̲ ) = − 1 3 i ̲ + 1 3 j ̲ + 1 3 k ̲

  3. At ( 2 , 1 , − 1 ) , grad ϕ = 4 i ̲ + 8 j ̲ − 8 k ̲
    1. To find the derivative of ϕ in the direction of i ̲ take the scalar product
      ( 4 i ̲ + 8 j ̲ − 8 k ̲ ) ⋅ i ̲ = 4 × 1 + 0 + 0 = 4 . So the derivative in the direction of d ̲ is 4.
    2. To find the derivative of ϕ in the direction of d ̲ = 3 5 i ̲ + 4 5 k ̲ take the scalar product
      ( 4 i ̲ + 8 j ̲ − 8 k ̲ ) ⋅ ( 3 5 i ̲ + 4 5 k ̲ ) = 4 × 3 5 + 0 + ( − 8 ) × 4 5 = 12 5 − 32 5 = − 4 .

      So the derivative in the direction of d ̲ is − 4 .

Exercises
  1. Find grad ϕ for the following scalar fields
    1. ϕ = y − x .
    2. ϕ = y − x 2 ,
    3. ϕ = x 2 + y 2 + z 2 .
  2. Find grad ϕ for each of the following two-dimensional scalar fields given that r ̲ = x i ̲ + y j ̲ and r = x 2 + y 2 (you should express your answer in terms of r ̲ ).
    1. ϕ = r ,
    2. ϕ = ln r ,
    3. ϕ = 1 r ,
    4. ϕ = r n .
  3. If ϕ = x 3 y 2 z , find,
    1. ∇ ̲ ϕ
    2. a unit vector normal to the contour at the point ( 1 , 1 , 1 ) .
    3. the rate of change of ϕ at ( 1 , 1 , 1 ) in the direction of i ̲ .
    4. the rate of change of ϕ at ( 1 , 1 , 1 ) in the direction of the unit vector n ̲ = 1 3 ( i ̲ + j ̲ + k ̲ ) .
  4. Find a unit vector which is normal to the sphere x 2 + ( y − 1 ) 2 + ( z + 1 ) 2 = 2 at the point ( 0 , 0 , 0 ) .
  5. Find unit vectors normal to ϕ 1 = y − x 2 and ϕ 2 = x + y − 2 . Hence find the angle between the curves y = x 2 and y = 2 − x at their point of intersection in the first quadrant.
    1. ∂ ∂ x ( y − x ) i ̲ + ∂ ∂ y ( y − x ) j ̲ = − i ̲ + j ̲
    2. − 2 x i ̲ + j ̲
    3. [ ∂ ∂ x ( x 2 + y 2 + z 2 ) ] i ̲ + [ ∂ ∂ y ( x 2 + y 2 + z 2 ) ] j ̲ + [ ∂ ∂ z ( x 2 + y 2 + z 2 ) ] k ̲ = 2 x i ̲ + 2 y j ̲ + 2 z k ̲
    1. r ̲ r ,
    2. r ̲ r 2 ,
    3. − r ̲ r 3 ,
    4. n r n − 2 r ̲
    1. 3 x 2 y 2 z i ̲ + 2 x 3 y z j ̲ + x 3 y 2 k ̲ ,
    2. 1 14 ( 3 i ̲ + 2 j ̲ + k ̲ ) ,
    3. 3 ,
    4. 2 3
  1. The vector field ∇ ̲ ϕ where ϕ = x 2 + ( y − 1 ) 2 + ( z + 1 ) 2 is 2 x i ̲ + 2 ( y − 1 ) j ̲ + 2 ( z + 1 ) k ̲
    The value that this vector field takes at the point ( 0 , 0 , 0 ) is − 2 j ̲ + 2 k ̲ which is a vector normal to the sphere.
    Dividing this vector by its magnitude forms a unit vector: 1 2 ( − j ̲ + k ̲ )
  2. 10 8 ∘ or 7 2 ∘ (intersect at ( 1 , 1 ) ) [At intersection, grad ϕ 1 = − 2 i ̲ + j ̲ and grad ϕ 2 = i ̲ + j ̲ . ]