 This is done by introducing a parameterized curve γ(t)=r(t) from γ(a)=A to γ(b)=B, and computing,

For the force field F, let v= dr/dt, then the gradient theorem yields,

The power applied to a body by a force field is obtained from the gradient of the work, or potential, in the direction of the velocity v of the point of application, that is

Examples of work that can be computed from potential functions are gravity and spring forces.For small height changes, gravitational potential energy can be computed using

where m is the mass in kg, g is the local gravitational field (9.8 metres per second squared on earth), h is the height above a reference level in metres, and U is the energy in joules.In classical physics, gravity exerts a constant downward force F=(0, 0, "Fz") on the center of mass of a body moving near the surface of the Earth.