Lesson 8 of 15

Gravitational Potential Energy

Gravitational Potential Energy

An object at height hh above a reference level has gravitational potential energy:

PE=mghPE = mgh

  • mm — mass in kg
  • gg — 9.81 m/s² (gravitational acceleration)
  • hh — height above reference level in metres

Conservation of Energy

In the absence of friction, mechanical energy is conserved:

KE+PE=constantKE + PE = \text{constant}

12mv2+mgh=constant\frac{1}{2}mv^2 + mgh = \text{constant}

This means PE converts to KE as an object falls, and vice versa as it rises. A ball dropped from height hh reaches the ground with speed:

v=2ghv = \sqrt{2gh}

Examples

mm (kg)hh (m)PE (J)
105490.5
11098.1
520981.0
7021373.4

Your Task

Implement gravPE(m, h) returning gravitational potential energy in Joules.

TCC compiler loading...
Loading...
Click "Run" to execute your code.