TITLE: Prove that $\lim_{h \to 0}\frac{1}{h}\int_0^h{\cos{\frac{1}{t}}dt} = 0$
QUESTION [12 upvotes]: I'm trying to prove that $$\lim_{h \to 0}\frac{1}{h}\int_0^h{f(t)dt} = 0$$ where $$f(t) = \begin{cases}\cos{\frac{1}{t}} &\text{ if } t \neq 0\\ 0&\text{otherwise}\end{cases}.$$ Can someone give me a hint where to start? Darboux sums somehow seem to lead me nowhere.
NOTE: I cannot assume that $f$ has an antiderivative $F$.

REPLY [5 votes]: Let $g=\frac1h$ and $s=\frac1t$. Then integration by parts gives
$$
\begin{align}
\lim_{h\to0}\frac1h\int_0^h{\cos\!\left(\frac1t\right)\mathrm{d}t}
&=\lim_{g\to\infty}g\int_g^\infty{\frac{\cos(s)}{s^2}\,\mathrm{d}s}\\
&=\lim_{g\to\infty}g\left[-\frac{\sin(g)}{g^2}+2\int_g^\infty\frac{\sin(s)}{s^3}\,\mathrm{d}s\right]\\
&=\lim_{g\to\infty}O\left(\frac1g\right)\\[6pt]
&=0
\end{align}
$$
Since $\sin(s)=O(1)$.