Does Lagrangian always exist for any equation? In mathematical physics, a lot of equations can be interpreted as a solution of least action principle for some Lagrangian. I wonder if for every equation there is a Lagrangian so that one achieves the original equation when solving the principle of least action?
 A: Every classical physics equation can be traced back to a Lagrangian. And every quantum problem of finding the expectation value of an operator $\theta$ can be characterized as a problem of doing a path integral over $\theta \exp(i \int d^dx \mathcal{L})$. In fact, the Standard Model, from which every modern theory of physics (that doesn't involve gravity) can be derived is a Lagrangian. And the classical theory of gravity GR can be derived by functionally differentiating the Hilbert action ("action" is the spacetime integral of the Lagrangian). So yeah... every established theory of physics thus far can be derived from a Lagrangian... but that doesn't necessarily mean that it's the right way to go. If we ever get a proper unifying theory, it may well be that the whole notion of describing the theory with a Lagrangian makes no sense. However the most famous candidate (String Theory) happens to have a Lagrangian! (The Nambu-Goto plus Polyakov actions)
Although not every equation is a direct result of varying an action, but rather, indirect. For example, the electric/magnetic field wave equations can be derived from Maxwell's equations, and Maxwell's equations can be directly derived from the vector field portion of the QED Lagrangian ($-\frac{1}{4} F_{\mu \nu} F^{\mu \nu}$). So while just about every physics equation you see ultimately came from a Lagrangian, that doesn't mean it's the direct result of varying a Lagrangian specifically for it. Although you can always make one up that's mathematically consistent with the equation you're looking at, though I don't think that would always get you very far.
BTW maybe the physics section is more suited for this.
