I'm stuck on a problem with lagrangian mechanics. Here's the problem; One end of a rod slides along a vertical pole while the other end slides a long a horizontal pole. At the same time a bean slides a long the rod. Find the lagrangian for the system. And this is what I worked out so far; The kinteic energy for the rod would be; T = 1/2* M Vcm^2 + 1/2* Icm(theta dot)^2 Where M is the mass of the rod Vcm is the velocity for the center of mass Icm is the moment of intertia for center of mass; Icm = M/12*(L/2)^2 L is the length of the rod theta is the angle between the vertical pole and the rod The potential energy for the rod would be; V = MgL*cos(theta) So far I think it's ok because the velocity of the rod is relative to a fixed intertial frame, but I don't know what to do with the bean. The beans velocity would be the veclocity of the rod plus the beans velocity relative to the rod, right? I would be very greatful if someone could give me a little help with this.