Let $X=\left\{f\in C^1[0,1]: f(0)=0=f(1)\right\}$.
Define $J:X \to \Bbb R$ by $J(f)=\int\limits^1_0 e^{-f^\prime (x)^2}dx.$
How to show that $J$ does not attain its infimum.
If $F(x,f,f^\prime)=e^{-f^\prime (x)^2}$, using the Euler-Lagrange equation: $F_{f}-\frac{d}{dx}\left(F_{f^\prime}\right)=0$ with $f\in X$, one can obtain $f=0$. But this does not give infimum. Possibly, $f=0$ is the maximum of $J(f)$ as $J(f)\le 1, \forall f\in X$ and $J(0)=1$. Let me know how to approach this?
Let $f_n(x)=nx(1-x)$. Then $J(f_n)=\int_0^{n} e^{-n^{2}(1-2x)^{2}} \, dx$ which tends to $0$ as $n \to \infty$ by Dominated Convergence Theorem. Hence the infimum of $J$ is $0$. Obviously, $0$ is not attained.