Clamped fourth-order variational extremal on a quarter period (source code)

= Clamped fourth-order variational extremal on a quarter period
{title2=$J[y]=\int_0^{\pi/2}(y''^2-y^2+x^2)dx$}

With values $y(0)=y(\pi/2)=y'(\pi/2)=0$ and $y'(0)=1$, the <higher-order Euler-Lagrange equation> is $y^{(4)}-y=0$. Write $c=\cosh(\pi/2)$ and $s=\sinh(\pi/2)$. Solving the four linear boundary equations gives $y=[c(\cos x-\cosh x)+(1-s)\sin x+(1+s)\sinh x]/2$. The added function $x^2$ does not affect the <first variation>.