Choose positive so the bob is displaced to the right relative to the cart. Its Cartesian coordinates areDifferentiation gives . Thus the exact kinetic energy and potential energy areRetain quadratic terms, using in the kinetic cross term and in the potential. The Lagrangian isIts Euler-Lagrange equations giveThe kinetic cross term is essential: acceleration of the support couples the pendulum and cart. These equations define the normal modes of a spring-mounted pendulum cart.