Lagrangian of a coupled pendulum system