The physics
Raise a body through a height h, and its PE grows by mgh. Only the change in height matters.
On a smooth track, gravity trades PE and KE. Their total stays the same. So the speed at the bottom depends only on the drop. The track's shape does not matter.
ΔU = mgh ½mv² = ½mv₀² + mgh v² = v₀² + 2gh
A falling body speeds up. So it loses more PE in each new second.
Friction is not like gravity. Its work turns motion into heat for good. The heat is the mechanical energy that went missing.
heat = PE lost − KE gained
A force comes from the slope of its potential energy: F = −dU/dx. Where the slope is zero, there is no force. That is a balance point. A dip is stable, and a hump is unstable.
Let go from rest, the total energy is E = U(x₀). The cart turns back where U = E again.
F = −dU/dx KE = E − U(x)