# Special cases of action integral $\delta S=0$ that do not satisfy the Euler-Lagrange equation

One way of deriving the Euler-Lagrange equations is to require that the action integral is stationary under a virtual displacement $$\delta S=0$$. One then usually arrives at the equation $$\delta S=-\left[\frac{\partial L}{\partial \dot q}\delta q\right]_{t_1}^{t_2}+\int_{t_1}^{t_2} dt\left[ \frac{\partial L}{\partial q}-\left(\frac{d}{dt}\frac{\partial L}{\partial \dot q}\right) \right]\delta q=0$$ Usually we say that the boundary conditions are such that the first term vanishes and thus a solution to the equation for an arbitrary displacement $$\delta q$$, is the Euler-Lagrange equation.

While I have no doubts that it is possible to find some expressions of $$(q,L,t_1,t_2)$$ that satisfies the above equation, but not the Euler-Lagrange equation, my questions is whether or not there are examples of this happen physically? It could for instance be that the boundary term cancels with the integral etc.
As far as I understand nature only requires $$\delta S=0$$, and Euler-Lagrange is just a special case for arbitrary $$\delta q$$ and vanishing boundaries.

General relativity is the prototypical example. Varying the Einstein-Hilbert action gives $$2$$ terms: one which produces the Einstein's equations, and another term which is proportional to the normal derivative of $$\delta g_{\mu \nu}$$. This second term is not required to vanish generally. Then, we need to add an extra, boundary term that, when varied with respect to the metric, cancels exactly the second term mentioned above, and then generates the Einstein's equations with a well-posed variational principle. This term is known as the Gibbons-Hawking-York boundary term. For a detailed derivation, see Poisson's book, A Relativist's Toolkit (chapter 4).