Consider the setup shown in the gure below. The cart of mass M moves along
the (horizontal) x axis. A second mass m is suspended at the end of a rigid, massless
rod of length L. The rod is attached to the cart at point A, and is free to pivot about A in the x-y plane. Frictional forces may be ignored.
I got the same lagrangian as in wikipedia, so i think it's right.