Multivariable calculus
Divergence of the Radial Field F = (x, y)
For the radial field F(x, y) = (x, y) the divergence is the constant 2. Both diagonal partials equal 1, and 1 plus 1 is 2. The value does not depend on x or y, so the field spreads at the same rate everywhere: every point in the plane acts as a source of identical strength.
Differentiate each component with respect to its own variable
Divergence eats a vector field and returns a number at each point. You differentiate the first component with respect to , the second with respect to , and add. Only those two diagonal pairings appear.
Here and , so both derivatives are as easy as derivatives get.
Adding gives at every point of the plane, the origin included.
The mistake: adding the wrong two partials
This field has four first partials, and only two of them belong to the divergence.
- and : these two are the divergence.
- and : these two are the curl.
- Swap the pairs and you report a divergence of when the true value is : you have read the curl's two partials and put the divergence's name on them.
The other habit to break is stacking instead of summing. If your answer is , you have built a vector, which is what the gradient does. Divergence of a plane field is one number.
Why a constant answer is the right shape here
Picture the arrows: at each point the arrow points straight away from the origin, with length equal to the distance from the origin. Far out the arrows are long, near the origin they are short. Divergence does not measure that length. It measures how fast nearby arrows spread apart.
That spreading rate is the same everywhere, which is what the constant records. Read as a fluid velocity, a small blob carried by this flow grows its area at a relative rate of per unit time no matter where it starts.
The pattern generalises: in dimensions the field has divergence , because each of the diagonal partials contributes exactly .
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
Is the divergence of (x, y) smaller near the origin, where the arrows are short?
No. It equals at every point, origin included. Short arrows near the origin still spread apart at the same relative rate, and that rate is what divergence measures.
What is the divergence of the 3D radial field (x, y, z)?
It is . The computation is the same with one more term: .