I have a question that asks:
Find the extremal of the functional $$J(x)=\int^{\pi}_02x\sin(t)-\dot x^2 dt$$ with $x(0)=x(\pi)=0$. I found $x(t)=\sin(t)$
It then asks to
Show that this extremal provides the global maximum of $J$
I am not sure how to show this. Do I want to look at $J''(x)$ or at $x''(t)$
Looking at $J''$ is the right impulse ($x''$ would not help), but the second variation in infinite-dimensional spaces is hard to handle. It's better to take advantage of the fact that $J$ is algebraically simple: it's quadratic.
Let $x_0$ be the solution of Euler-Lagrange equation. You want to show that $J(x_0+h)- J(x_0)\le 0$ for every function $h$ in your space. Just plug it in and simplify, suing the fact that $x_0 $ solves the Euler-Lagrange equation. You should get $J(x_0+h)- J(x_0 ) = -\int_0^\pi \dot h^2\,dt$.