Mechanical energy is the total amount of kinetic energy and potential energy of an object that is used to do a specific work. Mechanical energy can also be defined as the energy of an element due to its position or motion or both. The potential energy of an object is due to its position and kinetic energy is due to its motion. The potential energy of an object is zero when it is in the movement and kinetic energy is zero when the object is in rest.
The formula of mechanical energy is
M.E = K. E + P.E
M.E = ½ mv2 + mgh
Where
m = mass of an object
v = velocity of that object
g = acceleration due to gravity
h = height of an object.