Steply

Directional derivative of f(x, y) = xy^2 at (2, 1) in the direction…

Step by step, with the reason for every step · Gradient and directional derivative · Calculus 3

Step by step

The question

Question: find the directional derivative of f(x, y) = xy² at (2, 1), in the direction of ⟨3, -4⟩.

f(x, y) = xy2

1 The partial derivatives

Term by term.

In xy², y² is fixed and waits in front.

x gives 1.

So y².

So ∂f/∂x = y².

∂f∂x = y2

Term by term.

In xy², x is fixed and waits in front.

y² gives 2y.

So 2xy.

So ∂f/∂y = 2xy.

∂f∂y = 2xy

2 Find the gradient

The gradient ∇f puts the partial derivatives together as one vector.

∇f = ⟨∂f∂x, ∂f∂y⟩

So ∇f = ⟨y², 2xy⟩.

∇f = ⟨y2, 2xy⟩

At the point, put x = 2 and y = 1 in: ∇f(2, 1) = ⟨1, 4⟩.

∇f(2, 1) = ⟨1, 4⟩

3 Make it a unit vector

The direction ⟨3, -4⟩ has length 5.

A direction must have length 1.

‖v‖ = √3² + (−4)² = 5

So divide each part by 5: u = ⟨3/5, −4/5⟩.

u = ⟨35, −45⟩

4 Dot with the gradient

The slope in direction u is the gradient dot u.

Duf = ∇f • u

Multiply the matching parts and add.

Duf = 1 × 35 + 4 × (−45)

Careful!

With ⟨3, -4⟩ itself, the answer would be 5 times too big.

Careful: use the unit vector u

1 times 3/5 is 3/5.

4 times −4/5 is −16/5.

Duf = 35 − 165

Add: the slope is −13/5.

Duf = −135

5 Check

Let's check: take a tiny step of 0.001 along u.

The change in f/0.001 is about −2.6.

f(2.0006, 0.9992) − f(2, 1)0.001 ≈ −2.6

Our answer −13/5 is −2.6.

Almost the same.

Right!

−13/5 = −2.6

Let's look back.

First: the partial derivatives.

Then: find the gradient.

Then: make it a unit vector.

Then: dot with the gradient.

Last: check.

Answer
Duf = −135

Your turn

Try this one yourself, then check:

Find the directional derivative of f(x, y) = 3xy2
Show the answer
Duf = −3

More from Gradient and directional derivative

The whole lesson: Gradient and directional derivative →