I have the following functions: \begin{equation} S_n(x) = \frac{1}{n}\sum_{k=0}^{n-1}f\left(x+\frac{k}{n}\right), \end{equation} \begin{equation} S(x) = \int_x^{x+1}f(y)dy. \end{equation} I would like to show that $S_n\to S$ in $L^1$, provided that $f\in L^1$. I mean, this intuitively makes sense: $S_n$ is the the "Riemann sum" for the integral (I know, very imprecise) $\int_x^{x+1}f(y)dy$ as $n\to\infty$.
I have two obstacles: First showing that $S_n\to S$ point-wise (is it necessary? It is for the proof I have in my mind) as $n\to\infty$, and then showing that I can interchange the limit in the integral \begin{equation} \lim_{n\to\infty}\int_{-\infty}^{\infty}\int_{x}^{x+1}\left|f(y)-\frac{1}{n}\sum_{k=0}^{n-1}f\left(x+\frac{k}{n}\right)\right|dydx. \end{equation}
Any help would be very helpful!
Hints: 1. Show that the maps $f\to S_n(f,x), f\to S(f,x)$ are bounded linear operators from $L^1$ to $L^1,$ all of whose norms are $\le 1.$ 2. Show the desired result holds for a dense subspace of $L^1.$ 3. Conclude that the desired result holds for $L^1.$
I will expand on my hint above. This will be part sketch and part solution.
First, show the result holds if $f$ is continuous with compact support. You're basically back in Riemann integral territory here. Uniform continuity is the key.
Second, the result I mentioned in a comment: Let $f\in L^1$ and $\epsilon>0.$ Then there exists a continuous $g$ with compact support such that $\|f-g\|_1<\epsilon.$
On to linearity: If $f,g\in L^1$ and $a,b\in \mathbb R,$ then
$$S_n(af+bg) = aS_n(f)+bS_n(g),\,\, S(af+bg) = aS(f)+bS(g).$$
This is easy to verify.
$L^1$ boundedness: Let $f\in L^1.$ Then
$$\int_{\mathbb R}|S_n(f)(x)|\,dx = \int_{\mathbb R}\left | \frac{1}{n}\sum_{k=0}^{n-1}f\left(x+\frac{k}{n}\right)\right|\,dx \le \int_{\mathbb R}\frac{1}{n}\sum_{k=0}^{n-1}\left |f\left(x+\frac{k}{n}\right)\right|\,dx $$ $$=\frac{1}{n}\sum_{k=0}^{n-1}\int_{\mathbb R}\left |f\left(x+\frac{k}{n}\right)\right|\, dx = \frac{1}{n}\sum_{k=0}^{n-1}\int_{\mathbb R}\left |f\left(x\right)\right|\, dx = \int_{\mathbb R}\left |f\left(x\right)\right|\, dx.$$
The translation invariance of Lebesgue measure was used in the second-to-last equality.
As for $S(f),$ note
$$\int_{\mathbb R} |S(f)(x)|\,dx = \int_{\mathbb R} |\int_x^{x+1}f(t)\,dt|\,dx \le \int_{\mathbb R} \int_x^{x+1}|f(t)|\,dt\,dx=\int_{\mathbb R} |f(t)|\,dt.$$
Fubini was used in the last equality. I'll leave it to you, for now, to verify that we have the proper papers to use it. (Ask if you have questions.)
Finally we can prove the desired result. Let $f\in L^1.$ Let $\epsilon>0.$ Choose $g$ continuous with compact support such that $\|f-g\|_1<\epsilon.$ Then from the work above, we have
$$\|S_n(f)-S(f)\|_1 \le \|S_n(f)-S_n(g)\|_1 + \|S_n(g)-S(g)\|_1 + \|S(g)-S(f)\|_1$$ $$ \le \|f-g\|_1 + \|S_n(g)-S(g)\|_1 + \|g-f\|_1< 2\epsilon + \|S_n(g)-S(g)\|_1.$$
It follows that
$$\limsup_{n\to \infty} \|S_n(f)-S(f)\|_1 \le 2\epsilon + \lim_{n\to \infty}\|S_n(g)-S(g)\|_1 = 2\epsilon.$$
Because $\epsilon$ was arbitrary, the $\limsup$ on the left is $0,$ and we are done.