How to show a function is a global maximum We have the functional $$F[y]=\int_0^\pi y+\frac12y^2-\frac12y''^2\,dx$$ where $y=y(x)$. There are also some boundary conditions - $$y(0)=-1,y'(0)=0,y(\pi)=\cosh\pi,y'(\pi)=\sinh\pi.$$ I found the function which extremises this by using the Euler-Lagrange equation, and I got $y(x)=\cosh x-\cos x -1$. 
Then the question says to show that this is a global maximum, and says I may use the result $$\int_0^\pi\phi^2(x)\,dx\leq\int_0^\pi\phi'^2(x)\,dx$$ which is valid for any $\phi$ which satisfies $\phi(0)=\phi(\pi)=0$.

I am not sure how to mould my function into something which satisfies this, since if I change the function then its no longer the thing that maximises $F[y]$. I also considered using the second variation but this would only be able to prove it is a local maximum. I also calculated $$y+\frac12y^2-\frac12y''^2=-2\cosh x\cos x-\frac12$$but I don't know if this is helpful in any way. How can I use this result to show it is a global maximum?

 A: Let $y_0$ solve the Euler–Lagrange equations, and let $\phi$ be such that $y_0+t\phi$ also satisfies the boundary conditions. Then we need to have $\phi(0)=\phi(1)=\phi'(0)=\phi'(1)=0$. Expand $F[y_0+t\phi]$:
$$ F[y_0+\phi] = F[y_0] + t\int_0^{\pi} (\phi + \phi y_0 - \phi''y_0'') \, dx + \frac{1}{2}t^2 \int_0^{\pi} (\phi^2 - \phi''^2) \, dx . $$
Now show that the coefficient of $t$ is zero (hint: where do the Euler–Lagrange equations come from?), and that the coefficient of $t^2$ is negative (hint: you need to use the provided inequality more than once).
Since this holds for arbitrary $t$ and $\phi$, what does this tell you about the functional applied to any function that satisfies the boundary conditions and is sufficiently well-behaved?
A: The second variation was a good thought, and you're correct that the typical method would only show local maximisation.  But in this case, the functional is simple enough that it'll work fine. I'll use $y$ to denote the solution you've already found, and let $\phi$ be some variation, such that $\phi(0) = \phi(\pi) = \phi'(0)=\phi'(\pi) = 0$.  We'll aim to show that $F[y+\epsilon \phi] - F[y] \leq 0$ for all such $\phi$, without the restriction that $\epsilon$ is small.  This would demonstrate that $y$ is indeed the global maximser.
$$\begin{align}
F[y^*+\epsilon \phi] - F[y^*]  &= \int_0^\pi \epsilon \phi+ \epsilon y \phi +\frac 12 \epsilon^2 \phi^2 - \epsilon y'' \phi'' - \frac 12 \epsilon^2 \phi''^2 \ dx \\
&= \epsilon \int_0^\pi (\phi + y \phi - y'' \phi'') \ dx + \frac 12\epsilon^2\int_0^\pi (\phi^2 - \phi''^2) \ dx
\end{align}$$
Integration by parts shows that the first integral is exactly zero, which shouldn't be surprising given how you derived the Euler-Lagrange equation in the first place.  Now since $\phi(0) = \phi(\pi) =0$, we know $\int_0^\pi \phi^2dx \leq \int_0^\pi \phi'^2dx $, and $\phi'(0) = \phi'(\pi) =0$, so $\int_0^\pi \phi'^2dx \leq \int_0^\pi \phi''^2dx $. Putting this into the above answer gives that $F[y+\epsilon \phi] - F[y] \leq 0$, as required.
