Multivariable calculus

Gradient of x^3 + y^3 - 3xy: Steps and Critical Points

For f(x, y) = x^3 + y^3 - 3xy the gradient is (3x^2 - 3y, 3y^2 - 3x). At (2, 1) it equals (9, -3). Setting both components to zero gives exactly two critical points, the origin and (1, 1). The origin is a saddle and (1, 1) is a local minimum with value -1.

f(x,y)=x3+y3−3xyf(x,y) = x^3 + y^3 - 3xy
∇f(x,y)=⟨3x2−3y, 3y2−3x⟩\nabla f(x,y) = \left\langle 3x^2 - 3y,\ 3y^2 - 3x \right\rangle
∂f∂x=3x2−3y\frac{\partial f}{\partial x} = 3x^2 - 3y
∂f∂y=3y2−3x\frac{\partial f}{\partial y} = 3y^2 - 3x

Three terms, and each partial keeps two of them

Hold yy fixed. The term y3y^3 is a pure constant and drops out, while −3xy-3xy has −3y-3y sitting in front of a single xx.

∂f∂x=3x2+0−3y=3x2−3y\frac{\partial f}{\partial x} = 3x^2 + 0 - 3y = 3x^2 - 3y

Hold xx fixed instead. Now x3x^3 is the constant that vanishes, and −3xy-3xy leaves −3x-3x behind.

∂f∂y=0+3y2−3x=3y2−3x\frac{\partial f}{\partial y} = 0 + 3y^2 - 3x = 3y^2 - 3x
∇f(x,y)=⟨3x2−3y, 3y2−3x⟩\nabla f(x,y) = \left\langle 3x^2 - 3y,\ 3y^2 - 3x \right\rangle

At (2,1)(2,1) this gives ⟨12−3, 3−6⟩=⟨9,−3⟩\langle 12 - 3,\ 3 - 6\rangle = \langle 9, -3\rangle. Notice the pleasing symmetry: swapping xx and yy in ff leaves it unchanged, and it swaps the two gradient components.

The mistake: letting the cube die in the wrong partial

The two frequent wrong answers are ⟨3x2−3y, 3y2⟩\langle 3x^2 - 3y,\ 3y^2\rangle and ⟨3x2, 3y2−3x⟩\langle 3x^2,\ 3y^2 - 3x\rangle. In each case the −3xy-3xy term has been used once and then forgotten, as though a term can only be spent on one component.

Each partial derivative is a fresh calculation on the entire function. The term −3xy-3xy contains both variables, so it appears in both components, contributing −3y-3y to one and −3x-3x to the other.

  • y3y^3 vanishes under ∂∂x\frac{\partial}{\partial x} because it has no xx; −3xy-3xy does not vanish because it does.
  • The symmetry of ff is a free check. If your two components are not mirror images under swapping xx and yy, one of them is wrong.
  • Slice check at y=1y = 1: f(x,1)=x3+1−3xf(x,1) = x^3 + 1 - 3x has derivative 3x2−33x^2 - 3, which matches 3x2−3y3x^2 - 3y at y=1y = 1.

Solving for the critical points

Set both components to zero. Dividing each by 33 gives x2=yx^2 = y and y2=xy^2 = x, a pair of parabolas that cross where the gradient dies.

Substitute the first into the second: (x2)2=x\left(x^2\right)^2 = x, so x4−x=0x^4 - x = 0 and x(x3−1)=0x\left(x^3 - 1\right) = 0. Over the reals that leaves x=0x = 0 and x=1x = 1, giving the points (0,0)(0,0) and (1,1)(1,1).

Classify them with the discriminant D=fxxfyy−fxy2D = f_{xx}f_{yy} - f_{xy}^2, where fxx=6xf_{xx} = 6x, fyy=6yf_{yy} = 6y and fxy=−3f_{xy} = -3.

D(0,0)=0−9=−9,D(1,1)=36−9=27D(0,0) = 0 - 9 = -9, \qquad D(1,1) = 36 - 9 = 27

So the origin is a saddle, and (1,1)(1,1) has D>0D > 0 with fxx=6>0f_{xx} = 6 > 0, making it a local minimum with f(1,1)=1+1−3=−1f(1,1) = 1 + 1 - 3 = -1. It is not a global minimum: along the line y=0y = 0, f=x3f = x^3 runs off to negative infinity.

Frequently asked questions

Why does x^3 + y^3 - 3xy have no global maximum or minimum?

The cubes dominate far from the origin. Along y=0y = 0 the function is x3x^3, which goes to +∞+\infty as xx grows and to −∞-\infty as xx falls. A function unbounded in both directions can only have local extremes.

What is the direction of steepest descent at (2, 1)?

The negative gradient, −∇f(2,1)=⟨−9,3⟩-\nabla f(2,1) = \langle -9, 3\rangle, or as a unit vector 110⟨−3,1⟩\frac{1}{\sqrt{10}}\langle -3, 1\rangle. The function falls at rate ∣∇f∣=81+9=310\left|\nabla f\right| = \sqrt{81 + 9} = 3\sqrt{10} in that direction.