Consider functions $x(t): [0,1] \to \mathbb{R}$ with $x(0) = x(1) = 0$. I would like to find a prove that the functional
$$ x(t) \mapsto \int_0^1 \left[ \frac{1}{2} \left( \frac{dx}{dt} \right)^2 - a x \right] \, dt$$
is minimized along the curve $x_0(t) = a t (1 - t)$. Perhaps I could argue that $x(t) = x_0(t) + \epsilon \, x_1(t)$ and differentiate with respect to $\epsilon$ ?
This is not unlike the isoperimetric problem.
For the functional $\int_0^1\left(\frac{x'^2}{2}-ax\right)dt$ and the Euler-Lagrange equation you need to calculate $$\frac{\partial{\cal L} }{\partial x}=-a,$$ and $$\frac{\partial{\cal L} }{\partial x'}=x'.$$ Then the equation is $$x''+a=0$$ which upon integration you will get $$x(t)=-\frac{at^2}{2}+Bt+C$$ for some other constants $B,C$.