Prove that the range of $f$ is contained in $[−1,1]$. 
Let $f : [−1,1] \to \Bbb  R$ be a continuous function.
Let $\lambda $ be the Lebesgue measure on $[−1,1]$. Suppose $|\int_A fd\lambda | \le \lambda(A) $ for all measurable sets $A \subset [−1,1]$.
Prove that the range of $f$ is contained in $[−1,1]$.

Consider $f(x);x\in [-1,1]$ To show that $f(x)\in [-1,1]$.
Since $x\in [-1,1]\implies x\in [x-h,x+h]$ for $x>-1$ and $x\in [x,x+h]$ for $x=-1$.
Now $\int _A f =\int _{[x-h,x+h]} f\le h$
But how to show that $f(x)\in [-1,1]$ from here.
 A: Suppose $f>1$ on $B\subset [−1,1]$. Let $f(x_0)>1, \:x_0\in(-1,1)$. Since $f$ is continuous, there is a $\delta>0$ such that $f(x)>1$ on $(x-\delta, x+\delta)$. Since $(x-\delta, x+\delta)\subset B$, $\lambda(B)>2\delta>0$.
Then $\int_B fd\lambda \geqslant\lambda(B)>0$. So
$$
\left|\int_B fd\lambda \right|=\int_B fd\lambda >\lambda(B)
$$
Which is contradiction.
Likewise we can find contradiction for $f<-1$ on $C\subset [−1,1]$. 
A: We have $|{1 \over h}\int_x^{x+h} f(t) dt | \le 1$ for all suitable $x,h$. Since
$\lim_{h \to 0} {1 \over h}\int_x^{x+h} f(t) dt = f(x)$, we have the desired
result.
As an aside, the Lebesgue differentiation theorem shows that if $f$ is merely
integrable, then $f(x) \in [-1,1]$ for ae. $x \in [-1,1]$.
A: Since $f$ is continuous, if there exists $x\in[-1,1]$ with $|f(x)|>1$, there is an open set $U\subset[-1,1]$ containing $x$ with $\inf_{y\in U}|f(y)|>1$. But then $$\left|\int_U f\,\mathsf d\lambda  \right| > \int_U\mathsf d\lambda =\lambda(U), $$ a contradiction.
