Mechanical energy equation