Tutorials › Calculus III › Potential Recovery in Three Dimensions

Conservative Fields and Path Independence · Tutorial 784 of 999

Potential Recovery in Three Dimensions

Recover three-dimensional scalar potentials systematically, including the role of integration “constants” and the checks that prevent false answers.

Intermediate 9 min read

What You'll Learn

  • Express the gradient condition for a three-dimensional potential.
  • Integrate one field component while treating the other coordinates as constants.
  • Use the remaining components to determine functions of the other variables.
  • Complete a potential by checking its derivative against the final field component.
  • Recognize when coordinate-slice assumptions are needed for a global recovery.
  • Identify a failed recovery when the field components cannot match one potential.

Recovering a Potential from Three Components

A three-dimensional vector field has three component functions, so finding a scalar potential requires matching three partial derivatives. The basic strategy is to integrate one component, then use the other two to determine what the first integration could not reveal.

The key detail is that an integration “constant” may depend on the variables held fixed during integration. For example, integrating with respect to \(x\) can leave an unknown function of \(y\) and \(z\), not merely an ordinary constant. The remaining field components supply the information needed to determine that function.

Definition: A scalar potential for a vector field \(\mathbf{F}=\langle P,Q,R\rangle\) on a domain \(D\subseteq\mathbb{R}^3\) is a differentiable function \(f:D\to\mathbb{R}\) such that \(\nabla f=\mathbf{F}\) throughout \(D\). Equivalently, \(f_x=P\), \(f_y=Q\), and \(f_z=R\).

This method finds a potential when the component equations can be made consistent. It does not assert that every vector field has a potential. In the worked examples, the domain will be an open rectangular box, where the coordinate variables vary independently. The role of this assumption, and the caution needed on more general domains, will be explained below.

The Integration-and-Matching Procedure

Suppose a potential \(f\) exists on an open rectangular box and \(\mathbf{F}=\langle P,Q,R\rangle\). Start with \(f_x=P\). Integrating with respect to \(x\), while holding \(y\) and \(z\) fixed, gives a candidate expression plus an unknown function of \(y,z\). Differentiate that expression with respect to \(y\) and compare it with \(Q\). This determines the \(y\)-dependence of the unknown function, up to a function of \(z\). Finally, use \(f_z=R\) to determine that last function.

$$ f_x=P \quad\Longrightarrow\quad f(x,y,z)=A(x,y,z)+g(y,z), \qquad A_x=P. $$

The expression \(A\) is any antiderivative of \(P\) with respect to \(x\), treating \(y,z\) as constants. The function \(g\) is not optional: it represents all terms whose \(x\)-derivative is zero.

1
Integrate one component.
For example, find \(A\) with \(A_x=P\), retaining an unknown function \(g(y,z)\).
2
Match a second component.
Use \(f_y=A_y+g_y=Q\) to determine \(g_y\), then integrate with respect to \(y\), retaining an unknown function of \(z\).
3
Match the last component.
Use \(f_z=R\) to determine the remaining function of \(z\). If the equation cannot hold, the attempted recovery fails.
4
Verify all components.
Differentiate the completed \(f\) with respect to \(x,y,z\) and compare each result with \(P,Q,R\).

Why the Unknown Function Appears

Suppose \(A_x=P\) and \(f_x=P\). For each fixed \((y,z)\), the difference \(f-A\) has derivative zero with respect to \(x\). On an interval of allowed \(x\)-values, a differentiable function with zero derivative is constant. Thus, on a rectangular box, \(f-A\) is constant as \(x\) varies, though that constant may change when \(y\) or \(z\) changes. It is therefore represented by \(g(y,z)\).

This argument explains both the method and a necessary qualification. On a general domain, the set of allowed \(x\)-values for a fixed pair \((y,z)\) might be disconnected. A zero \(x\)-derivative implies constancy on each connected component of that set, not necessarily the same constant on all its components. Therefore, one cannot always represent the difference by a single globally defined function \(g(y,z)\) on an arbitrary domain. The simple global procedure below applies on a rectangular box; on a more general domain, it applies locally or separately on connected pieces, with any resulting expressions checked for consistency where they overlap.

Takeaway: Integrating with respect to one variable leaves an arbitrary function of the other variables. A single such function describes the result globally when the relevant coordinate slices are connected, as they are on a rectangular box.

Worked Recovery with All Three Components

Worked Example: Recovering a Potential from the First Component

Find a potential for \(\mathbf{F}=\langle 2xy+z,\ x^2+2yz,\ x+y^2+3z^2\rangle\) on \(\mathbb{R}^3\), or show that the component equations do not produce one.

Write \(\mathbf{F}=\langle P,Q,R\rangle\). Integrate \(P=2xy+z\) with respect to \(x\), holding \(y,z\) fixed:

$$ f(x,y,z)=\int(2xy+z)\,dx=x^2y+xz+g(y,z). $$

Differentiate this expression with respect to \(y\) and set it equal to \(Q\):

$$ f_y=x^2+g_y(y,z)=x^2+2yz, \qquad g_y(y,z)=2yz. $$

Integrating \(g_y=2yz\) with respect to \(y\) gives \(g(y,z)=y^2z+h(z)\). Therefore,

