Recovering a Potential from the First Component
A potential function turns a planar vector field into the gradient of a scalar function. When a potential exists, finding it can be reduced to integrating one component and using the other component to fill in what the first integration cannot determine.
The key point is that integrating with respect to \(x\) leaves \(y\) fixed. Therefore, the “constant of integration” may depend on \(y\). The second component determines that missing dependence.
Thus a candidate \(\phi\) must satisfy two equations: \(\phi_x=P\) and \(\phi_y=Q\). Integrating \(P\) with respect to \(x\) addresses the first equation. The second equation is then used to determine the remaining function.
Why the Integration “Constant” Depends on \(y\)
For a single-variable antiderivative, any two antiderivatives differ by a constant. Here, however, we integrate in \(x\) while \(y\) is held fixed. The quantity that is constant as \(x\) varies may take a different value for each \(y\). We therefore write it as \(g(y)\), not merely as a numerical constant.
For example, differentiating \(x^2y+g(y)\) with respect to \(x\) gives \(2xy\), regardless of the choice of \(g\). The \(x\)-derivative cannot reveal which function of \(y\) is needed; matching the \(y\)-derivative will do that.
The Recovery Procedure
Suppose the field is defined on a rectangle \(D=I\times J\), where \(I\) and \(J\) are intervals, and its components are sufficiently differentiable for the calculations below. Integrate \(P\) in \(x\), treating \(y\) as fixed. If \(A_x=P\), write the potential candidate as \(\phi(x,y)=A(x,y)+g(y)\). Then differentiate with respect to \(y\) and require the result to equal \(Q\).
Find an expression \(A(x,y)\) with \(A_x(x,y)=P(x,y)\), integrating with respect to \(x\) and keeping \(y\) fixed.
Write \(\phi(x,y)=A(x,y)+g(y)\). Do not replace \(g(y)\) by a constant before using the second component.
Compute \(\phi_y=A_y+g'(y)\) and set it equal to \(Q(x,y)\). Solve for \(g'(y)\), then integrate with respect to \(y\).
Differentiate the resulting \(\phi\) with respect to \(x\) and \(y\), and confirm that the two results are \(P\) and \(Q\).
Why This Procedure Works
The role of \(g(y)\) follows directly from the equation \(\phi_x=P\). To see this precisely, choose any antiderivative \(A\) of \(P\) with respect to \(x\). If \(\phi\) is another function satisfying \(\phi_x=P\), then \(H=\phi-A\) satisfies \(H_x=0\). For each fixed \(y\), the function \(H(x,y)\) has zero derivative as a function of \(x\). By the mean value theorem, it is constant in \(x\) on the interval \(I\). That constant may depend on \(y\), so \(H(x,y)=g(y)\).
Conversely, adding \(g(y)\) to \(A(x,y)\) does not change its \(x\)-derivative, because \(g(y)\) is constant with respect to \(x\). This proves that the general form compatible with the first component is \(A(x,y)+g(y)\). Requiring its \(y\)-derivative to equal \(Q\) then determines whether a suitable \(g\) exists.
Worked Examples
Worked Example: A Polynomial Field
Find a potential for \(\mathbf{F}(x,y)=\langle 2xy+3,\ x^2+4y\rangle\), if one exists.
Here \(P(x,y)=2xy+3\). Integrate with respect to \(x\), treating \(y\) as constant:
Differentiate this expression with respect to \(y\):
Match it to \(Q(x,y)=x^2+4y\). Subtract \(x^2\) from both sides to obtain \(g'(y)=4y\). Hence \(g(y)=2y^2+C\), where \(C\) is a constant. One potential is \(\phi(x,y)=x^2y+3x+2y^2\). Check both components:
Both derivatives match the given field, so the expression is a potential. The additive constant \(C\) can be omitted because its derivatives are zero.
Worked Example: An Exponential and Trigonometric Field
Find a potential for \(\mathbf{F}(x,y)=\langle e^y\cos x,\ e^y\sin x+2y\rangle\).
Integrate the first component with respect to \(x\), keeping \(y\) fixed:
Now differentiate with respect to \(y\) and match the second component:
Subtracting the shared term \(e^y\sin x\) gives \(g'(y)=2y\), so \(g(y)=y^2+C\). Take \(\phi(x,y)=e^y\sin x+y^2\). Its derivatives are
These are exactly the two components of \(\mathbf{F}\), which verifies the potential.
Worked Example: Matching a Trigonometric Function of \(y\)
Find a potential for \(\mathbf{F}(x,y)=\langle 3x^2y+2y,\ x^3+2x+\cos y\rangle\).
Integrating \(P(x,y)=3x^2y+2y\) with respect to \(x\) gives
Differentiate with respect to \(y\):
Set this equal to \(Q(x,y)=x^3+2x+\cos y\). Cancelling the \(x^3+2x\) terms gives \(g'(y)=\cos y\), and therefore \(g(y)=\sin y+C\). Choose \(\phi(x,y)=x^3y+2xy+\sin y\). The check is
Both components agree with the given field, so this is a valid potential.
When Matching Fails
The method does not guarantee that every field has a potential. The equation obtained by matching the second component may be impossible to satisfy with a function of \(y\) alone.
For instance, take \(\mathbf{F}(x,y)=\langle y,2x\rangle\). Integrating the first component gives \(\phi(x,y)=xy+g(y)\). Its \(y\)-derivative is \(x+g'(y)\). Matching this to \(2x\) would require
The left side depends only on \(y\), while the right side varies with \(x\). No function \(g(y)\) can satisfy this equation throughout a rectangle containing different \(x\)-values. Thus this calculation cannot produce a potential there.
A Common Mistake: Using Only a Constant
A frequent error is to integrate \(P\) and append a numerical constant, as though this were a single-variable problem. In the first worked example, that mistake would give \(\phi=x^2y+3x+C\). Its \(y\)-derivative is \(x^2\), which does not equal the required second component \(x^2+4y\). The missing term is not a numerical constant: it must vary with \(y\).
Why Potential Recovery Matters
When a potential has been found and checked, calculations involving the field can often be simplified by using the scalar function rather than working directly with both components. The essential discipline in this recovery step is to preserve all the information: integrate the first component, retain the unknown function, match the second component, and check the result. A plausible-looking antiderivative alone is not enough.
Check Your Understanding
Try each question by writing the relevant derivative or matching equation before simplifying.
- Why is the integration term after integrating \(P(x,y)\) with respect to \(x\) written as \(g(y)\) rather than as a numerical constant?
- For \(\mathbf{F}(x,y)=\langle 4xy,\ 2x^2+6y\rangle\), what equation determines \(g'(y)\) after integrating the first component?
- What two derivative checks confirm that a proposed \(\phi\) is a potential for \(\langle P,Q\rangle\)?
- For \(\mathbf{F}(x,y)=\langle y,\ 2x\rangle\), what equation would matching impose on \(g'(y)\), and why can it not hold throughout a rectangle?
- If the matching equation gives \(g'(y)=\cos y\), what function \(g(y)\) can be used, up to an additive constant?