Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Chapter 4

Directional derivative and gradient

Recall that the partial derivative @u/@x defined rate of change of the function u along the
x-axis. In general, the rate of change of the function along any direction is characterised by
the derivative in that direction.

Suppose function u = f (x, y, z) = f (M ) is defined in the neighbourhood of the point M0 2 R3 .


Let us draw a line L, which passes through the point M0 , and choose any of the two possible
directions, which is characterised by the unit vector ~l as shown in Fig. 4.1. Let M be an
arbitrary point from the neighbourhood, which lies on the line L. The length of the vector
M~0 M in the direction of ~l, denoted as M0 M , and is defined as
8
< |M~0 M |, if M~0 M "" ~l,
M0 M =
:
|M~0 M |, if M~0 M "# ~l.

Figure 4.1: A line L, which passes through the point M0 in the direction of the unit vector ~l

Definition 17 The limit (if it exists) defined as

f (M ) f (M0 )
lim
M !M0 ,M 2L M0 M

57
Calculus of Several Variables (G5210) 2018-19 Lecture notes

is called the derivative of function u = f (M ) at the point M along the vector ~l and is denoted
as @f /@l(M0 ) or D~l f (M0 ).

Suppose z = f (x, y), and we want to find the derivative of z at the point (x0 , y0 ) in the direction
of the unit vector ~u = (u1 , u2 ). In order to do this, we can introduce an s-axis with its origin
at (x0 , y0 ) and its positive direction in the direction of ~u, as shown in Figs 4.2.

Figure 4.2: A directional derivative in the direction of the unit vector ~u = (u1 , u2 ).

Then the point s on the s-axis has xy-coordinates x = x0 + su1 , y = y0 + su2 . The value of
z = f (x, y) at the point s on the s-axis is

F (s) = f (x0 + su1 , y0 + su2 ),

and is it called the cross-section through (x0 , y0 ) of z = f (x, y) in the direction of ~u.

Definition 18 The directional derivative of z = f (x, y) at the point (x0 , y0 ) in the direction
of the unit vector ~u = (u1 , u2 ) is

d
D~u f (x0 , y0 ) = f (x0 + su1 , y0 + su2 ) .
ds s=0

Dr Yuliya Kyrychko 58 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Definition 19 Let ~u = u1~i + u2~j + u3~k be a unit vector in R3 .

The chain rule allows us to calculate the directional derivative of z = f (x, y) using partial
derivatives.

Theorem 17 For any unit vector ~u = (u1 , u2 ), the directional derivative of z = f (x, y) at
(x0 , y0 ) in the direction of ~u is

D~u f (x0 , y0 ) = fx (x0 , y0 )u1 + fy (x0 , y0 )u2 .

Proof: Following the definition 19 and using the chain rule, we have
d
F 0 (s) = [f (x0 + su1 , y0 + su2 )]
ds

d d
= fx (x0 + su1 , y0 + su2 ) (x0 + su1 ) + fy (x0 + su1 , y0 + su2 ) (y0 + su2 )
ds ds

= fx (x0 + su1 , y0 + su2 )u1 + fy (x0 + su1 , y0 + su2 )u2 .

Now, setting s = 0 gives

D~u f (x0 , y0 ) = fx (x0 , y0 )u1 + fy (x0 , y0 )u2

as required. ⌅

Example: Calculate the directional derivative of the function f (x, y) = 4xy 14 x4 14 y 4 at


p p
the point (1, 1) in the direction of the unit vector ~u = ( 12 2, 12 2) (as shown in Fig 4.3).

Solution. First we calculate the partial derivatives as


✓ ◆
@f 1 4 1 4
fx (x, y) = 4xy x y = 4y x3 ,
@x 4 4

and ✓ ◆
@f 1 4 1 4
fy (x, y) = 4xy x y = 4x y3.
@x 4 4
At the point (1, 1) we have

fx (1, 1) = 4( 1) 13 = 3

and
fy (1, 1) = 4(1) ( 1)3 = 3.

Dr Yuliya Kyrychko 59 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Figure p4.3: Apdirectional derivative at the point (1, 1) in the direction of the unit vector
~u = ( 12 2, 12 2).

p p
The directional derivative along the vector ~v = ( 12 2, 1
2
2) can now be calculated as
D~u f (1, 1) = fx (1, 1)u1 + fy (1, 1)u2

