TITLE: To prove $f(x)= x^3$ for all $x\in \mathbb{R}$
QUESTION [5 upvotes]: 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.

REPLY [5 votes]: 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$.

REPLY [3 votes]: It's trivial to show that $$\int_0^1x^3dx=\frac14$$Now, since $f(x)\geq x^3$ on the domain, we can define $$\int_0^1 f(x)dx = \frac14+\int_0^1 f(x)-x^3 dx$$Now, suppose that $\exists x\in[0,1]$ such that $f(x)>x^3$. Then, by continuity, $\exists\epsilon>0$ such that $\forall y\in(x-\epsilon,x+\epsilon)$, $f(y)>y^3$. Let $d$ be the average difference between $f(y)$ and $y^3$ over this neighborhood. Hence, $$\int_0^1f(x)-x^3dx = \int_0^{x-\epsilon}f(x)-x^3dx + 2\epsilon\cdot d + \int_{x+\epsilon}^1f(x)-x^3dx\geq2\epsilon\cdot d>0$$This is a contradiction. Hence, $f(x)=x^3$