Processing math: 100%

Math Insight

The process of finding a potential function of a conservative vector field is a multi-step procedure that involves both integration and differentiation, while paying close attention to the variables you are integrating or differentiating with respect to. For this reason, given a vector field F, we recommend that you first determine that that F is indeed conservative before beginning this procedure. That way you know a potential function exists so the procedure should work out in the end.

In this page, we focus on finding a potential function of a two-dimensional conservative vector field. We address three-dimensional fields in another page.

We introduce the procedure for finding a potential function via an example. Let's use the vector field F(x,y)=(ycosx+y2,sinx+2xy2y).

The first step is to check if F is conservative. Since F2x=x(sinx+2xy2y)=cosx+2yF1y=y(ycosx+y2)=cosx+2y,

we conclude that the scalar curl of F is zero, as F2xF1y=0.
Next, we observe that F is defined on all of R2, so there are no tricks to worry about. The vector field F is indeed conservative.

Since F is conservative, we know there exists some potential function f so that f=F. As a first step toward finding f, we observe that the condition f=F means that (fx,fy)=(F1,F2)=(ycosx+y2,sinx+2xy2y).

This vector equation is two scalar equations, one for each component. We need to find a function f(x,y) that satisfies the two conditions fx(x,y)=ycosx+y2
and fy(x,y)=sinx+2xy2y.
Let's take these conditions one by one and see if we can find an f(x,y) that satisfies both of them. (We know this is possible since F is conservative. If F were path-dependent, the procedure that follows would hit a snag somewhere.)

Let's start with condition (1). We can take the equation fx(x,y)=ycosx+y2,

and treat y as though it were a number. In other words, we pretend that the equation is dfdx(x)=acosx+a2
for some number a. We can integrate the equation with respect to x and obtain that f(x)=asinx+a2x+C.
But, then we have to remember that a really was the variable y so that f(x,y)=ysinx+y2x+C.
But actually, that's not right yet either. Since we were viewing y as a constant, the integration “constant” C could be a function of y and it wouldn't make a difference. The partial derivative of any function of y with respect to x is zero. We can replace C with any function of y, say g(y), and condition (1) will be satisfied. A new expression for the potential function is f(x,y)=ysinx+y2x+g(y).
If you are still skeptical, try taking the partial derivative with respect to x of f(x,y) defined by equation (3). Since g(y) does not depend on x, we can conclude that xg(y)=0. Indeed, condition (1) is satisfied for the f(x,y) of equation (3).

Now, we need to satisfy condition (2). We can take the f(x,y) of equation (3) (so we know that condition (1) will be satisfied) and take its partial derivative with respect to y, obtaining fy(x,y)=y(ysinx+y2x+g(y))=sinx+2yx+dgdy(y).

Comparing this to condition (2), we are in luck. We can easily make this f(x,y) satisfy condition (2) as long as dgdy(y)=2y.
If the vector field F had been path-dependent, we would have found it impossible to satisfy both condition (1) and condition (2). We would have run into trouble at this point, as we would have found that dgdy would have to be a function of x as well as y. Since dgdy is a function of y alone, our calculation verifies that F is conservative.

If we let g(y)=y2+k

for some constant k, then fy(x,y)=sinx+2yx2y,
and we have satisfied both conditions.

Combining this definition of g(y) with equation (3), we conclude that the function f(x,y)=ysinx+y2xy2+k

is a potential function for F. You can verify that indeed f=(ycosx+y2,sinx+2xy2y)=F(x,y).

With this in hand, calculating the integral CFds

is simple, no matter what path C is. We can apply the gradient theorem to conclude that the integral is simply f(q)f(p), where p is the beginning point and q is the ending point of C. (For this reason, if C is a closed curve, the integral is zero.)

We might like to give a problem such as find CFds

where C is the curve given by the following graph.

A complicated curve

The answer is simply CFds=f(π/2,1)f(π,2)=sinπ/2+π21+k(2sin(π)4π4+k)=sinπ/2+9π2+3=9π2+2

(The constant k is always guaranteed to cancel, so you could just set k=0.)

If the curve C is complicated, one hopes that F is conservative. It's always a good idea to check if F is conservative before computing its line integral CFds.

You might save yourself a lot of work.