Multivariable calculus
Gradient of x^2 y - 3yz + z^3: Term by Term
For f(x, y, z) = x^2 y - 3yz + z^3 the gradient is (2xy, x^2 - 3z, 3z^2 - 3y). The cross term -3yz contributes to both the y and the z component, carrying its minus sign into each. At (2, 1, 1) the gradient is (4, 1, 0).
Scan all three terms for every component
With a sum, the work is bookkeeping: for each variable, go through all three terms and ask whether that term contains the variable. For , only does, and is a constant multiplier.
For , two terms contain it: gives , and gives . The cube has no .
For , the terms and both contribute, giving and .
The cross term is the one doing double duty. It shows up in two of the three components, and it is the reason the components are not independent of each other.
The mistake: losing the cross term or its sign
The two errors here are dropping from one of the components and copying its sign wrongly. Because the term appears in the and partials, an omission in either place produces an answer that looks plausible and is wrong at almost every point.
- In the surviving piece is , not and not . The is what gets differentiated away.
- In it is , and the minus sign travels with it.
- The term contributes to two components as well, and . Only is confined to a single component.
A useful habit is to write the function as a column of terms and tick off each one as you scan for a variable. Errors here are almost never conceptual, they are missed terms.
A worked value and the only critical point
At the function value is .
The component is zero at this point because and happen to balance there. Moving in the direction changes only at second order from , while the direction is four times more productive than the direction.
For critical points, solve , and together. If then and so . If instead then , so and . Either branch lands on the origin, which is the only critical point of this function.
Frequently asked questions
Why does contain a ?
Because the term has as a constant multiplier while is differentiated. The power rule turns into and the rides along, giving .
How can the component be zero when the function clearly depends on ?
A component of the gradient is a rate at one point, not a statement about the whole function. At the two contributions, and , cancel exactly. Move to and the component becomes .