If $f(x)$ be a function such that $-1 \leq f(x)\leq 1$ and $\displaystyle \int_{0}^{1}f(x)dx = 0.$ >Then maximum value of $\int_{0}^{1}(f(x))^3 dx$ 
If $f(x)$ be a function such that $-1 \leq f(x)\leq 1$ and $\displaystyle \int_{0}^{1}f(x)dx = 0.$
Then maximum value of $\int_{0}^{1}(f(x))^3 dx$

$\bf{My\; Try::}$ Given $f(x)\leq 1\Rightarrow (f(x)-1)^3\leq 0$
So $$\int_{0}^{1}(f(x))^3dx-\int_{0}^{1}dx-3\int_{0}^{1}(f(x))^2dx+3\int_{0}^{1}f(x)dx \leq 0$$
Although i have take $f(x)-1\leq 0,$ But i did not understand what function i have take such that
the $\displaystyle \int_{0}^{1}(f(x))^3 dx$ has maximum value
plz explain me in detail,  Thanks
 A: The answer is .25 but I am just a beginner with MathJax. Complete solutions can be found on Brilliant.org by Shivang Jindal and others.
https://brilliant.org/problems/maximize-the-integral/?group=FMe7gNXpVJO2
I am just sharing what I found for the benefit of users here. Keep Learning !!
A: Here is a variational approach.

Assume that $\left|f(x)\right|\le1$ and
$$
\int_0^1f(x)\,\mathrm{d}x=0\tag{1}
$$
For any variation of $f$ which maintains $(1)$, we have
$$
\int_0^1\delta f(x)\,\mathrm{d}x=0\tag{2}
$$
Furthermore, since $\left|f(x)\right|\le1$, if $f(x)=-1$, then $\delta f(x)\ge0$ and if $f(x)=1$, then $\delta f(x)\le0$.
The variation of
$$
\int_0^1f(x)^3\,\mathrm{d}x\tag{3}
$$
is
$$
\begin{align}
\delta\int_0^1f(x)^3\,\mathrm{d}x
&=3\int_0^1f(x)^2\,\delta f(x)\,\mathrm{d}x\tag{4}
\end{align}
$$
If $f(x)=-1$, then since $\delta f(x)\gt0$ $(4)$ says $(3)$ is not maximized, so we cannot have $f(x)=-1$.
If $f(x)=1$, then since $\delta f(x)\lt0$ $(4)$ says $(3)$ is maximized, so we can have $f(x)=1$.
If $\left|f(x)\right|\lt1$, linear optimization with $(4)$ constrained by $(2)$ says that there is a $\lambda$ so that $f(x)^2=\lambda$. Let $\mu=\sqrt\lambda$.
Let $a$ be the measure of the set where $f(x)=-\mu$ and $b$ be the measure of the set where $f(x)=\mu$. Then
$$
\begin{align}
0
&=\int_0^1f(x)\,\mathrm{d}x\\
&=-a\mu+b\mu+(1-a-b)1\tag{5}
\end{align}
$$
Thus, $\mu=\frac{1-a-b}{a-b}$. Furthermore,
$$
\begin{align}
\int_0^1f(x)^3\,\mathrm{d}x
&=-a\mu^3+b\mu^3+(1-a-b)1\\
&=(1-a-b)\left(1-\frac{(1-a-b)^2}{(a-b)^2}\right)\tag{6}
\end{align}
$$
For a given $a+b$, $(6)$ is maximized when $b=0$. Then we have
$$
\begin{align}
\int_0^1f(x)^3\,\mathrm{d}x
&=-2+\frac3a-\frac1{a^2}\\
&=\frac14-\left(\frac1a-\frac32\right)^2\tag{7}
\end{align}
$$
Thus, the maximum is $\frac14$.
A: Intuition: to make $\int f^3$ big, you want the negative part of $f$ to consist of small values on a large set, and the positive part of $f$ to consist of large values on a small set. Then the cubing will have more effect on the negative piece than the positive piece, which will make $\int f^3$ positive even though $\int f$ is zero.
If you're OK with discontinuous functions then it is easy to make what I just said precise. One such $f$ is $-\frac{1}{3}$ between $0$ and $2/3$ and $2/3$ between $2/3$ and $1$. Given what I said should be small and what I said should be large, you can tweak these numbers to make $\int f^3$ bigger and bigger; then you should try to prove that the limit of the values you get is actually an upper bound.
