It turns out that the above technique can be used to handle motion along more complicated frictionless trajectories. To do so, however we must be able to deal with a force whose projection on the trajectory varies through the motion.
Our derivation for work performed by a varying force in one dimension
is essentially applicable in higher dimensions as well. The correct
and most general expression
for work becomes:
![]()
Consider as an example the work of the gravitational force
along a more complicates trajectory:

We see that the same expression is obtained as for the case of
a simple direct displacement
from
to
which is covered by Eq. 31. In words we
have derived the remarkable result that the work performed by gravity
depends only on the magnitude of the resulting vertical displacement
not on any other detail of the trajectory. This is an enormously powerful
conclusion. It implies that if I were to launch the vehicle on a frictionless
track which has some arbitrarily complicated hilly shape I would reach
exactly the same height as calculated for the simple inclined track.