# Physics with Calculus/Mechanics/Energy and Conservation of Energy/Potential energy

Potential energy is the energy stored in an object due to its position. There are several types of potential energy.

## Gravitational[edit | edit source]

Gravitational potential energy, involves the line integral of the force between two objects ( and ). By Newton's universal law of gravity, the force is

We integrate to get potential energy:

Here, we have taken the reference point (where the potential energy equals zero) to be at . Sometimes, when dealing with small distances where the difference in acceleration due to gravity will be negligeable we simplify the energy equation by assuming that , where is the Earth's radius and is the height above the Earth's surface. Taking to be the mass of the planet:

.

Note that the vector points in the direction. Inserting this into the integral for :

,

where now, the reference point is on the surface of the Earth.

## Elastic[edit | edit source]

Elastic potential energy is the energy stored in a compressed or elongated object (a spring, for example). The amount of energy stored in the object depends on spring constant () and the displacement from the rest position (). It should be noted that the amount of energy is the same regardless whether the object is compressed or elongated. Given the force:

We integrate to get energy: