Let $u$ be a continous differentiable function with support in $\left[0,2\pi \right]$ and $$J(u)=\frac{1}{2}\int_{0}^{2\pi}{u'(x)^2-4u(x)^2dx}$$ What are the possible extrema for $J$ ?
I first computed the first variation which is
$$ \partial J(u,\phi) =-\int_{0}^{2\pi}{\phi(x) \cdot \left( u''(x)+4u(x) \right)dx} $$
Functions solving $\partial J(u,\phi) =0$ gives rise to the differential equation
$$u''=-4u$$
$\implies$ $$u(x)=c_1sin(2x)+c_1cos(2x)$$
I then computed the second variation $$\partial^2 J(u,\phi) =\int_{0}^{2\pi}{\phi'(x)^2-4\phi(x)^2 dx}$$
However, I do not know if $\partial^2 J(u,\phi) \ge 0$ or $\partial^2 J(u,\phi) \le 0$ holds for every $\phi$
Would appreciate any help.