The Euler-Lagrange equation for isFor small angles, set and . With and , the harmonic forcing of a horizontally driven pendulum obeysFor , its general solution isThe constants set the initial angle and angular velocity. If the bob starts vertical with zero angular velocity at , this reduces toThe solution remains an approximation only while the resulting angle is small.