Prove that $\lim_{x \rightarrow 0} \frac{1}{x}\int_0^x f(t) dt = f(0)$. Assume $f: \mathbb{R} \rightarrow \mathbb{R}$ is continuous.  Prove that $\lim_{x \rightarrow 0} \frac{1}{x}\int_0^x f(t) dt = f(0)$.
I'm having a little confusion about proving this.  So far, it is clear that $f$ is continuous at 0 and $f$ is Riemann integrable.  So with that knowledge, I am trying to use the definition of continuity.  So $|\frac{1}{x}\int_0^x f(t) dt - f(0)|=|\frac{1}{x}(f(x)-f(0))-f(0)|$.  From here, I'm not sure where to go.  Any help is appreciated.  Thanks in advance.

$\def\e{\varepsilon}\def\abs#1{\left|#1\right|}$As $f$ is continuous at $0$, for $\e > 0$ there is an $\delta > 0$ such that $\abs{f(x) - f(0)} \le \e$ for $\abs x \le \delta$. For these $x$ we have 
\begin{align*}
  \abs{\frac 1x \int_0^x f(t)\, dt - f(0)} &= \abs{\frac 1x \int_0^x \bigl(f(t) - f(0)\bigr)\,dt}\\
   &\le \frac 1x \int_0^x \abs{f(t) - f(0)}\, dt\\ 
   &\le \frac 1x \int_0^x \e\,dt\\
   &= \e
\end{align*}
So $\abs{f(0) - \frac 1x \int_0^x f(t)\,dt} \le \e$ for $\abs x \le \delta$, as wished.
