As titled, I was considering the mimimization problem where $y(x)$ has two endpoints fixed. That is, minimizing $$\int_a^b L(x,y(x),y'(x)) \, dx$$
where $$\ y(a)=m, y(b)=n $$for all $y(x)$.
if the Euler-Lagrange equation is always zero for all functions $y(x)$, I think the original integral $$\int_a^b L(x,y(x),y'(x)) \, dx$$ is constant for all $y(x)$.
Which means if $$\frac {d}{dx} \frac {\partial L}{\partial y'} = \frac {\partial L}{\partial y}$$ for all $y(x)$, then $$\int_a^b L(x,y(x),y'(x)) \, dx = C$$ for some constant $C$.
But I don't know how to prove it. I start by using integration by parts, writing $$\int_a^b L(x,y(x),y'(x)) \, dx$$ as $$\left.\ x*L(x,y(x),y'(x))\right|_a^b - \int_a^b x*\frac {d}{dx}L(x,y(x),y'(x)) \, dx$$ But I don't know how to continue from here, or maybe I shouldn't use IBP here.
Any help will be appreciated.
More generally, one may show that
then the Lagrangian density is a total divergence, i.e. the action functional is a boundary term, cf. e.g. Refs. 1-3.
If furthermore the boundary is fixed by boundary conditions, then the action functional is a constant, as OP already suspected.
See also this related Phys.SE post.
References:
P.J. Olver, Applications of Lie Groups to Differential Equations, 1993.
I. Anderson, Introduction to variational bicomplex, Contemp. Math. 132 (1992) 51.
G. Barnich, F. Brandt & M. Henneaux, Local BRST cohomology in gauge theories, Phys. Rep. 338 (2000) 439, arXiv:hep-th/0002245.