How to Find Potential Functions

How to Find a Potential Function of a Vector Field

📖Read Time: 4 minutes
📊Readability: Advanced 📐 (Technical knowledge needed)
🔖Core Topics: yz, function, potential, method, partial

Definition and summary

Given a vector field ##\vec F(x,y,z)## that has a potential function, how do you find it?

Conditions and equations

$$\nabla \phi(x,y,z) = \vec F(x,y,z)$$

$$\nabla \times \vec F(x,y,z) = \vec 0$$

Recovering the potential: method and examples

Suppose we are given a vector field ##\vec F(x,y,z)=\langle f(x,y,z),g(x,y,z),h(x,y,z)\rangle## that has a potential function ##\phi## and we wish to recover the potential function. We know that we must have ##\nabla \phi =\vec F##, so ##\phi_x = f,\, \phi_y=g,\,\phi_z = h##. This means we can recover ##\phi## by integrating the components of ##\vec F##.

Example: 3D vector field

To look at a particular example, consider $$\vec F =\langle 2xz^3+e^z,-z\sin(yz),3x^2z^2-y\sin(yz)+xe^z\rangle.$$ Our unknown potential function ##\phi## must satisfy

$$\phi_x=2xz^3+e^z,\, \phi_y=-z\sin(yz),\,\phi_z=3x^2z^2-y\sin(yz)+xe^z.$$

Students often solve this type of problem by taking the anti-partial derivative of each equation:

$$\phi = \int 2xz^3+e^z\,\partial x = x^2z^3+xe^z$$

$$\phi = \int -z\sin(yz)\, \partial y=\cos(yz)$$

$$\phi = \int 3x^2z^2-y\sin(yz)+xe^z\, \partial z=x^2z^3+\cos(yz)+xe^z$$

where I have used the ##\partial## symbol in the integrals to emphasize that it is an anti-partial derivative in each case. I have also left off the “constants” of integration. Looking at these results, one may observe that the function ##\phi## can be discerned by “taking the new part of each result but not repeating”. For example, you keep the ##\cos(yz)## from the second integral, but you don’t keep the ##xe^z## and ##\cos(yz)## from the last integral because you already have them. So using this method, we get

$$\phi(x,y,z) = x^2z^3+\cos(yz)+xe^z$$

and it is easy to check that ##\nabla \phi = \vec F##.

Why the naive method can fail (2D counterexample)

The problem with the “assemble by inspection” method is that the inspection rules are not well defined and can lead to wrong answers. To demonstrate this, consider the 2-D example

$$\vec F(x,y) = \langle P(x,y),Q(x,y)\rangle= \langle 2\cos(2x)\cos^2(y),-\sin(2x)\sin(2y)\rangle.$$

Here it is easy to see that ##Q_x=P_y## so there is no doubt there is a potential function ##\phi(x,y)##. Using the naive method:

$$\phi = \int 2\cos(2x)\cos^2(y)\, \partial x = \sin(2x)\cos^2(y)$$

$$\phi = \int -\sin(2x)\sin(2y)\,\partial y =\frac{\sin(2x)\cos(2y)} 2$$

Since these terms are different, one might keep both, giving

$$\phi(x,y) = \sin(2x)\cos^2(y)+\frac{\sin(2x)\cos(2y)} 2.$$

Unfortunately, for this ##\phi##, if you calculate it, you get

$$\phi_x = 2\cos(2x)\cos^2(y) +\cos(2x)\cos(2y) \ne P(x,y),$$

so this is not the correct potential function.

Reliable method: include functions of the remaining variables

The reliable procedure is equally straightforward but avoids guesswork: integrate one partial and add an unknown function of the remaining variables, then determine that function by comparing partial derivatives.

Applying this to the 3D example: doing the first integral correctly and not ignoring the constants of integration gives

$$\phi = \int 2xz^3+e^z\,\partial x = x^2z^3+xe^z + u(y,z),$$

where ##u## is an unknown function of the other variables, since we performed an anti-partial derivative. Now use this version of ##\phi## to check ##\phi_y = g##:

$$\phi_y = \frac \partial {\partial y}( x^2z^3+xe^z )+u_y(y,z)= 0 +u_y(y,z) =z\sin(yz)$$

so we get

$$u(y,z) = \int z\sin(yz)\partial y = -\cos(yz) + v(z),$$

where now the constant of integration depends only on ##z##. Putting this value for ##u## in our formula for ##\phi## gives

$$\phi = x^2z^3+xe^z -\cos(yz) + v(z).$$

Now take the partial with respect to ##z## and set it equal to the third component ##h(x,y,z)##:

$$\phi_z=3x^2z^2+xe^z+y\sin(yz)+v'(z)=3x^2z^2-y\sin(yz)+xe^z.$$

This implies ##v'(z)=0## so ##v## is a constant, which can be ignored. Thus the final potential is

$$\phi = x^2z^3+xe^z -\cos(yz).$$

Now apply the same reliable method to the 2D example. The first integration gives

$$\phi = \int 2\cos(2x)\cos^2(y)\, \partial x = \sin(2x)\cos^2(y) + w(y).$$

Differentiating this with respect to ##y## and setting the result equal to the second component gives

$$\phi_y=\sin(2x)(-2)\sin(y)\cos(y)+w'(y)=-\sin(2x)\sin(2y).$$

This tells us that ##w'(y)=0## since ##2\sin(y)\cos(y)=\sin(2y)##. So ##w## is constant and can be ignored. This leaves us with the correct potential function

$$\phi = \sin(2x)\cos^2(y).$$

Further reading and examples

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply