Sharp area-cost bound for a barrier with fixed endpoints (source code)

= Sharp area-cost bound for a barrier with fixed endpoints
{title2=$\int_0^1y'^2dx\geq12(\int_0^1y\,dx)^2$}

For $y(0)=y(1)=0$, write $A=\int_0^1y\,dx$ and $w=x(1-x)$. <Integration by parts> gives $2A=\int_0^1y'w'\,dx$, while $\int_0^1w'^2dx=1/3$. The <Cauchy-Schwarz inequality> therefore gives the displayed sharp bound, with equality exactly when $y=Kw$. A prescribed positive budget $B=\int_0^1(y+y'^2)dx$ consequently gives
$$
A\leq\frac{\sqrt{1+48B}-1}{24},\qquad y_{\mathrm{opt}}(x)=\frac{\sqrt{1+48B}-1}{4}x(1-x).
$$
This proves the unique global optimum, rather than only stationarity from a <Lagrange multiplier>.