Prove that this property holds for any $f\in L^\infty([0,1])$. I recently came across this problem, namely we are given a continuous function $f:\mathbb R\to\mathbb R$ such that 
$$\int_0^1f(u(x))\mathrm dx=0,\;\forall u\in C^0([0,1]):\int_0^1u(x)\mathrm d x=0.$$
I am asked to prove that the same property holds for any $u\in L^\infty([0,1])$ such that  $$\int_0^1 u(x)\mathrm dx=0.$$
My attempt is to exploit Lusin Theorem because my first thought is that an essentially bounded measurable function is nearly a continuous one and then use the property given for continuous function. However I' still having problems in figuring out the reasoning. Is my path correct or not? and how should I approach the problem? Thank you.
Edit This is a further thought that came to my mind. Is such an $f$ necessarily a linear map? Because of course linear maps do the jobs, but what about the converse? The thought came by noticing that if $u$ is a continuous function satisfying the hypothesis given, then so does $\lambda u$, and if $v$ is another such function, then $u+v$ is fine as well.
I didn't want to ask another question because it descends from the original problem i proposed. Hope it is ok to ask here. Bye.
 A: Indeed, any such function $f$ must be linear.
  Here's a sketch.
Fix some $a \ge 0$ and consider the function $$v(x) = \begin{cases} a, & 0 \le x \le \frac{1}{1+a} \\ -1, &\frac{1}{1+a} < x \le 1.\end{cases}$$
Then we have $$\int_0^1 f(v(x))\,dx = \frac{1}{1+a} f(a) + \frac{a}{1+a} f(-1).$$
Fix $\epsilon > 0$, and modify $v$ on some small neighborbood of $\frac{1}{1+a}$ to obtain a function $u$ which is continuous, satisfies $\int_0^1 u(x)\,dx = 0$, satisfies $-1 \le u \le a$, and is equal to $v$ except on a set of measure at most $\epsilon$.  (An appropriate piecewise linear function would work.)  Let $M = \sup_{[-1, a]} |f|$; then $f(v(x))$ and $f(u(x))$ are two functions bounded by $M$  which differ on a set of measure at most $\epsilon$, so
$$\left| \int_0^1 f(v(x))\,dx - \int_0^1 f(u(x))\,dx\right| \le \int_0^1 |f(u(x)) - f(v(x))|\,dx \le 2 M \epsilon.$$
But $\int_0^1 f(u(x))\,dx = 0$ by assumption, and so we have $\left| \int_0^1 f(v(x))\,dx\right| \le  2 M \epsilon.$  $\epsilon$ was arbitrary, so in fact $\int_0^1 f(v(x))\,dx = 0$.
Combining this with our previous computation shows $f(a) = -a f(-1)$; in particular, with $a=1$ we have $f(1) = -f(-1)$.  Repeating the argument using $-v$ instead of $v$ shows that $f(-a) = -a f(1) = a f(-1)$.  So we have that $f(x) = (-f(-1))x$ for all $x \in \mathbb{R}$, i.e. $f$ is linear.
