Multivariable calculus
Divergence of the Gradient Field of x^3 - 3x y^2
For F equal to the gradient of x^3 - 3x y^2, that is F(x, y) = (3x^2 - 3y^2, -6xy), the divergence is 0 at every point. Divergence of a gradient is the Laplacian, here 6x plus negative 6x. A function whose Laplacian is zero is called harmonic, and this cubic is the standard first example.
Divergence of a gradient is the Laplacian
Start from . Its gradient is the field on this page, so the divergence you are computing is a second derivative of , not a first derivative of something unrelated.
So the two diagonal partials of the field are the two pure second partials of . Compute them and the cancellation is immediate.
Their sum is at every point, so this gradient field is divergence free and is harmonic.
The mistake: concluding f must be constant
A zero answer invites the wrong summary. Nothing here says the field is zero or that is flat. At the field is and is climbing steadily.
What actually vanishes is the sum of two curvatures that are equal and opposite. Along the direction the surface curves upward when ; along the direction it curves downward by exactly the same amount. Cancellation, not absence.
The second half of the mistake is generalising in the wrong direction: assuming every gradient field is divergence free. It is not. The gradient of is , whose divergence is . Being a gradient field says the curl is zero, not the divergence.
Harmonic functions and what they look like
A function with is harmonic, and harmonic functions are the steady states of the heat equation: no point is hotter or colder than the average of its neighbours.
- A non-constant harmonic function has no interior local maximum or minimum, so every critical point it has is a saddle.
- has a single critical point, at the origin, and it is a monkey saddle.
- The value of at the centre of any circle equals its average around that circle.
The cubic earns its place in the textbooks because it is the real part of , and the real part of any polynomial in is harmonic. The imaginary part is harmonic too: expanding gives , whose two pure second partials are and . One cube therefore hands you two different divergence-free gradient fields.
Checked on every build: each component is differentiated numerically with respect to its own variable, and the sum is compared against the divergence above at six sample points.
Frequently asked questions
Does zero divergence mean x^3 - 3x y^2 is constant?
No. It means the two pure second partials, and , cancel. The function itself is far from constant: at it equals and at it equals .
Is every gradient field divergence free?
No. A gradient field always has zero curl, but its divergence is the Laplacian, which is usually nonzero. The gradient of is , with divergence .