Calculate kinetic, potential, and total mechanical energy
KE = ½mv² (kinetic energy)
PE = mgh (potential energy)
E_total = KE + PE