✓ ◆ ✓ ◆
1p 1p p
=3 2 + ( 3) 2 = 3 2.
2 2

Example: Find the derivative of the function f (x, y) = x2 y 5 at a point P = (3, 1) in the
direction towards the point Q = (4, 3).

Solution. The partial derivatives are


fx = 2xy 5 , fy = 5x2 y 4 ,
and at the point P = (3, 1) we have
fx (3, 1) = 2(3)(1)5 = 6, fy (3, 1) = 5(3)2 (1)4 = 45.
In order to find the unit vector ~u in the direction from P = (3, 1) towards Q = (4, 3), we first
calculate the displacement vector
P~Q = (4 3, 3 1) = (1, 4).
p p
Now we divide by its length |P~Q| = 12 + ( 4)2 = 17 to obtain

P~Q (1, 4)
~u = (u1 , u2 ) = = p ,
~
|P Q| 17
which gives
1 4
u1 = p , u2 = p .
17 17

Dr Yuliya Kyrychko 60 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Finally,
✓ ◆ ✓ ◆
1 4 174
D~v f (3, 1) = fx (3, 1)u1 + fy (3, 1)u2 = 6 p + 45 p = p .
17 17 17

Theorem 18 Let the unit vector ~u = (cos ↵, cos , cos ), the directional derivative of u =
f (x, y, z) at (x0 , y0 , z0 ) in the direction of ~u is

D~u f (x0 , y0 , z0 ) = fx (x0 , y0 , z0 ) cos ↵ + fy (x0 , y0 , z0 ) cos + fz (x0 , y0 , z0 ) cos .

Proof: Recalling that

D~u f (x0 , y0 , z0 ) = fx (x0 , y0 , z0 )u1 + fy (x0 , y0 , z0 )u2 + fz (x0 , y0 , z0 )u3

completes the proof. ⌅

Definition 20 Let ~u = u1~i + u2~j + u3~k be a unit vector in R3 .

It is worth noting that the directional derivative can be written in the form of the scalar/dot
product, i.e.

D~u = fx u1 + fy u2 + fz u 3 = (fx~i + fy~j + fz~k) · (u1~i + u2~j + u3~k).

Definition
Pn 21 Let ~ei be the standard orthonormal coordinate basis in Rn , so that ~r =
i=1 xi~
ei . The gradient of the function f = f (x1 , x2 , ..., xn ) is defined as
n
X
~ (x1 , x2 , ..., xn ) = @f (x1 , x2 , ..., xn )
rf ~ei .
i=1
@xi

In particular, in R2 , the gradient is


~ (x, y) = fx (x, y)~i + fy (x, y)~j
rf

and in R3 , the gradient is defined as


~ (x, y, z) = fx (x, y, z)~i + fy (x, y, z)~j + fz (x, y, z)~k.
rf

Sometimes, the gradient vector is written as r or grad(f ), so

~ ⌘ r ⌘ grad.
r

Dr Yuliya Kyrychko 61 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

The symbol r is read as ”nabla” (from ancient Hebrew), and short notation for the directional
derivative has the form
~ (x,0 , y0 ) · ~u,
D~u f (x,0 , y0 ) = rf ~ (x,0 , y0 , z0 ) · ~u,
D~u f (x,0 , y0 , z0 ) = rf ~ · ~u,
D~u f = rf

where · denotes the scalar/dot product. This representation is useful since we know that the
scalar/dot product m~ · ~n of two non-zero vectors equals the product |m||~
~ n| cos ✓ of their lengths
and the cosine of the angle ✓ between them. Since ~u is a unit vector, its length |~u| is equal to
1, and we obtain the following theorem.

~ (x0 , y0 ) is not a zero vector, then for any unit vector ~u


Theorem 19 If rf
~ (x0 , y0 )| cos ✓,
D~u f (x0 , y0 ) = |rf (4.1)

where ✓ is the angle between rf ~ and ~u (see Fig. 4.4). If rf


~ (x0 , y0 ) is a zero vector, then
D~u f (x0 , y0 ) = 0 for any unit vector ~u.

~ and ~u.
Figure 4.4: An angle between rf

