Conservative vector field
In vector calculus, a conservative vector field is a vector field that is the gradient of some function. Conservative vector fields have the property that the line integral is path independent; the choice of any path between two points does not change the value of the line integral. Path independence of the line integral is equivalent to the vector field being conservative. A conservative vector field is also irrotational; in three dimensions, this means that it has vanishing curl. An irrotational vector field is necessarily conservative provided that the domain is simply connected. Conservative vector fields appear  naturally in mechanics: They are vector fields representing forces of physical systems in which energy is conserved. For a conservative system, the work done in moving along a path in configuration space depends on only the endpoints of the path, so it is possible to define a potential energy that is independent of the actual path taken. Informal treatment. In a two- and three-dimensional space, there is an ambiguity in taking an integral between two points as there are infinitely many paths between the two points—apart from the straight line formed between the two points, one could choose  a curved path of greater length as shown in the figure. Therefore, in general, the value of the integral depends on the path taken. However, in the special case of a conservative vector field, the value of the integral is independent of the path taken, which can be thought of as a large-scale cancellation of all elements formula_1 that don't have a component along the straight line between the two points. To visualize this, imagine two people climbing a cliff; one decides to scale the cliff by going vertically up it, and the second decides to walk along  a winding path that is longer in length than the height of the cliff, but at only a small angle to the horizontal. Although the two hikers have taken different routes to get up to the top of the cliff, at the top, they will have both gained the same amount of gravitational potential energy. This is because a gravitational field is conservative. Intuitive explanation. M. C. Escher's lithograph print "Ascending and Descending" illustrates a non-conservative vector field, impossibly made to appear to be the gradient of the varying height above ground as one moves along the staircase . It is "rotational" in that one can keep getting higher or keep getting lower while going around in circles. It is non-conservative in that one can return to one's starting point while ascending more than one descends or vice versa. On a real staircase, the height above the ground is a scalar potential field: If one returns to the same place, one goes upward exactly as much as one goes downward. Its gradient would be a conservative vector field and is irrotational. The situation depicted in the painting is impossible. Definition. A vector field formula_2, where formula_3 is  an open subset of formula_4, is said to be conservative if and only if there exists a formula_5 (continuously differentiable) scalar field formula_6 on formula_3 such that formula_8 Here, formula_9 denotes the gradient of formula_6. When the equation above holds, formula_6 is called a scalar potential for formula_12. The fundamental theorem of vector calculus states that any vector field can be expressed as the sum of a conservative vector field and a solenoidal field. Path independence and conservative vector field. Path independence. A line integral of a vector field formula_12 is said to be path-independent if it depends on  only two integral path endpoints regardless of which path between them is chosen: formula_14 for any pair of integral paths formula_15 and formula_16 between a given pair of path endpoints in formula_3. The path independence is also equivalently expressed as formula_18 for a closed path formula_19 in formula_3 where the two endpoints are coincident. Two expressions are equivalent since any closed path formula_19 can be made by two path; formula_15 from an endpoint formula_23 to another endpoint formula_24, and formula_16 from formula_24 to formula_23, so formula_28 where formula_29 is the path that is the reverse of formula_16 and the last  equality holds due to the path independence formula_31 Conservative vector field. A key property of a conservative vector field formula_12 is that its integral along a path depends on only the endpoints of that path, not the particular route taken. In other words, if it is a conservative vector field, then its line integral is path-independent. Suppose that formula_33 is a rectifiable path in formula_3 with an initial point formula_23 and a terminal point formula_24. If formula_37 for some formula_5 (continuously differentiable) scalar field formula_6 so that formula_12 is a conservative vector field, then the gradient theorem (also called  fundamental theorem of calculus for line integrals) states that formula_41 This holds as a consequence of the definition of a line integral, the chain rule, and the second fundamental theorem of calculus. formula_42 in the line integral is an exact differential for an orthogonal coordinate system (e.g., Cartesian, cylindrical, or spherical coordinates). This path independence is also equivalently expressed as formula_43 for every rectifiable simple closed path formula_19 in formula_3. For a 3-dimensional space, this path independence expression can also be proved by using the vector calculus identity formula_46 and the Stokes' theorem formula_47 for a rectifiable simple closed  path formula_19 with the smooth oriented surface formula_23 in it. Again, for a 3-dimensional space, the converse of this statement is also true: If the circulation (the line integral along a closed path) of a vector field formula_12 around every rectifiable simple closed path in formula_3 is formula_52, then formula_12 is a conservative vector field. So far it has been proven that a conservative vector field formula_12 is line integral path-independent. "Conversely", if a vector field formula_12 is (line integral) path-independent, then it is a conservative vector field, so the following biconditional statement holds: The proof of  this converse statement is the following. formula_12 is a vector field which line integral is path-independent. Then, let's make a function formula_6 defined as formula_58 over an arbitrary path between a chosen starting point formula_59 and an arbitrary point formula_60. Since it is path-independent, it depends on only formula_59 and formula_60 regardless of which path between these points is chosen. Let's choose the path shown in the left of the right figure where a 2-dimensional Cartesian coordinate system is used. The second segment of this path is parallel to the formula_63 axis so there is  no change along the formula_64 axis. The line integral along this path is formula_65 By the path independence, its partial derivative with respect to formula_63 is formula_67 since formula_68 and formula_63 are independent to each other. Let's express formula_12 as formula_71 where formula_72 and formula_73 are unit vectors along the formula_63 and formula_64 axes respectively, then, since formula_76, formula_77 where the last equality is from the second fundamental theorem of calculus. A similar approach for the line integral path shown in the right of the right figure results in formula_78 so formula_79 is proved for the 2-dimensional Cartesian  coordinate system. This proof method can be straightforwardly expanded to a higher dimensional orthogonal coordinate system (e.g., a 3-dimensional spherical coordinate system) so the converse statement is proved. Irrotational vector fields. Let formula_80 (3-dimensiontal space), and let formula_81 be a formula_5 (continuously differentiable) vector field, with an open subset formula_3 of formula_4. Then formula_12 is called irrotational if and only if its curl is formula_86 everywhere in formula_3, i.e., if formula_88 For this reason, such vector fields are sometimes referred to as curl-free vector fields or curl-less vector fields. They are also referred to as longitudinal  vector fields. It is an identity of vector calculus that for any formula_89 (continuously differentiable up to the 2nd derivative) scalar field formula_6 on formula_3, we have formula_92 Therefore, every formula_5 conservative vector field on formula_3 is also an irrotational vector field on formula_3. Provided that formula_3 is simply connected, the converse of this is also true: Every irrotational vector field on formula_3 is a formula_5 conservative vector field on formula_3. The above statement is "not" true in general if formula_3 is not simply connected. Let formula_3 be formula_102 with the formula_103-axis removed, i.e., formula_104. Now, define a vector  field formula_12 on formula_3 by formula_107 Then formula_12 has zero curl everywhere in formula_3, i.e., formula_12 is irrotational. However, the circulation of formula_12 around the unit circle in the formula_112-plane is formula_113. Indeed, note that in polar coordinates, formula_114, so the integral over the unit circle is formula_115 Therefore, formula_12 does not have the path-independence property discussed above and is not conservative. In a simply connected open region, an irrotational vector field has the path-independence property. This can be seen by noting that in such a region, an irrotational vector field is conservative, and conservative vector fields  have the path-independence property. The result can also be proved directly by using Stokes' theorem. In a simply connected open region, any vector field that has the path-independence property must also be irrotational. More abstractly, in the presence of a Riemannian metric, vector fields correspond to differential. The conservative vector fields correspond to the exact , that is, to the forms which are the exterior derivative formula_117 of a function (scalar field) formula_118 on formula_3. The irrotational vector fields correspond to the closed , that is, to the formula_120 such that formula_121. As any exact form is closed, so any  conservative vector field is irrotational. Conversely, all closed are exact if formula_3 is simply connected. Vorticity. The vorticity formula_123 of a vector field can be defined by: formula_124 The vorticity of an irrotational field is zero everywhere. Kelvin's circulation theorem states that a fluid that is irrotational in an inviscid flow will remain irrotational. This result can be derived from the vorticity transport equation, obtained by taking the curl of the Navier-Stokes Equations. For a two-dimensional field, the vorticity acts as a measure of the "local" rotation of fluid elements. Note that the vorticity does "not" imply  anything about the global behavior of a fluid. It is possible for a fluid traveling in a straight line to have vorticity, and it is possible for a fluid that moves in a circle to be irrotational. Conservative forces. If the vector field associated to a force formula_125 is conservative, then the force is said to be a conservative force. The most prominent examples of conservative forces are the gravitational force and the electric force associated to an electrostatic field. According to Newton's law of gravitation, the gravitational force formula_126 acting on a mass formula_127 due to a mass  formula_128, which is a distance formula_129 between them, obeys the equation formula_130 where formula_131 is the gravitational constant and formula_132 is a "unit" vector pointing from formula_128 toward formula_127. The force of gravity is conservative because formula_135, where formula_136 is the gravitational potential energy. It can be shown that any vector field of the form formula_137 is conservative, provided that formula_138 is integrable. For conservative forces, "path independence" can be interpreted to mean that the work done in going from a point formula_23 to a point formula_24 is independent of the path chosen, and that the work formula_141 done in  going around a simple closed loop is formula_52: formula_143 The total energy of a particle moving under the influence of conservative forces is conserved, in the sense that a loss of potential energy is converted to an equal quantity of kinetic energy, or vice versa.