Another approach to calculating a directional derivative involves partial derivatives, as outlined in the following theorem.
Directional derivative of a function of two variables
Let
z
=
f
(
x
,
y
) be a function of two variables
x
and
y
, and assume that
f
x and
f
y exist. Then the directional derivative of
f in the direction of
u
=
cos
θ
i
+
sin
θ
j is given by
D
u
f
(
x
,
y
)
=
f
x
(
x
,
y
)
cos
θ
+
f
y
(
x
,
y
)
sin
θ
.
Proof
[link] states that the directional derivative of
f in the direction of
u
=
cos
θ
i
+
sin
θ
j is given by
D
u
f
(
a
,
b
)
=
lim
t
→
0
f
(
a
+
t
cos
θ
,
b
+
t
sin
θ
)
−
f
(
a
,
b
)
t
.
Let
x
=
a
+
t
cos
θ and
y
=
b
+
t
sin
θ
, and define
g
(
t
)
=
f
(
x
,
y
)
. Since
f
x and
f
y both exist, we can use the chain rule for functions of two variables to calculate
g
′
(
t
)
:
g
′
(
t
)
=
∂
f
∂
x
d
x
d
t
+
∂
f
∂
y
d
y
d
t
=
f
x
(
x
,
y
)
cos
θ
+
f
y
(
x
,
y
)
sin
θ
.
If
t
=
0
, then
x
=
x
0 and
y
=
y
0
, so
g
′
(
0
)
=
f
x
(
x
0
,
y
0
)
cos
θ
+
f
y
(
x
0
,
y
0
)
sin
θ
.
By the definition of
g
′
(
t
)
, it is also true that
g
′
(
0
)
=
lim
t
→
0
g
(
t
)
−
g
(
0
)
t
=
lim
t
→
0
f
(
x
0
+
t
cos
θ
,
y
0
+
t
sin
θ
)
−
f
(
x
0
,
y
0
)
t
.
Therefore,
D
u
f
(
x
0
,
y
0
)
=
f
x
(
x
,
y
)
cos
θ
+
f
y
(
x
,
y
)
sin
θ
.
□
Finding a directional derivative: alternative method
Let
θ
=
arccos
(
3
/
5
)
. Find the directional derivative
D
u
f
(
x
,
y
) of
f
(
x
,
y
)
=
x
2
−
x
y
+
3
y
2 in the direction of
u
=
(
cos
θ
)
i
+
(
sin
θ
)
j
. What is
D
u
f
(
−1
,
2
)
?
First, we must calculate the partial derivatives of
f
:
f
x
=
2
x
−
y
f
y
=
−
x
+
6
y
,
Then we use
[link] with
θ
=
arccos
(
3
/
5
)
:
D
u
f
(
x
,
y
)
=
f
x
(
x
,
y
)
cos
θ
+
f
y
(
x
,
y
)
sin
θ
=
(
2
x
−
y
)
3
5
+
(
−
x
+
6
y
)
4
5
=
6
x
5
−
3
y
5
−
4
x
5
+
24
y
5
=
2
x
+
21
y
5
.
To calculate
D
u
f
(
−1
,
2
)
, let
x
=
−1 and
y
=
2
:
D
u
f
(
−1
,
2
)
=
2
(
−1
)
+
21
(
2
)
5
=
−2
+
42
5
=
8
.
This is the same answer obtained in
[link] .
Got questions? Get instant answers now! Got questions? Get instant answers now!
Find the directional derivative
D
u
f
(
x
,
y
) of
f
(
x
,
y
)
=
3
x
2
y
−
4
x
y
3
+
3
y
2
−
4
x in the direction of
u
=
(
cos
π
3
)
i
+
(
sin
π
3
)
j using
[link] . What is
D
u
f
(
3
,
4
)
?
D
u
f
(
x
,
y
)
=
(
6
x
y
−
4
y
3
−
4
)
(
1
)
2
+
(
3
x
2
−
12
x
y
2
+
6
y
)
3
2
D
u
f
(
3
,
4
)
=
72
−
256
−
4
2
+
(
27
−
576
+
24
)
3
2
=
−94
−
525
3
2
Got questions? Get instant answers now!
If the vector that is given for the direction of the derivative is not a unit vector, then it is only necessary to divide by the norm of the vector. For example, if we wished to find the directional derivative of the function in
[link] in the direction of the vector
〈
−5
,
12
〉
, we would first divide by its magnitude to get
u
. This gives us
u
=
〈
−
(
5
/
13
)
,
12
/
13
〉
. Then
D
u
f
(
x
,
y
)
=
∇
f
(
x
,
y
)
·
u
=
−
5
13
(
2
x
−
y
)
+
12
13
(
−
x
+
6
y
)
=
−
22
13
x
+
17
13
y
.
Gradient
The right-hand side of
[link] is equal to
f
x
(
x
,
y
)
cos
θ
+
f
y
(
x
,
y
)
sin
θ
, which can be written as the dot product of two vectors. Define the first vector as
∇
f
(
x
,
y
)
=
f
x
(
x
,
y
)
i
+
f
y
(
x
,
y
)
j and the second vector as
u
=
(
cos
θ
)
i
+
(
sin
θ
)
j
. Then the right-hand side of the equation can be written as the dot product of these two vectors:
D
u
f
(
x
,
y
)
=
∇
f
(
x
,
y
)
·
u
.
The first vector in
[link] has a special name: the gradient of the function
f
. The symbol
∇ is called
nabla and the vector
∇
f is read
“del
f
.”
Definition
Let
z
=
f
(
x
,
y
) be a function of
x
and
y such that
f
x and
f
y exist. The vector
∇
f
(
x
,
y
) is called the
gradient of
f and is defined as
∇
f
(
x
,
y
)
=
f
x
(
x
,
y
)
i
+
f
y
(
x
,
y
)
j
.
The vector
∇
f
(
x
,
y
) is also written as
“grad
f
.”
Finding gradients
Find the gradient
∇
f
(
x
,
y
) of each of the following functions:
f
(
x
,
y
)
=
x
2
−
x
y
+
3
y
2
f
(
x
,
y
)
=
sin
3
x
cos
3
y
For both parts a. and b., we first calculate the partial derivatives
f
x and
f
y
, then use
[link] .
f
x
(
x
,
y
)
=
2
x
−
y
and
f
y
(
x
,
y
)
=
−
x
+
6
y
,
so
∇
f
(
x
,
y
)
=
f
x
(
x
,
y
)
i
+
f
y
(
x
,
y
)
j
=
(
2
x
−
y
)
i
+
(
−
x
+
6
y
)
j
.
f
x
(
x
,
y
)
=
3
cos
3
x
cos
3
y
and
f
y
(
x
,
y
)
=
−3
sin
3
x
sin
3
y
,
so
∇
f
(
x
,
y
)
=
f
x
(
x
,
y
)
i
+
f
y
(
x
,
y
)
j
=
(
3
cos
3
x
cos
3
y
)
i
−
(
3
sin
3
x
sin
3
y
)
j
. Got questions? Get instant answers now! Got questions? Get instant answers now!
Find the gradient
∇
f
(
x
,
y
) of
f
(
x
,
y
)
=
(
x
2
−
3
y
2
)
/
(
2
x
+
y
)
.
∇
f
(
x
,
y
)
=
2
x
2
+
2
x
y
+
6
y
2
(
2
x
+
y
)
2
i
−
x
2
+
12
x
y
+
3
y
2
(
2
x
+
y
)
2
j
Got questions? Get instant answers now!