Update: @ChrisWhite's edits make it much better, I reopened it. After all, closing is a temporary state that can usually be escaped by editing.
My opinion after skimming through it:
It looks like a homework-type problem1. You may want to see our homework policy.
You need to show what you have tried and your level of understanding before asking a homework problem. The "too localised" reason is just used as a proxy for "does not follow homework policy".
Opinion after reading it in full:
Looking closer, it seems like the question didn't make much sense. It was clear that you were confused about Lagrangian mechanics; but the question was not exactly answerable.
Here's an example of a question of a similar type where the problem is very, very accentuated: "How do I add numbers in General Relativity?"
That's a localized question; nobody else will ask that. It doesn't matter if the answer may contain a lot of conceptual details -- this counts as "accidental" learning. The bare minimum answer to the numbers question is "just like in normal arithmetic". Which isn't really useful to anyone. Similarly, the bare minimum answer to yours is "just like in Newtonian mechanics" -- not too helpful an answer. This is basically why it was too localized.
Note that since there's already a good answer, closing doesn't change much.
However, since your main goal is to understand how to replace NM with LM, asking that question (which @ChrisWhite did in his edit) may make it reopenable :)
Mods don't have to listen to flags. However, in this case, the flag was a sensible one that made the problem with the post clear. (Unfortunately I can't tell you the details of the flag itself, that's private information)
1. Note that it doesn't have to be homework, it's just the type that matters