Steply

Gradient of f(x, y, z) = xy + yz^2 at (1, 1, 2)

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

Step by step

The question

Question: find the gradient of f(x, y, z) = xy + yz² at (1, 1, 2).

f(x, y, z) = xy + yz2

1 The partial derivatives

Term by term.

In xy, y is fixed and waits in front.

x gives 1.

So y.

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

∂f∂x = y + 0

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

∂f∂x = y

Term by term.

In xy, x is fixed and waits in front.

y gives 1.

So x.

In yz², z² is fixed and waits in front.

y gives 1.

So z².

So ∂f/∂y = x + z².

∂f∂y = x + z2

Term by term.

xy has no z: it is a fixed number, so it gives 0.

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

z² gives 2z.

So 2yz.

∂f∂z = 0 + 2yz

Drop the zeros: ∂f/∂z = 2yz.

∂f∂z = 2yz

2 Find the gradient

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

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

So ∇f = ⟨y, x + z², 2yz⟩.

∇f = ⟨y, x + z2, 2yz⟩

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

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

Careful!

The answer has two parts, here three: one for each letter.

It is an arrow, not one number.

Careful: the gradient is a vector, not one number

3 Check

Let's check each part with a tiny step.

Move x by 0.001: about 1.

It matches 1.

Right!

x: f(…x + 0.001…) − f(1, 1, 2)0.001 ≈ 1

Move y by 0.001: about 5.

It matches 5.

Right!

y: f(…y + 0.001…) − f(1, 1, 2)0.001 ≈ 5

Move z by 0.001: about 4.

It matches 4.

Right!

z: f(…z + 0.001…) − f(1, 1, 2)0.001 ≈ 4

Let's look back.

First: the partial derivatives.

Then: find the gradient.

Last: check.

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

Your turn

Try this one yourself, then check:

Find the gradient of f(x, y, z) = 3xy + yz2
Show the answer
∇f(1, 2, 2) = ⟨6, 7, 8⟩

More from Gradient and directional derivative

The whole lesson: Gradient and directional derivative →