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.

P(x,y,z)=2xyP(x,y,z) = 2xy
Q(x,y,z)=x2+z2Q(x,y,z) = x^2 + z^2
R(x,y,z)=2yzR(x,y,z) = 2yz
∇×F=⟨0, 0, 0⟩\nabla \times \mathbf{F} = \langle 0,\ 0,\ 0 \rangle

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.

∂R∂y=2z,∂Q∂z=2z⇒2z−2z=0\frac{\partial R}{\partial y} = 2z, \qquad \frac{\partial Q}{\partial z} = 2z \quad \Rightarrow \quad 2z - 2z = 0
∂P∂z=0,∂R∂x=0⇒0−0=0\frac{\partial P}{\partial z} = 0, \qquad \frac{\partial R}{\partial x} = 0 \quad \Rightarrow \quad 0 - 0 = 0
∂Q∂x=2x,∂P∂y=2x⇒2x−2x=0\frac{\partial Q}{\partial x} = 2x, \qquad \frac{\partial P}{\partial y} = 2x \quad \Rightarrow \quad 2x - 2x = 0

Three zeros, so ∇×F=0\nabla \times \mathbf{F} = \mathbf{0} 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 R3\mathbb{R}^3, which is simply connected, so zero curl guarantees a scalar ff with ∇f=F\nabla f = \mathbf{F}. Build it one variable at a time, starting from PP.

f=∫2xy dx=x2y+g(y,z)f = \int 2xy \,dx = x^2 y + g(y,z)

The constant of integration is a whole function of the other two variables, since anything without an xx differentiates to zero in xx. Pin it down by matching QQ.

∂f∂y=x2+∂g∂y=x2+z2⇒g=yz2+h(z)\frac{\partial f}{\partial y} = x^2 + \frac{\partial g}{\partial y} = x^2 + z^2 \quad \Rightarrow \quad g = yz^2 + h(z)

Now match RR: ∂f∂z=2yz+h′(z)\frac{\partial f}{\partial z} = 2yz + h'(z) must equal 2yz2yz, so hh is constant. The potential is f=x2y+yz2f = x^2 y + y z^2, and differentiating it back reproduces all three components.

∇(x2y+yz2)=⟨2xy, x2+z2, 2yz⟩\nabla \left( x^2 y + y z^2 \right) = \langle 2xy,\ x^2 + z^2,\ 2yz \rangle

The mistake: stopping after one component

In two variables the whole conservative test is ∂Q∂x=∂P∂y\frac{\partial Q}{\partial x} = \frac{\partial P}{\partial y}, 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 ⟨2xy, x2, y⟩\langle 2xy,\ x^2,\ y \rangle. The third component of its curl is 2x−2x=02x - 2x = 0, exactly as here, but the first is ∂R∂y−∂Q∂z=1−0=1\frac{\partial R}{\partial y} - \frac{\partial Q}{\partial z} = 1 - 0 = 1, 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 R3\mathbb{R}^3 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 R3\mathbb{R}^3, so zero curl is enough and f=x2y+yz2f = x^2 y + y z^2 is the potential. On a domain with a line removed, such as the space around the zz-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 h(z)h(z) appears.