Maximize $\int_{0}^{1} f(x)^5 dx$ over all $f\colon[0,1]\to[-1,1]$ with $\int_{0}^{1} f(x)^3 dx=\int_{0}^{1} f(x) dx= 0$. 
Maximize $\int_{0}^{1} f(x)^5 dx$ over all $f\colon[0,1]\to[-1,1]$ with $\int_{0}^{1} f(x)^3 dx=\int_{0}^{1} f(x) dx= 0$.

I'm not even sure where to start with this problem. Any hints would be appreciated.
 A: The maximum value of $\int_0^1 f(x)^5 \mathrm{d}x$ is $\frac{1}{16}$.
We first prove that $\frac{1}{16}$ is an upper bound.
Note that if $t\le 1$ then $t^5\le \frac{5}{4} t^3 - \frac{5}{16} t + \frac{1}{16}$. Indeed, 
$$t^5 - \left(\frac{5}{4} t^3 - \frac{5}{16} t + \frac{1}{16}\right) = (t-1)\left(t^2+\frac t2 - \frac 14 \right)^2 \le 0.$$
Putting $t=f(x)$ and integrating we obtain
$$\int_0^1 f(x)^5 \mathrm{d}x \le \int_0^1 \left(\frac 54 f(x)^3 - \frac{5}{16}f(x)+\frac{1}{16} \right) \mathrm{d}x = \frac{1}{16},$$
since by assumption $\int_0^1 f(x)\mathrm{d}x =\int_0^1 f(x)^3\mathrm{d}x=0$.
The following example shows that the bound $\frac{1}{16}$ is optimal:
$$f(x)=\begin{cases} 
\frac 14 (-1-\sqrt 5) & \text{ for } 0\le x < \frac 25 \\
\frac 14(-1+\sqrt 5) & \text{ for } \frac 25 \le x < \frac 45 \\
1 & \text{ for } \frac 45 \le x \le 1 \\
\end{cases}$$
A: The problem does not specify bad, good, or optimal functions: If $f_0$ is optimal then any "measure preserving horizontal rearrangement" of $f_0$ on the $x$-interval $[0,1]$ is admissible and gives the same objective integral as $f_0$. This means that we should not look for particular functions $f$ satisfying the constraints, but for measures $\mu$ on the interval $J:=[{-1},1]$ that indicate with which "weight" each value $y\in J$ should be taken by the $f$s under consideration. These measures then have to fulfill
$$\int_J 1\>d\mu(y)=1,\qquad \int_J y\>d\mu(y)=0,\qquad\int_J y^3\>d\mu(y)=0\ ,\tag{1}$$
and we want to maximize $$\int_J y^5\>d\mu(y)\ .$$
A simple such measure could be that $f$ assumes just the three values $-a$, $b$, and $1$ on $x$-intervals of length $u$, $v$, $w$. The conditions $(1)$ then translate to
$$u+v+w=1,\qquad -a u+ bv + w=0,\qquad -a^3 u+b^3 v+ w=0\ ,$$
which determines $u$, $v$, $w$. When $0<b<a$ they are all positive. Doing the computations one finds
$$\int_J y^5\>d\mu(y)=-a^5 u+b^5 v+w={a(1-a)(a-b)b(1+b)\over1-a+b}\ .$$
The maximum of this takes place at $a\approx0.805$, $b\approx0.31$, and leads to
the value $$\int_Jy^5\>d\mu(y)\approx0.0625\ .$$
This is the best you can attain with an $f$ having just three different values.
(My numerical results found experimentally coincide with the definite values produced by timon92.)
