Multivariable calculus
Gradient of xy + yz + zx: Symmetric Quadratic Form
For f(x, y, z) = xy + yz + zx the gradient is (y + z, x + z, x + y). Each component is the sum of the two variables you did not differentiate, because only the two terms containing that variable survive. At (1, 2, 3) the gradient is (5, 4, 3).
Only the terms containing your variable survive
Differentiate term by term. With respect to , the term gives , the term gives , and the term has no in it, so it contributes zero.
The function is completely symmetric in the three variables, so the other components follow by relabelling. Each one is the sum of the two variables you did not differentiate.
If you write , there is a compact form worth remembering: . It makes the symmetry obvious and speeds up substitution.
The mistake: leaving the variable in its own component
The error to watch for is , which keeps in the answer. It usually comes from differentiating the compact expression carelessly, or from pattern matching on the symmetry without checking the terms.
- Every component of this gradient must be missing its own variable. If appears in , look again.
- A second slip is forgetting the term when differentiating with respect to , giving just . Scan all three terms every time.
- Degree check: is degree 2, so each component must be degree 1. Both and pass that test, which is why the term by term scan matters more here.
Notice also that the gradient of a quadratic is linear, so the components should contain no products and no squares. Anything like inside a component is wrong.
The origin is a saddle, not a minimum
At the value is and the gradient falls out immediately.
For critical points, solve , and together. Subtracting the second from the third gives , and combining with forces and then . The origin is the only critical point.
It is a saddle. Along the line the function is , which climbs away from zero, while along it is , which falls. A single critical point with both behaviours nearby cannot be a maximum or a minimum.
One more identity that shows up in algebra and in optimisation problems with a fixed sum: .
Frequently asked questions
Why does each component leave out its own variable?
Because the two terms containing that variable are each linear in it. Differentiating with respect to leaves , and differentiating leaves . The variable itself is always the factor that gets differentiated away.
Is the gradient ever zero away from the origin?
No. The three equations , , form a linear system whose only solution is , so the origin is the sole critical point.