Steply

Gradient of f(x, y, z) = x^2 + y^2 + z^2 at (1, 2, 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) = x² + y² + z² at (1, 2, 2).

f(x, y, z) = x2 + y2 + z2

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.

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

∂f∂x = 2x + 0 + 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.

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

∂f∂y = 0 + 2y + 0

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

∂f∂y = 2y

Term by term.

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

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

z²: the power 2 comes down.

The power goes down by 1.

So 2z.

∂f∂z = 0 + 0 + 2z

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

∂f∂z = 2z

2 Find the gradient

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

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

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

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

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

∇f(1, 2, 2) = ⟨2, 4, 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 2.

It matches 2.

Right!

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

Move y by 0.001: about 4.

It matches 4.

Right!

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

Move z by 0.001: about 4.

It matches 4.

Right!

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

Let's look back.

First: the partial derivatives.

Then: find the gradient.

Last: check.

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

Your turn

Try this one yourself, then check:

Find the gradient of f(x, y, z) = x2 + y2 + 3z2
Show the answer
∇f(2, 1, 1) = ⟨4, 2, 6⟩

More from Gradient and directional derivative

The whole lesson: Gradient and directional derivative →