Steply

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

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) = x² + y² at (1, 2), in the direction of ⟨3, 4⟩.

f(x, y) = x2 + y2

1 The partial derivatives

Term by term.

x²: the power 2 comes down.

The power goes down by 1.

So 2x.

y² has no x: it is a fixed number, so it gives 0.

∂f∂x = 2x + 0

Drop the zeros: ∂f/∂x = 2x.

∂f∂x = 2x

Term by term.

x² has no y: it is a fixed number, so it gives 0.

y²: the power 2 comes down.

The power goes down by 1.

So 2y.

∂f∂y = 0 + 2y

Drop the zeros: ∂f/∂y = 2y.

∂f∂y = 2y

2 Find the gradient

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

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

So ∇f = ⟨2x, 2y⟩.

∇f = ⟨2x, 2y⟩

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

∇f(1, 2) = ⟨2, 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 = 2 × 35 + 4 × 45

Careful!

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

Careful: use the unit vector u

2 times 3/5 is 6/5.

4 times 4/5 is 16/5.

Duf = 65 + 165

Add: the slope is 22/5.

Duf = 225

5 Check

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

The change in f/0.001 is about 4.4.

f(1.0006, 2.0008) − f(1, 2)0.001 ≈ 4.401

Our answer 22/5 is 4.4.

Almost the same.

Right!

22/5 = 4.4

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 = 225

Your turn

Try this one yourself, then check:

Find the directional derivative of f(x, y) = x2 + 3y2
Show the answer
Duf = 18

More from Gradient and directional derivative

The whole lesson: Gradient and directional derivative →