### Formula

U

potential energy

G

gravitational constant

m1

mass

m2

mass

r

distance

K

Constant of integration

U

potential energy

G

gravitational constant

m1

mass

m2

mass

r

distance

K

Constant of integration

In physics, potential energy is the energy stored in a body or in a system due to its position in a force field or due to its configuration. Over large variations in distance, the approximation that g is constant is no longer valid, and we have to use calculus and the general mathematical definition of work to determine gravitational potential energy. For the computation of the potential energy we can integrate the gravitational force, whose magnitude is given by Newton's law of gravitation, with respect to the distance r between the two bodies.

G

m1

m2

r

K

U

Precision

- C
- C#
- C++
- Java
- JavaScript
- LaTeX
- PHP