Solution (source code)

= Solution

The Euler-Lagrange equation is
$$
y^{(4)}-2y''-y=0.
$$
Put $A=\sqrt{1+\sqrt2}$, $B=\sqrt{\sqrt2-1}$, and $L=\pi/2$. The conditions at zero reduce the general solution to
$$
y=C(\cosh Ax-\cos Bx)
+D\left(\sinh Ax-\frac AB\sin Bx\right).
$$
Define
$$
U=\cosh(AL)-\cos(BL),
\quad V=\sinh(AL)-\frac AB\sin(BL),
$$
$$
U'=A\sinh(AL)+B\sin(BL),
\quad V'=A(\cosh(AL)-\cos(BL)).
$$
The remaining boundary conditions give
$$
\boxed{C=\frac{LV'-V}{UV'-U'V},
\qquad D=\frac{U-LU'}{UV'-U'V}},
$$
which determines the unique extremal explicitly.