Pendulum - N-body pendulum simulator

Lagrange’s equation

By combining the potential energy part and the kinetic energy part, I obtain the resulting Lagrange’s equation:

\[\lag = 0_{\ia}.\]