 The gravitational force between two bodies of mass "M" and "m" separated by a distance "r" is given by Newton's law

where formula_19 is a vector of length 1 pointing from "M" to "m" and "G" is the gravitational constant.Let the mass "m" move at the velocity v then the work of gravity on this mass as it moves from position r(t1) to r(t2) is given by
The position and velocity of the mass "m" are given by

where e"r" and e"t" are the radial and tangential unit vectors directed relative to the vector from "M" to "m".Use this to simplify the formula for work of gravity to,

This calculation uses the fact that

The electrostatic force exerted by a charge "Q" on another charge "q" separated by a distance "r" is given by Coulomb's Law

where formula_19 is a vector of length 1 pointing from "Q" to "q" and "ε"0 is the vacuum permittivity.