Prove for $\epsilon >0$ exists a finite interval $[a,b]$ such that $|\int{f(x)}dx-\int_{a}^b f(x)dx|<\epsilon$

lebesgue-integralmeasure-theoryreal-analysis

Let $f:\mathbb{R}\rightarrow\bar{\mathbb{R}}$ Lebesgue integrable. Prove that for $\epsilon >0$ there exists a finite interval $[a,b]$ such that

$$\left|\int{f(x)}dx-\int_{a}^b f(x)dx\right|<\epsilon.$$

My attempt: If $f$ is integrable on $[a,b]$, then for any $\epsilon > 0$ there exists $\delta > 0$ such that for any measurable set $D \subset [a,b]$ with measure $\mu(D) < \delta$ we have

$$\left|\int_{a}^b f(x)dx\right|<\epsilon/2.$$

This is where I'm stuck. Can someone help me?

Best Answer

You can easily show via dominated convergence that $$ \lim_{n\to\infty} \int_{-n}^n f(x)dx=\int f(x)dx. $$ By definition, for a fixed $\epsilon>0$, this means that for all $N$ large enough, $$ \bigg\vert \int f(x)dx-\int_{-N}^N f(x)dx\bigg\vert<\epsilon. $$