Look at $f'_{\epsilon,\delta}$ given by the periodic extension of the piecewise linear interpolant of $(0,2),(\epsilon,2),(\epsilon+\delta,-2),(2\epsilon+\delta,-2),(2\epsilon+2\delta,2)$, where $\epsilon$ and $\delta$ are chosen so that $1/(2\epsilon+2\delta)$ is an integer. Then $f_{\epsilon,\delta}(x):=\int_0^x f'_{\epsilon,\delta}(y) dy$ will:
- Be $C^1$.
- Satisfy the boundary conditions (this is why we needed the periodicity structure).
- Have $C^0$ norm on the order of $\epsilon$ provided $\delta$ is comparable to $\epsilon$ or smaller.
- Have $J=-12+O(\delta)<0$ for small $\delta$ at fixed $\epsilon$. Here $-12$ is what you would get if the derivative simply bounced back and forth between $2$ and $-2$ without changing continuously in between.
This example (when the details are ironed out) will prove that $y=0$ is not a strong minimum of $J$. The idea of it is that a function with a small $C^0$ norm, even if it is $C^1$, is free to wiggle a great deal, as long as its wiggles always bring it back towards zero.