Intermediate value property for measure 
Let $f$ be measurable in $\mathbb{R}$ and $\int_\mathbb{R} f dx =1$ Show that for any $r\in(0,1)$, there is a Lebesgue measurable set $E$ such that $\int_Ef dx =r$.

I have tried the interval $(-R,R)$. If I can show that $R \mapsto \int_{-R}^R f dx$ is continuous and I can use the intermediate value theorem to show that there is a $R$ such that $\int_{-R}^R f dx=r$. If I consider $|\int f(\chi_{(-R_1,R_1)}-\chi_{(-R_2,R_2)}) dx|$, I do not know to show the continuous since I think that $\int_{-R}^R fdx$ may not be finite for some $R$ or $\int |f|dx$ may not be finite. Thank you so much!
 A: So $f\in L^{1}({\bf{R}})$, so the absolute continuity of integral implies that given that $\epsilon>0$, there is some $\delta>0$ such that $\displaystyle\int_{F}|f(x)|dx<\epsilon$ for any measurable set $F$ with $|F|<\delta$.
Now Lebesgue Dominated Convergence Theorem implies that $\displaystyle\int_{[-R,R]}f(x)dx\rightarrow 1$ since $\chi_{[-R,R]}|f|\leq|f|$.
And we have $\displaystyle\int_{[-R,R]}f(x)dx\rightarrow 0$ as $R\downarrow 0$, so such an $\alpha$ is guaranteed by Intermediate Value Theorem.
A: Define a function $f_R$ for any $R>0$ so that
$$
f_R(x)
=
\begin{cases}
f(x), & |x|<R\\
0, & |x|\geq R.
\end{cases}
$$
Now $I(R):=\int_{-R}^{R}f=\int_{-\infty}^\infty f_R$, so you can keep the limits of integration fixed.
To prove continuity, you need to show that $\lim_{i\to\infty}I(R_i)=I(R)$ if $\lim_{i\to\infty}R_i=R$.
You can interchange the limit and the integral due to the dominated convergence theorem.
The function $f_R$ is dominated by $|f|$, which is integrable.
The fact that the integral $\int_{-\infty}^\infty f$ exists as a Lebesgue integral means (among other things) that the absolute value has a finite integral.