~ (x0 , y0 )| is a
It is clear from the expression (4.1) that if the point (x0 , y0 ) is fixed, then |rf
positive constant, and as ✓ changes, cos ✓ varies between 1 and 1. Moreover, cos ✓ = 1 when
~ (x0 , y0 ) and ~u have the same direction, and cos ✓ = 1 when rf
rf ~ (x0 , y0 ) and ~u have opposite
~
directions and ✓ is a straight angle, and cos ✓ = 0 when rf (x0 , y0 ) and ~u are perpendicular, so
that ✓ is the right angle. This gives the following theorem.
~ (x0 , y0 ) is not a zero vector. Then
Theorem 20 Suppose that rf
~ (x0 , y0 )| and occurs for ~u with
(i) the maximum directional derivative of f at (x0 , y0 ) is |rf
~ (x0 , y0 );
the same direction as rf

(ii) the minimum directional derivative of f at (x0 , y0 ) is ~ (x0 , y0 )| and occurs for ~u with
|rf
~ (x0 , y0 );
the opposite direction as rf

(iii) the directional derivative of f at (x0 , y0 ) is zero for ~u with either of the two directions
~ (x0 , y0 ).
perpendicular to rf

Dr Yuliya Kyrychko 62 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

Example: Draw rf (1, 1), rf ( 1, 2), and rf ( 2, 1) for f (x, y) = x2 y.

~ ⌘ r ⌘ grad! First, we calculate the gradient of f :


Solution. Remember that r
✓ ◆
@ 2 @ 2
rf (x, y) = xy , xy = (2xy, x2 ).
@x @y
Now,

rf (1, 1) = (2, 1)
rf ( 1, 2) = ( 4, 1)
rf ( 2, 11) = (4, 4).

The vectors are shown in Fig. 4.5. ⌅

Figure 4.5: Vectors rf (1, 1) = (2, 1), rf ( 1, 2) = ( 4, 1), and rf ( 2, 11) = (4, 4).

Example:
(i) Find the maximum directional derivative of h(x, y) = y 2 e2x at the point (2, 1), and
establish in the direction of which unit vector it occurs.

(ii) Find the minimum directional derivative of h(x, y) = y 2 e2x at the point (2, 1), and
establish in the direction of which unit vector it occurs.

Solution. We start by finding the gradient of h(x, y) as follows


✓ ◆
@ @
rh(x, y) = y 2 e2x , y 2 e2x = (2y 2 e2x , 2ye2x ),
@x @y
and
rh(2, 1) = (2e4 , 2e4 ).

Dr Yuliya Kyrychko 63 y.kyrychko@sussex.ac.uk


Calculus of Several Variables (G5210) 2018-19 Lecture notes

(i) From the Theorem 20, we know that the maximum directional derivative is
p p
|rh()| = |(2e4 , 2e4 )| = (2e4 )2 + ( 2e4 )2 = 8e4 ,

and it occurs in the direction of the unit vector


rh(2, 1) (2e4 , 2e4 ) (1, 1)
~u = = p = p .
|rh(2, 1)| 8e 4 2

(ii) From Theorem 20, we know that the minimum directional derivative is
p 4
|rh(2, 1) = 8e ,

and it occurs in the direction of the unit vector


(2e4 , 2e4 ) ( 1, 1)
~u = p = p .
8e 4 2

Dr Yuliya Kyrychko 64 y.kyrychko@sussex.ac.uk


Chapter 5

Double integrals

5.1 Introduction
Before we look at the multiple integrals, let us recall a few things about integrals for functions
of one variable. Suppose function y = f (x) is non-negative and continuous on the interval
[a, b]. The figure bounded by the graph of the function y = f (x), the x-axis and the vertical
lines x = a and x = b as shown in Fig 5.1 is called a curvilinear trapezoid. The area of the
curvilinear trapezoid is Z b
A= f (x)dx. (5.1)
a

Figure 5.1: A curvilinear trapezoid.

Example: Find the area of the figure bounded by the ellipse


x2 y 2
+ 2 = 1.
a2 b

Solution. The area of the ellipse is 4 times larger than the shaded area shown in Fig.r5.2. The
x2
shaded area can be calculated using the formula (5.1) by taking a = 0, b = a, f (x) = b 1 .
a2
Therefore,
Z ar
x2
A = 4b 1 dx.
0 a2

65

You might also like