Example 10.4. A function of three variables. The temperature at
the point (x, y, z) is
𝑇𝑇(𝑥𝑥, 𝑦𝑦, 𝑧𝑧) = 𝑥𝑥e𝑦𝑦𝑦𝑦−𝑥𝑥
(a) A bug is at the point (2, 1, 2) and is flying through the air. Find
an expression for the rate at which the temperature of the air
around it changes in terms of the rates of change of its coordinates
𝑥𝑥̇ , 𝑦𝑦̇ and 𝑧𝑧̇ . [Answer: 𝑇𝑇̇ = −𝑥𝑥̇ + 4𝑦𝑦̇ + 2𝑧𝑧̇ ]
(b) Suppose the path of the bug is described by the equation
𝑥𝑥
𝑡𝑡 + 2
�𝑦𝑦� = �𝑡𝑡 2 + 1�
𝑧𝑧
2 − 𝑡𝑡
where t is time. Using the temperature function above, at what
rate does it experience the temperature changing at t =0?
t
x
y
z
[Answer: –3]
(c) Suppose the bug in part (a) flies through the point (2, 1, 2) at speed 1 in the direction of the vector
[1, 2, –1]. What is the rate at which the temperature of the air around it changes? [Answer: 𝑇𝑇̇ = 5/√6]
T
11. Gradient and directional derivative.
The directional derivative
We return to the paraboloid of Example 6.1.
𝑧𝑧 = 𝑓𝑓(𝑥𝑥, 𝑦𝑦) = 25 − 𝑥𝑥 2 + 𝑥𝑥𝑥𝑥 − 4𝑦𝑦 2
Suppose you are standing on the surface at the point (𝑥𝑥0 , 𝑦𝑦0 , 𝑧𝑧0 )
and begin walking up the hill in the direction of the
(horizontal) vector [a, b]. Use the multivariable chain rule to
find a general expression for the slope of your path at that
point.
Definition. The directional derivative of f(x, y) at the point (𝑥𝑥0 , 𝑦𝑦0 ) in the direction of
the vector [a, b] is defined as
𝐷𝐷[𝑎𝑎,𝑏𝑏] 𝑓𝑓(𝑥𝑥0 , 𝑦𝑦0 ) =
𝑓𝑓𝑥𝑥 (𝑥𝑥0 , 𝑦𝑦0 )𝑎𝑎 + 𝑓𝑓𝑦𝑦 (𝑥𝑥0 , 𝑦𝑦0 )𝑏𝑏
√𝑎𝑎2 + 𝑏𝑏 2
=
∇𝑓𝑓 ∙ 𝐮𝐮
‖𝐮𝐮‖
This gives us the slope of the surface 𝑧𝑧 = 𝑓𝑓(𝑥𝑥, 𝑦𝑦) at the point (𝑥𝑥0 , 𝑦𝑦0 ) in the direction
of the vector 𝐮𝐮 = [𝑎𝑎, 𝑏𝑏].
Example 11.1. Find the slope of the paraboloid above at the point (3, 1, 15) in the direction [–2, –1].
[Answer: 𝑚𝑚 = 3√5]
The Gradient
Recall that we have defined the gradient of a function f of x and y at the point (𝑥𝑥0 , 𝑦𝑦0 ) as the vector of its
partial derivatives ∇𝑓𝑓 = [𝑓𝑓𝑥𝑥 𝑓𝑓𝑦𝑦 ], or more completely:
∇𝑓𝑓(𝑥𝑥0 , 𝑦𝑦0 ) = [𝑓𝑓𝑥𝑥 (𝑥𝑥0 , 𝑦𝑦0 ) 𝑓𝑓𝑦𝑦 (𝑥𝑥0 , 𝑦𝑦0 )]
This concept gives us a natural way of writing the multivariable chain rule and the directional derivative
as a simple dot product.
Example 11.2. How does the gradient interact with the graph of
the function f? What’s the “geometry” of the configuration?
Consider the directional derivative of f in any direction u:
𝐷𝐷𝐮𝐮 𝑓𝑓 =
∇𝑓𝑓 ∙ 𝐮𝐮 ‖∇𝑓𝑓‖ ‖𝐮𝐮‖ cos(𝜑𝜑)
=
= ‖∇𝑓𝑓‖ cos(𝜑𝜑)
‖𝐮𝐮‖
‖𝐮𝐮‖
This equation shows that 𝐷𝐷𝐮𝐮 𝑓𝑓 depends only on the length of the
vector ∇𝑓𝑓 and the angle φ between ∇𝑓𝑓 and the direction vector
u. We can deduce a couple of important things from that.
First, 𝐷𝐷𝐮𝐮 𝑓𝑓 will be zero when φ = 90º. Now note that 𝐷𝐷𝐮𝐮 𝑓𝑓 will
also be zero in the direction of any level curve of f. We deduce
that ∇𝑓𝑓 is orthogonal to the level curve of f passing through
(𝑥𝑥0 , 𝑦𝑦0 ).
Secondly, 𝐷𝐷𝐮𝐮 𝑓𝑓 will be a maximum when φ = 0°, that is when u
points in the same direction as ∇𝑓𝑓. Turning this around:
∇f points in the direction of maximum rate of increase of f(x, y).
Further, this maximum rate of increase is:
𝐷𝐷𝐮𝐮 𝑓𝑓 = ‖∇𝑓𝑓‖ cos(0) = ‖∇𝑓𝑓‖
which is the length of the gradient vector.
To Summarize:
(1) ∇𝑓𝑓 is orthogonal to the level curve
(2) The maximum value that 𝐷𝐷𝐮𝐮 𝑓𝑓 attains is the magnitude ‖∇𝑓𝑓‖ of the gradient.
(3) This maximum is attained in the direction of the gradient ∇𝑓𝑓.
Example 11.3. We have defined the gradient for functions of two variables. But the notion
extends to any number of variables. Let the temperature (ºC) at a point (x, y, z) in space be
𝑇𝑇(𝑥𝑥, 𝑦𝑦. 𝑧𝑧) = 4 + 𝑥𝑥 2 + 2𝑦𝑦 3 + 3𝑧𝑧 3
In which direction from the point (3, 2, 1) does the temperature increase most quickly, and what
is this maximum rate of increase?
Example 11.4. Below are diagramed a set of contour lines
for the function f ( x, y ) =
18 y
x2 + y2 +1
on the domain y ≥ 0.
The zero level curve is the x-axis and as we move towards
the top of the hill at (0, 1) the level curves are spaced at
intervals of ∆z = 0.5.
(a) Starting at (3, 0), sketch my path if I always ascend the
hill most steeply.
(b) Starting at (3, 0), sketch a path that ascends the hill with
a slope of 1.
5
6
7
8
4
3
2
1
0
(c) Use the spacing of the contour lines to draw the gradient vector of f at the point (1, 2).
Check your work using the given formula for f.
Example 11.5. These diagrams depict a surface in R3. We have two ways of thinking about this surface
1) as the graph z = f(x, y) of a function f of two variables
2) as a level surface T(x, y, z) = k of a function T of three variables.
In this case take 𝑇𝑇(𝑥𝑥, 𝑦𝑦, 𝑧𝑧) = 𝑧𝑧 − 𝑓𝑓(𝑥𝑥, 𝑦𝑦)
Using the diagrams, depict the gradient vector of each function and find an equation for the plane tangent
to the surface in terms of each function. Recall that the gradient of a function f at a point is the vector of
partial derivatives at that point and it points in the direction of the maximum rate of increase of f.