The swinging mass m is a bit more of a problem. The potential energy is easy enough:
where y is the length of the string.
For the kinetic energy we have the downward motion of the mass m to contend with as well as the radial motion of the swing. So we have two terms:
The Lagrangian will be total T minus total V: