To prove $f(x)= x^3$ for all $x\in \mathbb{R}$ 
Let $f:[0,1] \to \mathbb{R}$ be a continuous function such that $f(x) \geq x^3$ for $x \in [0,1]$. Also $$\int_{0}^{1} f(x) \mathrm dx= \frac14$$ Prove that $f(x)= x^3$ for all $x\in [0,1]$

I am completely lost in here. Any hint will be appreciated.

Consider $g(x) = f(x) - x^3$. The condition translates into $\displaystyle \int_{0}^{1} g(x)dx = 0$, with $g(x) \ge 0$ and $g$ is continuous. The new problem is old and has been posted couple times here. Assume $g(x_0) > 0$ for some $x_0$, then you can find a small interval $(c,d) \subset (0,1)$ such that $g(x) > 0, \forall x \in (c,d)$ and contradiction arrives since $\displaystyle \int_{0}^1 g(x)dx > \displaystyle \int_{c}^d g(x)dx > 0$.
