Multivariable calculus
Divergence of F = (x^2 y, x y^2)
For F(x, y) = (x^2 y, x y^2) the divergence is 4xy. Differentiating x^2 y with respect to x gives 2xy, differentiating x y^2 with respect to y gives 2xy, and the two add. The result is positive in the first and third quadrants, where the field spreads, and negative in the other two.
Treat the other variable as a coefficient
In the letter is frozen. Frozen means it behaves like the in , so it rides out front while you differentiate .
The second component is the mirror image, with frozen instead.
Now add. The two terms happen to be identical, so .
The mistake: stopping at 2xy
This is the single most common wrong answer on this field, and it is not a calculus error. It is a bookkeeping error. The two partials come out looking the same, and one of them quietly gets treated as a repeat of the other rather than as a second term to add.
Guard against it by writing both partials on their own line before you sum anything, and by counting: a plane field always contributes exactly two terms to the divergence, even when they are twins.
The other slip is inventing a product rule term. Some students write . There is no here: and are independent inputs, not linked by a curve, so the extra term is zero and should never be written.
Reading the sign off the quadrant
Because the answer factors as , its sign is decided by the signs of the coordinates alone.
- First quadrant, and : divergence positive, the field acts as a source.
- Third quadrant, and : the product is positive again, so also a source.
- Second and fourth quadrants: divergence negative, the field acts as a sink.
- On either axis, or : divergence exactly zero.
The two coordinate axes form the dividing curve between source behaviour and sink behaviour. This is the sort of picture you can sketch straight from the algebra, without plotting a single arrow.
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
Why is there no product rule term for y when differentiating x^2 y?
Because is an independent input, not a function of . Holding it fixed makes a constant multiple of , so the derivative is just .
Where is this field divergence free?
Exactly on the coordinate axes. Setting forces or , so the field neither sources nor sinks along either axis.