Show that $\lim\limits_{n\to \infty}\sum\limits_{k=-n^2}^{n^2}\left|\int_{k/n}^{(k+1)/n}f(x)\,dx\right| = \int_{-\infty}^\infty |f(x)|\, dx$ Let $f\in L^1(\mathbb{R})$. Show that
$$\lim_{n\to \infty}\sum_{k=-n^2}^{n^2}\left|\int_{k/n}^{(k+1)/n}f(x)dx\right| = \int_{-\infty}^\infty |f(x)|\ dx.$$
Attempt at Solution: I figure approximating $f$ in the $L^1$ norm by a continuous function with compact support will be helpful, so let's take $f\in C_0(\mathbb{R})$. If $f$ doesn't change sign over an interval $I$, then $|\int_I f\ dx| = \int_I|f|\ dx$. If $f$ is continuous on a compact set, I want to say that $f$ changes sign only finitely often there. Basically, we only pick up errors on the LHS when we integrate over a region where $f$ changes sign. Our regions get smaller as $n\to \infty$ and the continuity of $f$ will ensure that our errors get smaller in the limit. I'm just not sure how to make this rigorous.
 A: One sided is clear:
\begin{align*}
\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}f(x)dx\right|&\leq\sum_{k=-n^{2}}^{n^{2}}\int_{k/n}^{(k+1)/n}|f(x)|dx\\
&=\int_{-n}^{n+1/n}|f(x)|dx,
\end{align*}
so
\begin{align*}
\limsup_{n\rightarrow\infty}\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}f(x)dx\right|\leq\int_{-\infty}^{\infty}|f(x)|dx.
\end{align*}
Now turn the other one. Given $\epsilon>0$, find a $\varphi\in C_{0}^{\infty}({\bf{R}})$ such that $\|f-\varphi\|_{L^{1}({\bf{R}})}<\epsilon$. Let $M\in{\bf{N}}$ be such that $\text{supp}(\varphi)\subseteq\{|x|\leq M\}$, then
\begin{align*}
\int_{-\infty}^{\infty}|f(x)|dx-\epsilon&<\int_{-\infty}^{\infty}|\varphi(x)|dx=\int_{-M}^{M}|\varphi(x)|dx,
\end{align*}
and for all $n\geq M$, then
\begin{align*}
\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}\varphi(x)dx\right|&=\sum_{k=-M}^{M}\sum_{j=0}^{n-1}\left|\int_{k+j/n}^{k+(j+1)/n}\varphi(x)dx\right|.
\end{align*}
But
\begin{align*}
\sum_{j=0}^{n-1}\left|\int_{k+j/n}^{k+(j+1)/n}\varphi(x)dx\right|&=\sum_{j=0}^{n-1}\left|\int_{k+j/n}^{k+(j+1)/n}\eta'(x)dx\right|,~~~~\varphi:=\eta'\\
&=\sum_{j=0}^{n-1}|\eta(k+(j+1)/n)-\eta(k+j/n)|\\
&\rightarrow\int_{k}^{k+1}|\eta'(x)|dx,~~~~\text{rough reasoning by bounded variation}\\
&=\int_{k}^{k+1}|\varphi(x)|dx.
\end{align*}
Keeping in mind that $k$ varies only for finitely many, so for large $n$,
\begin{align*}
\int_{-M}^{M}|\varphi(x)|dx-\epsilon&<\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}\varphi(x)dx\right|\\
&\leq\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}(\varphi(x)-f(x))dx\right|+\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}f(x)dx\right|\\
&\leq\|f-\varphi\|_{L^{1}({\bf{R}})}+\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}f(x)dx\right|,
\end{align*} 
so
\begin{align*}
\int_{-\infty}^{\infty}|f(x)|dx-3\epsilon<\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}f(x)dx\right|,
\end{align*}
this shows that 
\begin{align*}
\int_{-\infty}^{\infty}|f(x)|dx\leq\liminf_{n\rightarrow\infty}\sum_{k=-n^{2}}^{n^{2}}\left|\int_{k/n}^{(k+1)/n}f(x)dx\right|.
\end{align*}
A: It is true for continuous fuctions in $ L^1$. To see why it holds for $ L^1$, you can always approximate an $ L^1$ $ f $ with a continuous function $ g $ such that $ |f-g|_{L^1} \le \epsilon $, $\epsilon > 0$
A: I would make this a comment if I had enough rep.  I'll be happy to delete it if you want. For continuous compactly supported $f$, use uniform continuity to ensure that for $n\geq N_\epsilon$, the errors (i.e. sign changes of $f$) occur only in intervals where $|f|$ is no greater than $\epsilon$. Then each error term is bounded by $\epsilon\cdot 1/n$ and you have $O(n)$ of them (since we're working in a bounded interval). So the error terms contribute only $\epsilon$ to the LHS and $\epsilon$ was arbitrary. 