$$ f(x,y,z)=x^2y+xz+y^2z+h(z). $$

Now differentiate with respect to \(z\) and match \(R\):

$$ f_z=x+y^2+h'(z)=x+y^2+3z^2, \qquad h'(z)=3z^2. $$

Integrating gives \(h(z)=z^3+C\), where \(C\) is a constant. One potential is \(f=x^2y+xz+y^2z+z^3\). Check it by differentiating:

$$ f_x=2xy+z,\qquad f_y=x^2+2yz,\qquad f_z=x+y^2+3z^2. $$

These are exactly the three components of \(\mathbf{F}\), so the proposed function is a potential.

A Second Recovery

Worked Example: Determining the Final Function of One Variable

Find a potential for \(\mathbf{F}=\langle 3x^2+yz,\ xz+2yz^2,\ xy+2y^2z\rangle\) on \(\mathbb{R}^3\).

Integrate the first component with respect to \(x\):

$$ f(x,y,z)=\int(3x^2+yz)\,dx=x^3+xyz+g(y,z). $$

Match the second component. Since \(f_y=xz+g_y\), the equation \(f_y=xz+2yz^2\) gives \(g_y=2yz^2\). Integrating in \(y\) yields \(g=y^2z^2+h(z)\), so

$$ f(x,y,z)=x^3+xyz+y^2z^2+h(z). $$

The derivative in \(z\) is \(f_z=xy+2y^2z+h'(z)\). Matching \(R=xy+2y^2z\) gives \(h'(z)=0\), so \(h\) is constant. Take \(h=0\). The resulting potential passes the full check:

$$ f_x=3x^2+yz,\qquad f_y=xz+2yz^2,\qquad f_z=xy+2y^2z. $$

Each derivative equals the corresponding component, as required.

When the Component Equations Fail to Match

The method is also useful when a field does not have a potential: the equations can become inconsistent. Finding that inconsistency is not a failed calculation; it is evidence that no function can satisfy all three required partial-derivative equations on the region under consideration.

Worked Example: Detecting an Inconsistent Recovery

Test whether \(\mathbf{F}=\langle y,\ x+z,\ 0\rangle\) has a potential on \(\mathbb{R}^3\).

If \(f_x=y\), integrating with respect to \(x\) requires

$$ f(x,y,z)=xy+g(y,z). $$

Now \(f_y=x+g_y\). Matching \(Q=x+z\) gives \(g_y=z\), hence \(g(y,z)=yz+h(z)\). The candidate forced by the first two components is

$$ f(x,y,z)=xy+yz+h(z). $$

Its \(z\)-derivative is \(f_z=y+h'(z)\). Matching \(R=0\) would require \(h'(z)=-y\) for every \(y,z\). This is impossible because \(h'(z)\) depends only on \(z\), while \(-y\) varies with \(y\). Thus no potential can satisfy all three equations on \(\mathbb{R}^3\). Directly, the forced candidate has \(f_z=y+h'(z)\), which cannot equal zero for all points.

Common Pitfall: Losing the Remaining Function

A frequent error is to integrate the first component and treat the omitted term as an ordinary constant. In the first worked example, integrating \(2xy+z\) with respect to \(x\) gives \(x^2y+xz\), but that is only one part of the potential. If we stop there, its \(y\)-derivative is \(x^2\), whereas the required component is \(x^2+2yz\). The missing \(2yz\) cannot be repaired by changing an ordinary constant.

$$ \frac{\partial}{\partial y}(x^2y+xz)=x^2 \ne x^2+2yz. $$

The correction is to retain \(g(y,z)\). The equation \(f_y=Q\) then gives \(g_y=2yz\), which supplies the missing term \(y^2z\) in the potential. Finally, the last component determines the remaining \(z\)-only term. Always keep the arbitrary function until the other component equations have been used.

How to Check a Proposed Potential

A potential must satisfy all three equations, not just the one used to start the integration. A concise verification is to calculate its three partial derivatives and place them beside the field components. This catches missing terms, sign errors, and candidates that fit only part of the field.

Verification rule: A differentiable candidate \(f\) is a potential for \(\mathbf{F}=\langle P,Q,R\rangle\) precisely when \(f_x=P\), \(f_y=Q\), and \(f_z=R\) at every point of the domain.

When one of the equations leaves a function that cannot depend on the variable appearing on the other side, the recovery is inconsistent. For instance, an equation \(h'(z)=-y\) cannot hold for all \(y,z\), because the left side is independent of \(y\). In that situation, do not force the expression into a potential; state the contradiction.

Check Your Understanding

Use the component equations carefully. In each recovery problem, retain the appropriate unknown function and verify any proposed potential by differentiating.

  1. If \(f_x=P(x,y,z)\), which variables may the undetermined function depend on?
  2. For \(\mathbf{F}=\langle 2x,\ 2y,\ 2z\rangle\), integrate the first component and determine the remaining terms using the other two components.
  3. Why does a zero \(x\)-derivative guarantee constancy on a connected \(x\)-slice, but not necessarily across disconnected parts of that slice?
  4. If matching the last component requires \(h'(z)=y\) for all \(y,z\), what does this tell you about the existence of a potential on a rectangular box?
  5. What three derivative equations must a proposed potential satisfy to verify it?