Maximizing the integral of the square of a function with bounded square derivative Let
$$
C_0[0,1] := \left\{ f : [0,1] \to \mathbb{R} : f(0) = 0, f \textrm{ continuous} \right\} \\
K := \left\{ f \in C_0[0,1] : \exists f' \textrm{ s.t. } f(t) = \int_0^t f'(s) \, ds \; \forall t \in [0,1] \textrm{ and s.t. } \int_0^1 |f'(s)|^2 \, ds \leq 1 \right\}
$$
I would like to calculate the following:
$$
M := \sup \left\{ \int_0^1 (f(t))^2 \, dt : f \in K \right\}
$$
What I have so far:
$$
f'(s) = \sqrt{3}(1 - s) \implies f(s) = \sqrt{3}\left(s - \frac 12 s^2\right) \implies \int_0^1 (f(t))^2 \, dt = \frac 25 \implies M \geq \frac 25
$$
(see this calculation and this calculation, this $f$ maximizes the objective function $\int_0^1 f$ without the square), as well as (for $f \in K$)
$$
\int_0^1 (f(t))^2 \, dt = \int_0^1 \left(\int_0^t f'(s) \, ds\right)^2 \, dt \overset{\textrm{Cauchy-Schwarz}}{\leq} \int_0^1 t \cdot \int_0^t |f'(s)|^2 \, ds \, dt \\
\leq \int_0^1 t \cdot \int_0^1 |f'(s)|^2 \, ds \, dt \leq \int_0^1 t \, dt = \frac 12 \implies M \leq \frac 12
$$
Hence,
$0.4 \leq M \leq 0.5$, but I would like to know the exact value. Any hints on how to calculate $M$ are appreciated.
A slight improvement on the lower bound of $0.4$ can be given by taking $f'(s) = b(1-s)^{\frac 1a}$. Then $b = \sqrt{\frac{a + 2}{a}}$ is the optimal choice to make $f'$ as large as possible while keeping $\int |f'|^2 \leq 1$. Varying $a$ with the help of WolframAlpha seems to show that $\int f^2$ is maximal around $a = 1.38$ with $\int f^2 \approx 0.404$ (while for $a = 1$ and $a = 2$, we have $\int f^2 = 0.4$). So $M \geq 0.404$
 A: For any non zero $f\in K$, rescaling it by $\frac{1}{\int_0^1 f’^2}\geq 1$ gives a better solution, so I can assume the constraint to be an equality:
$$
\int_0^1 dt f’(t)^2=1
$$
The problem is one of convex optimisation. General theorems of compact guarantee the existence of a solution, and it will be a critical point. The critical points are found using calculus of variation using the same method as for deriving Euler-Lagrange’s equation. Noting $S$ the functional to optimize with $\lambda$ a Lagrange multiplier for the condition:
$$
\begin{align}
\delta S &= \delta \int_0^1 \left(f(t)^2-\lambda f’(t)^2\right)dt \\\\
&= \int_0^1 \left(2f(t)\delta f(t)-\lambda f’(t)\delta f’(t)\right)dt \\\\
&= \int_0^1 \left(2f(t)+2\lambda f’(t)\right) \delta f(t) dt +[2\lambda f’(t)\delta f(t)]_0^1
\end{align}
$$
Due to the constraint $f(0)=0$, $\delta f(0)=0$. However, for the evaluation of bracket at $1$ to always vanish, you need the boundary condition:
$$
\lambda f’(1)=0
$$
As usual the integral gives you the bulk condition:
$$
f(t) + \lambda f’’(t) =0
$$
From the boundary conditions $f(0)=f'(1)=0$, the critical solutions are of the form:
$$
f = A\sin(at)
$$
with $A$ a normalising factor enforcing the constraint and $a$ of the form:
$$
a = \frac{\pi}{2}+2\pi n
$$
with $n\in\mathbb N$. It turns out that the optimal value of $n$ is $n=0$ giving:
$$
M = \frac{4}{\pi^2} \sim 0.405
$$
which is within your bounds, and your "slight" improvement is very good.
Hope this helps.
