Prove that $\lim_{h \to 0}\frac{1}{h}\int_0^h{\cos{\frac{1}{t}}dt} = 0$

Partial integration \begin{align} \int \cos \bigg(\frac{1}{t} \bigg) dt &= \int t^2 \frac{1}{t^2}\cos \bigg(\frac{1}{t} \bigg)dt \\ &= -t^2 \sin \bigg(\frac{1}{t} \bigg) + \int 2 t \sin \bigg(\frac{1}{t} \bigg) dt \\ \end{align}


Consider $h>0$ then there is $n$ so that $ \frac{1}{(n+1)\pi +\pi/2} < h\le \frac{1}{n\pi + \pi/2}$. In this interval (called $I_n$), $\cos(1/t)$ is positive (resp. negative) if $n$ is odd (resp. even). Also

$$\int_0^h \cos\left(\frac 1t\right) dt = \sum_{k=n+1}^\infty \int_{I_k} \cos\left(\frac 1t\right) dt + \int_{\frac{1}{(n+1)\pi + \pi/2}}^h \cos\left(\frac 1t\right) dt$$

Note that the last term is bounded by $\frac{2}{\pi n^2}$. On the other hand, if we let $$a_k = \int_{I_k} \cos\left(\frac 1t\right) dt,$$ and $a_k$ is an alternating sequence and $a_k \to 0$. If $l> k$, then $|a_k| > |a_l|$ (see below). Thus we have

$$\left|\sum_{k=n+1}^\infty a_k\right| \le |a_{n+1}| \Rightarrow \left| \sum_{k=n+1}^\infty \int_{I_k} \cos\left(\frac 1t\right) dt\right| \le \int_{I_{n+1} }\left| \cos\left(\frac 1t\right) \right| dt \le \frac{2}{\pi n^2}. $$

As $h \in I_n$, $h > \frac{1}{(n+1)\pi + \pi/2}> \frac{1}{2\pi n} \Rightarrow \frac{1}{h} < 2\pi n$. Thus

$$\left|\frac 1h\int_0^h \cos \left(\frac 1t \right) dt \right| \le (2\pi n) \frac{4}{\pi n^2} = \frac{8}{n}. $$

As $h\to 0$, $n\to \infty$ and so the limit goes to zero.

Remark: If we do the substitution $u = 1/t$, then $$a_k = \int_{I_k} \cos\left(\frac 1t\right) dt = \int_{k\pi +\pi/2}^{(k+1)\pi + \pi/2} \frac{\cos u}{u^2} \mathrm du \Rightarrow |a_k| = \int_{k\pi +\pi/2}^{(k+1)\pi + \pi/2} \frac{|\cos u|}{u^2} \mathrm du.$$

Now $|\cos u|$ is $\pi$-periodic, $|a_k|$ is strictly decreasing.


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)$.