Prove the integral inequality on interval [-1,1] Let $f(x)$ be continuous function on $[-1,1]$ which satisfies:
1. $f(-1)\ge f(1)$.
2. $x+f(x)$ is non-decreasing.
3. $\int_{-1}^1 f(x)dx=0$. 
Prove that $\int_{-1}^1 f^2(x)dx \le \frac2 3$
 A: Let us write $\frac{2}{3}=\int_{-1}^1 x^2dx$, then the inequality turns into $\int_{-1}^1( f^2-x^2)dx\leq 0$
Write $g(x)=f(x)+x$ and $h(x)=f(x)-x$, $g(x)$ is non-decreasing or monotonic, so by the Second mean value theorem for integration , we have $\int_{-1}^1g(x)h(x)dx=g(-1)\int_{-1}^yh(x)dx+g(1)\int_y^1h(x)dx \ \ (*)$ for some $y\in (-1,1)$
But we also have $g(x)=h(x)+2x$, so rewrite $(*)$ as 
\begin{align}
&g(-1)\int_{-1}^yh(x)dx+g(1)\int_y^1h(x)dx\\
&=g(-1)\int_{-1}^y(h(x)+2x)dx+g(1)\int_y^1(h(x)+2x)dx-g(-1)\int_{-1}^y2xdx-g(1)\int_y^12xdx\\
&=g(-1)\int_{-1}^yg(x)dx+g(1)\int_y^1g(x)dx+(1-y^2)(g(-1)-g(1))\\
&=g(-1)(\int_{-1}^yg(x)dx+1-y^2)+g(1)(\int_y^1g(x)dx-1+y^2)
\end{align}
provided that $\int_{-1}^yg(x)dx+\int_y^1g(x)dx=\int_{-1}^1(f(x)+x)dx=0$, which means if we wirte $A=\int_{-1}^yg(x)dx+1-y^2$ then $\int_y^1g(x)dx-1+y^2=-A$, next we claim that $A$ is non-negative
By the first mean value theorem for integration, $A=g(\zeta)(y+1)+1-y^2$ for some $\zeta\in [-1,y]$, if $A$ is negative, then $A<0\Leftrightarrow g(\zeta)<y-1$
Do the same for $-A=g(\eta)(1-y)-1+y^2>0\Leftrightarrow g(\eta)>y+1$ for some $\eta\in [y,1]$, so we get $g(\eta)-g(\zeta)>2$, but by 1 we have $g(-1)+1\geq g(1)-1\Leftrightarrow g(1)-g(-1)\leq 2$
Observing that $g$ is non-decreasing, the difference between $g(1)$ and $g(-1)$ cannot be smaller than the difference between $g(\eta)$ and $g(\zeta)$, so we get a contradiction, which implies our claim is right
so $A(g(-1)-g(1))\leq0$ which is exactly what we want to prove
