Why Mixed Partial Derivatives Test for a Potential
A vector field is a gradient when its components come from differentiating one scalar function. That common source imposes relationships among the derivatives of the field components: the order in which a potential is differentiated must not change the result when its second partial derivatives are continuous.
These relationships provide a useful test. If even one required pair of component derivatives disagrees, the field cannot be the gradient of a sufficiently smooth potential on a region containing that point. Agreement, however, is only a necessary test; it does not by itself prove that a potential exists.
Definitions and Assumptions
Let \(D\) be an open subset of \(\mathbb{R}^2\), and let \(\mathbf{F}:D\to\mathbb{R}^2\) be a vector field of the form \(\mathbf{F}(x,y)=\langle P(x,y),Q(x,y)\rangle\). The field is continuously differentiable, or \(C^1\), if its first partial derivatives exist and are continuous on \(D\).
A scalar function \(\phi:D\to\mathbb{R}\) is a potential for \(\mathbf{F}\) if \(\mathbf{F}=\nabla\phi\), meaning that \(P=\frac{\partial\phi}{\partial x}\) and \(Q=\frac{\partial\phi}{\partial y}\). If the components \(P\) and \(Q\) are \(C^1\), then a potential for this field has continuous second partial derivatives: its first partial derivatives are precisely the \(C^1\) components of \(\mathbf{F}\).
In three dimensions, write \(\mathbf{F}(x,y,z)=\langle P(x,y,z),Q(x,y,z),R(x,y,z)\rangle\). If \(\mathbf{F}=\nabla\phi\), then \(P=\phi_x\), \(Q=\phi_y\), and \(R=\phi_z\). Matching the mixed partial derivatives for each pair of variables gives three conditions.
Why the Conditions Hold
The key fact is that a function with continuous second partial derivatives has equal mixed partial derivatives. Here is a derivation in two variables. Fix a point \((x,y)\) and choose small nonzero increments \(h\) and \(k\) so the rectangle between \((x,y)\) and \((x+h,y+k)\) lies within the domain of \(\phi\). Consider the change around the rectangle, with opposite terms subtracted.
Applying the Fundamental Theorem of Calculus first in the \(y\)-direction and then in the \(x\)-direction expresses the same change using \(\phi_{yx}\). Reversing the order expresses it using \(\phi_{xy}\):
Divide each expression by \(hk\). As \(h\) and \(k\) tend to zero, each divided double integral tends to the value of its continuous integrand at \((x,y)\). Since both expressions are the same \(\Delta/(hk)\), their limits are equal. Therefore \(\phi_{yx}(x,y)=\phi_{xy}(x,y)\).
Now suppose \(\mathbf{F}=\nabla\phi\). Since \(P=\phi_x\) and \(Q=\phi_y\), it follows that \(P_y=\phi_{xy}\) and \(Q_x=\phi_{yx}\). Equality of the mixed partials gives \(P_y=Q_x\). The three-dimensional conditions follow by applying the same argument to each pair of variables, holding the third variable fixed.
Testing a Planar Field
Worked Example: Rejecting a Planar Candidate
Determine whether \(\mathbf{F}(x,y)=\langle 2xy+y,\ x^2\rangle\) can be a gradient on \(\mathbb{R}^2\).
Identify \(P=2xy+y\) and \(Q=x^2\). Differentiate \(P\) with respect to \(y\):
Differentiate \(Q\) with respect to \(x\):
The difference is \((2x+1)-2x=1\), so the derivatives disagree everywhere. For example, at \((0,0)\), \(P_y=1\) while \(Q_x=0\). The compatibility condition fails, so this field cannot be a gradient on \(\mathbb{R}^2\). Substitution into the condition confirms the rejection: \(1\ne 0\) at \((0,0)\).
Checking All Three Component Pairs
For a three-dimensional field, compare the derivatives in pairs. Each component corresponds to a first partial derivative of the same potential, so each pair of components must agree on the mixed partial obtained by differentiating in the other coordinate.
Worked Example: Rejecting a Three-Dimensional Candidate
Test \(\mathbf{F}(x,y,z)=\langle yz,\ xz,\ 2xy+z\rangle\) for mixed partial compatibility.
Set \(P=yz\), \(Q=xz\), and \(R=2xy+z\). Compute the three required pairs:
The first pair agrees, but the second and third do not agree at all points. In particular, at \((0,1,0)\), \(P_z=1\) and \(R_x=2\). Thus the second compatibility condition fails at a point in the domain, which is enough to rule out a potential on \(\mathbb{R}^3\). Substitution verifies the contradiction: \(1\ne2\). Checking one pair would have been sufficient once it failed; checking the other pairs makes clear which conditions hold and which do not.
Using Compatibility to Restrict Parameters
Sometimes a field contains an unknown constant, and the test determines which values are even possible. Passing the test for a particular value does not, by itself, establish the existence of a potential; it only removes this specific obstruction.
Worked Example: Finding the Only Compatible Parameter
For real \(c\), consider \(\mathbf{F}(x,y)=\langle 3xy,\ cx^2+y\rangle\) on \(\mathbb{R}^2\). Find the values of \(c\) that satisfy the compatibility condition everywhere.
Here \(P=3xy\) and \(Q=cx^2+y\). Their relevant derivatives are
Equality for every \((x,y)\in\mathbb{R}^2\) requires \(3x=2cx\) for every real \(x\). Taking \(x=1\) gives \(3=2c\), so \(c=\frac{3}{2}\). Conversely, when \(c=\frac{3}{2}\), \(Q_x=2(\frac{3}{2})x=3x=P_y\) for every point, and the compatibility condition holds everywhere.
For example, \(c=2\) fails at \((1,0)\), since \(P_y=3\) and \(Q_x=4\). For \(c=\frac{3}{2}\), the condition passes at every point. This calculation identifies the only parameter value compatible with the necessary test; by itself, it does not prove that a potential exists.
A Common Derivative-Order Mistake
The planar condition compares \(P_y\) with \(Q_x\), not arbitrary derivatives of the two components. A common error is to differentiate each component with respect to the variable suggested by its position in the field, then compare those results. That checks the wrong pair.
Worked Example: Correcting a Misapplied Test
Consider \(\mathbf{F}(x,y)=\langle xy,\frac{x^2}{2}\rangle\). An incorrect test might compute \(P_x=y\) and \(Q_y=0\), conclude that these are unequal, and reject the field.
But the required derivatives are the cross-partials:
They agree for every \((x,y)\), so this test does not reject the field. Substituting any point, such as \((2,3)\), gives \(P_y=2\) and \(Q_x=2\), confirming the comparison. The earlier calculation compared \(P_x\) with \(Q_y\), which is not the mixed partial compatibility condition.
What the Test Does—and Does Not—Establish
Mixed partial compatibility is valuable because it is direct: compute the specified derivatives and compare them. A mismatch proves that no potential can have produced the field on a region containing that point. This conclusion depends on the stated regularity: the field is \(C^1\), and the proposed potential consequently has continuous second partial derivatives.
Agreement has a more limited meaning. It shows only that this necessary test has not ruled out a potential. Whether agreement guarantees a potential requires additional conditions about the domain; those conditions are not part of the derivative comparison itself. In particular, do not turn “the component derivatives match” into “the field is definitely a gradient” without establishing the hypotheses of a suitable existence result.
When applying the test, keep the component-variable pairings explicit. In two dimensions, compare \(P_y\) to \(Q_x\). In three dimensions, compare \(P_y\) to \(Q_x\), \(P_z\) to \(R_x\), and \(Q_z\) to \(R_y\). If one pair fails at a point, no further calculation is needed to reject the field there.
Check Your Understanding
For each question, use the stated necessary conditions and distinguish a failed test from a test that merely passes.
- For \(\mathbf{F}=\langle P,Q\rangle\), which two partial derivatives must be compared if the field is a gradient?
- For \(\mathbf{F}=\langle P,Q,R\rangle\), write all three mixed partial compatibility conditions.
- If one required pair differs at a single point, what can you conclude about a potential on a region containing that point?
- For \(\mathbf{F}=\langle x^2y,\frac{x^3}{3}\rangle\), calculate \(P_y\) and \(Q_x\). Does the necessary planar condition hold everywhere?
- Why does equality of the required derivatives not, by itself, prove that a potential exists?