Equations of Motion for the Inverted Pendulum (2DOF) Using Lagrange's Equations