Conservative Vector Fields
Text A twodimensional vector field F = (p(x,y),q(x,y)) is conservative if there exists a function f(x,y) such that F = ∇f.
Note that the circulation of ∇f(x,y) along a curve C equals ∫_{a}^{b} f_{x}(x(t),y(t))x'(t) + f_{y}(x(t),y(t))y'(t) dt = ∫_{a}^{b}d/dt(f(x(t),y(t)) dt = f(x(t),y(t))_{a}^{b} = f(x(b),y(b))  f(x(a),y(a)). In particular, if F(x,y) is a conservative vector field then the circulation of F along a closed curve is 0.
If f exists, then it is called the potential function of F.
If a twodimensional vector field F(p,q) is conservative, then p_{y} = q_{x}.
Suppose that F is conservative and so there does exist a function f such that F = ∇f. Then p = f_{x} and q = f_{y}. Now consider the mixed partials f_{xy} = p_{y} and f_{yx} = q_{x}. By the equality of mixed partials, p_{y} = f_{xy} = f_{yx} = q_{x}.
If a twodimensional vector field F(p,q) is conservative, then its curl is identically zero.
Since p_{y} = q_{x}, ∇ {times} F = (0,0,q_{x}p_{y}) = (0,0,0).
Demos
Conservative Vector Fields
 
This demo allows you to test whether or not a field is conservative using two piecewise paths, each consisting of three line segments. Use the hotspots in the 2D window to move the endpoints of these line segments.
In the 3D window, the wireframes display F⋅ds, and the green curves show the integral of F⋅ds over the two piecewise paths (circulation).
You have the option of displaying the graph of some function f(x, y). If (p(x, y), q(x, y)) is the gradient of some function f(x, y) and the red and blue paths are started at the same point, you should be able to find a function graph on which the green curves lie.
Two other conditions that will exist for conservative fields:
 If either the red or the blue curve is a closed curve, the circulation around that curve should be 0 (i.e. the green curve will end up at height 0 at the tip of the arrow, and the area of the wireframe above the xy plane will equal the area of the wireframe below the xy plane).
 If the red and blue curves have the same starting and ending points, then the circulation for each should be equal.

Exercises 1. For each of the following, use the demo to determine whether or not the vector field F is conservative. If it is conservative, find the potential function of F.
 F = (x, y)
 F = ( 1, y)
 F = ( 0, 9.8)
 F = (cos(x), sin(y))
 F = (y, x)
 F = (x/(x^{2}+y^{2}), y/(x^{2}+y^{2}))
2. Why won't the green curves necessarily lie on the graph of f(x, y) (the function whose gradient is F) if the blue and red paths have different starting points? (Assume F is conservative.)
