Multivariable calculus

Directional derivative of x^3 - 3xy^2 at (2, 1)

At (2, 1) the gradient of f(x,y) = x^3 - 3xy^2 is (9, -12). The unit direction (0.8, 0.6) is perpendicular to that gradient, so the directional derivative is exactly 0. Moving that way from (2, 1) keeps you on the level curve of f, at least to first order.

f(x,y)=x33xy2f(x,y) = x^3 - 3xy^2
Duf(2,1)=9(0.8)+(12)(0.6)=0D_{\mathbf{u}} f(2,1) = 9(0.8) + (-12)(0.6) = 0

At x = 2, y = 1, in the unit direction (0.8, 0.6).

The two partials, then the cancellation

Holding yy fixed, x3x^3 gives 3x23x^2 and 3xy2-3xy^2 gives 3y2-3y^2. Holding xx fixed, x3x^3 contributes nothing and 3xy2-3xy^2 gives 6xy-6xy.

f=3x23y2,  6xy,f(2,1)=9,12\nabla f = \left\langle 3x^2 - 3y^2,\; -6xy \right\rangle, \qquad \nabla f(2,1) = \langle 9, -12 \rangle

Now the dot product with u=0.8,0.6\mathbf{u} = \langle 0.8, 0.6 \rangle produces two terms of equal size and opposite sign.

Duf(2,1)=9(0.8)+(12)(0.6)=7.27.2=0D_{\mathbf{u}} f(2,1) = 9(0.8) + (-12)(0.6) = 7.2 - 7.2 = 0

The mistake: reading 0 as a flat point

A zero directional derivative does not mean ff is constant near (2,1)(2,1), and it does not make (2,1)(2,1) a critical point. The gradient there has length 9,12=15\lVert \langle 9, -12 \rangle \rVert = 15, so the surface is steep. Only this one line of directions is flat.

  • Exactly two unit directions give 0 here: 0.8,0.6\langle 0.8, 0.6 \rangle and 0.8,0.6\langle -0.8, -0.6 \rangle
  • The maximum rate is 15, in the direction 0.6,0.8\langle 0.6, -0.8 \rangle
  • A critical point would need both partials to vanish at once, which happens on the lines y=±xy = \pm x only where x=y=0x = y = 0

The other version is a sign slip while finding the perpendicular direction. Rotating 9,12\langle 9, -12 \rangle by a right angle means swapping the components and negating one of them, which gives 12,9\langle 12, 9 \rangle or 12,9\langle -12, -9 \rangle. Swapping without negating gives 12,9\langle -12, 9 \rangle, whose unit form 0.8,0.6\langle -0.8, 0.6 \rangle returns 14.4-14.4 rather than 0.

Zero means tangent to the level curve

The gradient is perpendicular to the level curve through a point. So the directions where the rate is 0 are precisely the ones tangent to that curve, and moving along them holds ff at its current value to first order.

f(2,1)=86=2,f(2,1)u=0    u9,12f(2,1) = 8 - 6 = 2, \qquad \nabla f(2,1) \cdot \mathbf{u} = 0 \iff \mathbf{u} \perp \langle 9, -12 \rangle

Walk a short distance hh along u\mathbf{u} and ff changes only at order h2h^2. At h=0.01h = 0.01 the value moves from 2 to about 1.99988, a drop of about 0.000120.00012. Double hh to 0.020.02 and the drop is about 0.000480.00048, four times as large, which is the signature of a leading h2h^2 term.

A stated zero is the easiest claim to get wrong by accident, so the build rebuilds the gradient of x^3 - 3xy^2 at (2, 1) by central differences and fails unless the dot product with (0.8, 0.6) is still within 1e-4 of 0.

Frequently asked questions

Does a directional derivative of 0 mean I am at a maximum or minimum?

No. It means the direction is tangent to the level curve. A maximum or minimum would require every direction to give 0, which happens only where the whole gradient vanishes.

Which direction gives the largest rate at (2, 1)?

The unit gradient 9,12/15=0.6,0.8\langle 9, -12 \rangle / 15 = \langle 0.6, -0.8 \rangle, with rate 15. Its opposite gives 15-15, the fastest decrease.