Hey guys. I'm trying to gather some tips that people have acquired that helps them write the Lagrangian for a system. Obviously, the classic examples are drilled into our heads over and over, but just when you think you can tackle any problem the professor throws at you, there is that tricky one that gets you. So I guess I'm asking, is there somewhat a systematic way to figure what the Lagrangian of a system is..? One example that stumped me was a system where there is a circle radius, R, and in it there is a rod length, l, with uniform mass that can move frictionlessly. Find the Lagrangian of the system and the frequency of small oscillations. Now conceptually I get that you reduce it down to a center of mass problem and that this center of mass oscillates like a simple harmonic. But I get stuck on how to actually go about writing the Lagrangian. (When l ≥ 2R, there should be no oscillations. But how to implement an inequality into the Lagrangian..? Most constraints that I've dealt with were "simple" equations, (something = somethingsomething). This really frustrates me, because the other problems I tackled them easily. But a complete left field problem like this is making me doubt if I really understand how to write the Lagrangian of any arbitrary system. So please if you guys can list some general tips that helps in writing the Lagrangian, it would greatly help me understand this skill/ability better. P.S. That example problem isn't the main point of this thread. Just an example of a problem that is not a variant of classics like the single or double pendulum, simple harmonic oscillator, etc. So you don't have to use that as an example to teach me.