Paul's Online Notes
Paul's Online Notes
Home / Calculus III / Line Integrals / Conservative Vector Fields
Show Mobile Notice Show All Notes Hide All Notes
Mobile Notice
You appear to be on a device with a "narrow" screen width (i.e. you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

Section 16.6 : Conservative Vector Fields

5. Find the potential function for the following vector field.

\[\vec F = {y^2}\left( {1 + \cos \left( {x + y} \right)} \right)\vec i + \left( {2xy - 2y + {y^2}\cos \left( {x + y} \right) + 2y\sin \left( {x + y} \right)} \right)\vec j\]

Show All Steps Hide All Steps

Start Solution

Now, by assumption from how the problem was asked, we could assume that the vector field is conservative but let’s check it anyway just to make sure.

So,

\[\begin{align*}P & = {y^2}\left( {1 + \cos \left( {x + y} \right)} \right) = {y^2} + {y^2}\cos \left( {x + y} \right) & \hspace{0.25in}{P_y} & = 2y - {y^2}\sin \left( {x + y} \right) + 2y\cos \left( {x + y} \right)\\ Q & = 2xy - 2y + {y^2}\cos \left( {x + y} \right) + 2y\sin \left( {x + y} \right) & \hspace{0.25in}{Q_x} & = 2y - {y^2}\sin \left( {x + y} \right) + 2y\cos \left( {x + y} \right)\end{align*}\]

Okay, we can see that \({P_y} = {Q_x}\) and so the vector field is conservative as the problem statement suggested it would be.

Show Step 2

Okay, to find the potential function for this vector field we know that we need to first either integrate \(P\) with respect to \(x\) or integrate \(Q\) with respect to \(y\). It doesn’t matter which one we use chose to use in general, but in in this case integrating \(Q\) with respect to \(y\) just looks painful (two integration by parts terms!).

So, let’s go with the following integration for this problem.

\[\begin{align*}f\left( {x,y} \right) & = \int{{P\,dx}}\\ & = \int{{{y^2} + {y^2}\cos \left( {x + y} \right)\,dx}}\\ & = x{y^2} + {y^2}\sin \left( {x + y} \right) + h\left( y \right)\end{align*}\]

Don’t forget that, in this case, because we were integrating with respect to \(x\) the “constant of integration” will be a function of \(y\)!

Note, that as this problem has shown, sometimes one integration order will be significantly easier than the other so be on the lookout for which term might be easier to integrate.

Show Step 3

Next, differentiate the function from the previous step with respect to \(y\) and set equal to \(Q\) since we know the derivative and \(Q\) should be the same function.

\[\begin{align*}{f_y} & = 2xy + 2y\sin \left( {x + y} \right) + {y^2}\cos \left( {x + y} \right) + h'\left( y \right)\\ & = 2xy - 2y + {y^2}\cos \left( {x + y} \right) + 2y\sin \left( {x + y} \right) = Q\hspace{0.25in} \Rightarrow \hspace{0.25in}h'\left( y \right) = - 2y\end{align*}\]

Now, recall that because we integrated with respect to \(x\) in Step 2 \(h\left( y \right)\), and hence \(h'\left( y \right)\), should only be a function of \(y\)’s (as it is in this case). If there had been any \(x\)’s in \(h'\left( y \right)\) we’d know there was something wrong at this point. Either we’d made a mistake somewhere or the vector field was not conservative. Of course, we verified that it was conservative in Step 1 and so this would in fact mean we’d made a mistake somewhere!

Show Step 4

We can now integrate both sides of the formula for \(h'\left( y \right)\) above to get,

\[h\left( y \right) = - {y^2} + c\]

Don’t forget the “\(+c\)” on this!

Show Step 5

Finally, putting everything together we get the following potential function for the vector field.

\[\require{bbox} \bbox[2pt,border:1px solid black]{{f\left( {x,y} \right) = x{y^2} + {y^2}\sin \left( {x + y} \right) - {y^2} + c}}\]