Multivariable calculus
Curl of the Gradient Field (2xy, x^2 + z^2, 2yz)
The curl of the field with components 2xy, x squared plus z squared, and 2yz is the zero vector. Each pair of cross partials cancels: the x-partial of the second component and the y-partial of the first are both 2x, and the same happens twice more. The field is the gradient of x squared times y plus y times z squared.
Check the three cross derivative pairs
A curl component is a difference of two partials, so it vanishes when the two agree. Take the pairs in order and write both halves down, even the ones that are obviously zero.
Three zeros, so at every point of space. The cancellation is not luck: it is the signature of a field that came from a potential.
Recover the potential
This field is defined and smooth on all of , which is simply connected, so zero curl guarantees a scalar with . Build it one variable at a time, starting from .
The constant of integration is a whole function of the other two variables, since anything without an differentiates to zero in . Pin it down by matching .
Now match : must equal , so is constant. The potential is , and differentiating it back reproduces all three components.
The mistake: stopping after one component
In two variables the whole conservative test is , and that habit carries over badly. In three variables it is only the third component of the curl, and a field can pass it while the other two components are wide awake.
Take . The third component of its curl is , exactly as here, but the first is , so that field has no potential. One component proves nothing.
The second slip is skipping the domain. Zero curl gives a potential on a simply connected region, and nowhere else automatically. Polynomials on all of are the easy case; a field with a line or a plane removed from its domain needs a second thought.
All three components are recomputed on every build by numerically differentiating P, Q and R, so a zero claimed here is a zero the machine has seen.
Frequently asked questions
Does zero curl always mean a potential exists?
On a simply connected domain, yes. This field is smooth on all of , so zero curl is enough and is the potential. On a domain with a line removed, such as the space around the -axis, zero curl does not settle the question and you have to test a loop directly.
Should I check the curl before hunting for a potential?
Yes, it is much faster. Three subtractions either rule the field out or clear it, whereas the potential hunt costs three integrations and a matching step. If any curl component is nonzero the hunt is guaranteed to fail partway through, usually at the stage where an impossible condition on appears.