Multivariable calculus

Gradient of x^3 y - x y^3: Full Worked Solution

For f(x, y) = x^3 y - x y^3 the gradient is (3x^2 y - y^3, x^3 - 3x y^2). At the point (2, 1) it equals (11, 2). Both terms contain both variables, so both terms contribute to both components, which is where most sign and exponent errors creep in.

f(x,y)=x3yxy3f(x,y) = x^3 y - x y^3
f(x,y)=3x2yy3, x33xy2\nabla f(x,y) = \left\langle 3x^2 y - y^3,\ x^3 - 3x y^2 \right\rangle
fx=3x2yy3\frac{\partial f}{\partial x} = 3x^2 y - y^3
fy=x33xy2\frac{\partial f}{\partial y} = x^3 - 3x y^2

Every term survives both partials, so work term by term

Neither term is free of xx or free of yy, so nothing drops out. Handle one term at a time. For fx\frac{\partial f}{\partial x}, treat yy as a fixed number, which makes yy the coefficient of x3x^3 and y3-y^3 the coefficient of xx.

fx=yx(x3)y3x(x)=3x2yy3\frac{\partial f}{\partial x} = y \cdot \frac{\partial}{\partial x}\left(x^3\right) - y^3 \cdot \frac{\partial}{\partial x}\left(x\right) = 3x^2 y - y^3

For fy\frac{\partial f}{\partial y}, the roles reverse. Now x3x^3 multiplies yy and x-x multiplies y3y^3.

fy=x3y(y)xy(y3)=x33xy2\frac{\partial f}{\partial y} = x^3 \cdot \frac{\partial}{\partial y}\left(y\right) - x \cdot \frac{\partial}{\partial y}\left(y^3\right) = x^3 - 3x y^2
f(x,y)=3x2yy3, x33xy2\nabla f(x,y) = \left\langle 3x^2 y - y^3,\ x^3 - 3x y^2 \right\rangle

At (2,1)(2,1): the first component is 3(4)(1)1=113(4)(1) - 1 = 11 and the second is 83(2)(1)=28 - 3(2)(1) = 2, so f(2,1)=11,2\nabla f(2,1) = \langle 11, 2\rangle.

The mistake: moving the exponent to the wrong variable

The classic wrong second component is 3x23xy23x^2 - 3xy^2, from differentiating x3yx^3 y with respect to yy and pulling the exponent off x3x^3 out of muscle memory. The exponent that moves is the one attached to the variable you are differentiating.

In x3yx^3 y the yy carries an invisible exponent of 11. Bringing it down and reducing gives x31y0=x3x^3 \cdot 1 \cdot y^0 = x^3, so the whole x3x^3 rides along untouched.

  • y(x3y)=x3\frac{\partial}{\partial y}\left(x^3 y\right) = x^3, not 3x23x^2 and not 3x2y3x^2 y.
  • Watch the minus sign on xy3-xy^3: it stays with the term, giving 3xy2-3xy^2 in the yy partial and y3-y^3 in the xx partial.
  • Symmetry check: swapping xx and yy turns ff into f-f, and it also swaps the two gradient components with a sign flip. Both answers pass that test.

Where the gradient is zero

Factor each component. The first is y(3x2y2)y\left(3x^2 - y^2\right) and the second is x(x23y2)x\left(x^2 - 3y^2\right), and both must vanish at once.

Suppose y=0y = 0. Then the second equation becomes x3=0x^3 = 0, forcing x=0x = 0. Suppose instead 3x2=y23x^2 = y^2. Substituting into the second component gives x(x29x2)=8x3=0x\left(x^2 - 9x^2\right) = -8x^3 = 0, so again x=0x = 0 and then y=0y = 0. The origin is the only critical point.

The function itself factors as f=xy(xy)(x+y)f = xy(x - y)(x + y), so it is zero on four lines through the origin and alternates sign between them, eight sectors in all. That confirms the origin is a saddle rather than an extreme value.

Frequently asked questions

What is the maximum rate of increase of x^3 y - x y^3 at (2, 1)?

It is the length of the gradient there, 11,2=121+4=125=55\left|\langle 11, 2\rangle\right| = \sqrt{121 + 4} = \sqrt{125} = 5\sqrt{5}, which is about 11.1811.18. It is achieved in the direction 15511,2\frac{1}{5\sqrt{5}}\langle 11, 2\rangle.

Do the mixed second partials of this function agree?

Yes. Differentiating 3x2yy33x^2 y - y^3 with respect to yy gives 3x23y23x^2 - 3y^2, and differentiating x33xy2x^3 - 3xy^2 with respect to xx gives the same 3x23y23x^2 - 3y^2. Clairaut's theorem guarantees this for any polynomial.