We consider a second-order problem in the calculus of variations, with an application to robotics in mind. The analysis is carried out on a general Riemannian manifold M and then specialized to the case where M is the Lie group SO(3) of rotations in R 3 . For SO(3), the Euler-Lagrange equations reduce to interesting nonlinear systems of ordinary differential equations in R 3 .