# Maximizing $\int^{1}_{0}f^3(x)\,dx$ when $\int^{1}_{0}f(x)\,dx=0$ [duplicate]

Find the maximum of the integral$$\displaystyle \int^{1}_{0}f^3(x)\,dx$$ for $$f$$ satisfying $$\displaystyle \int^{1}_{0}f(x)\,dx=0$$ and $$-1 \leq f(x) \leq 1$$. Intuitively, I got $$\frac14$$, but how can this be proved rigorously?

• Are you familiar with optimal control theory? This can be rewritten as a standard optimal control problem with inequality constraints on the control. Namely, $z'=u$, $-1\leq u\leq1$, $z(0)=z(1)=0$ and $\int_0^1u^3\,dt\to\max$. The solution is found in a standard way using Pontryagin's maximum principle. Here $u=f$ and $z(t)=\int_0^tu\,dt$. – Conifold 2 days ago
• I have a vague understanding about it. I'll try to figure it out – Vertum 2 days ago
• Does this answer your question? Find maximum value of $\int_{0}^{1}\left(f(x)\right)^3dx$ – Kyky 2 days ago

This is not a complete solution, but too long for a comment. As I mentioned in the comment to the OP, this can be converted into an optimal control problem with inequality constraint on the control. Unfortunately, the Pontryagin maximum principle (PMP) does not produce a solution. It gives $$f=\text{const}$$, which requires $$f=0$$ to satisfy the integral constraint. This is obviously neither $$\min$$ nor $$\max$$ (which are the negatives of each other here), and it means that neither $$\min$$ nor $$\max$$ exists, because PMP is a necessary condition of optimality.
As for the $$\sup$$, it is strictly greater than $$\frac14$$. Indeed, consider $$f(x)=1$$ on $$[0,a]$$ and $$-\frac{a}{1-a}$$ on $$(a,1]$$ (trying to "concentrate" the positive part as much as possible, and "spread" the negative part as much as possible). For $$0\leq a\leq\frac12$$ it satisfies the constraints, and $$\int_0^1f^3(x)dx=a-\left(\frac{a}{1-a}\right)^3(1-a)=\frac{a(1-2a)}{(1-a)^2}.$$ By simple calculus, the $$\max$$ is attained at $$a=\frac13$$ and is equal to $$\frac14$$. Such piecewise constant $$f$$ are allowed by PMP, so if this was indeed the maximizing $$f$$ PMP would have found it. Therefore, it is not.
• I found $1/4$ in this manner. I found rigorous proof here math.stackexchange.com/questions/2356361/… – Vertum 2 days ago