Find the extremal of $\int_0^d \ddot{x}^2-\alpha x \: dt $ We are asked to find the extremal of
$\displaystyle \int_0^d \ddot{x}^2-\alpha x \: dt$
where $x=x(t),\: \alpha$ constant, $d>0$, $x(0)=0, \: x(d)=0$, $\dot x(0) = 0, \: \dot x(d) = 0$, 
by considering:
$\displaystyle 0 = \frac{\partial f}{\partial x}- \frac{d}{dt}\frac{\partial 
 f}{\partial\dot x} + \frac{d^2}{dt^2}\frac{\partial f}{\partial \ddot x}$
What I have is:
$f(t,x,\dot x, \ddot x) = \ddot{x}^2-\alpha x$
and solving:
\begin{align*}
    0 
    &= \frac{\partial f}{\partial x}- \frac{d}{dt}\frac{\partial f}{\partial \dot x} + \frac{d^2}{dt^2}\frac{\partial f}{\partial\ddot x}\\
    &= -\alpha + 0 + \frac{d^2}{dt^2}2\ddot x\\
x^{(4)}&=\frac{\alpha}{2}\\
\Longrightarrow x &= \frac{\alpha}{48}t^4 + \beta t^3 + \gamma t^2 + \delta t + \varepsilon, \quad \beta, \gamma, \delta, \varepsilon \in \mathbb R
\end{align*}
From $x(0)=0 \Longrightarrow \varepsilon=0 $, $\dot x(0)=0 \Longrightarrow \delta = 0$.
$x(d)=0 \Longrightarrow 0 = \frac{\alpha}{48} d^4 + \beta d^3 + \gamma d^2 \Longrightarrow 0 = \frac{\alpha}{48} d^2 + \beta d + \gamma \Longrightarrow \gamma = - \frac{\alpha}{48} d^2- \beta d $
$\dot x(d)=0 \Longrightarrow 0 = \frac{\alpha}{12} d^3 + 3\beta d^2 + 2\gamma d$
$\Longrightarrow 0 = \frac{\alpha}{12} d^2 + 3\beta d + 2\gamma = \frac{\alpha}{12} d^2 + 3\beta d + 2(- \frac{\alpha}{48} d^2- \beta d)= \frac{\alpha}{24} d^2 + \beta d \Longrightarrow 0 =\frac{\alpha}{24} d^2 + \beta d $
$\Longrightarrow \beta = - \frac{\alpha}{24} d $
$\Longrightarrow \gamma = - \frac{\alpha}{48} d^2- \beta d = - \frac{\alpha}{48} d^2 - (-\frac{\alpha}{24} d)d =\frac{\alpha}{48} d^2 $

So, $\displaystyle x(t) = \frac{\alpha}{48}t^4 -\frac{\alpha}{24} d t^3 + \frac{\alpha}{48} d^2t^2$ is the extremal.

I'm just checking if this is correct?

For a critical value of
$$
\int_0^d\left(\ddot x^2-\alpha x\right)\mathrm{d}t\tag1
$$
we need
$$
\begin{align}
0
&=\delta\int_0^d\left(\ddot x^2-\alpha x\right)\mathrm{d}t\\
&=\int_0^d\left(2\ddot x\,\delta\ddot x-\alpha\,\delta x\right)\mathrm{d}t\\
&=\int_0^d\left(-2\dddot x\,\delta\dot x-\alpha\,\delta x\right)\mathrm{d}t\\
&=\int_0^d\left(2\,\ddddot x\,\delta x-\alpha\,\delta x\right)\mathrm{d}t\tag2
\end{align}
$$
Thus, the critical point is when $\ddddot x=\frac\alpha2$. That would mean
$$
x=\frac\alpha{48}t^4+a_3t^3+a_2t^2+a_1t+a_0\tag3
$$
Computing $a_k$ so that $x(0)=x(d)=\dot x(0)=\dot x(d)=0$ and  gives
$$
x=\frac\alpha{48}t^4-\frac{\alpha d}{24}t^3+\frac{\alpha d^2}{48}t^2\tag4
$$
So, your answer looks correct.
