Evaluate the following integral $\lim\limits_{x\to 0}\frac{1}{x}\int_{0}^{x}\sin^{2}\left(\frac{1}{u}\right)du$ I want to evaluate this limit:
$$\lim\limits_{x\to 0}\frac{1}{x}\int_{0}^{x}\sin^{2}\left(\frac{1}{u}\right)du$$
Here's my trial!
$$\lim\limits_{x\to 0}\frac{1}{x}\int_{0}^{x}\sin^{2}\left(\frac{1}{u}\right)du$$
$$=\lim\limits_{x\to 0}\frac{1}{2x}\int_{0}^{x}\left[1-\cos\left(\frac{2}{u}\right)\right]du$$
but I don't know how to proceed from here! Please, can someone help me out?
 A: For the hard part, change variables with $t = 2/u, \, du = (-2/t^2)  dt$ and integrate by parts to get
$$\frac{1}{2x}\int_0^x \cos(2/u) \, du = \frac{1}{x}\int_{2/x}^\infty \frac{\cos t}{t^2} \, dt \\ = -\frac{x\sin(2/x)}{4} + \frac{2}{x}\int_{2/x}^\infty\frac{\sin t}{t^3} \, dt \\ $$
Now you can take the limit as $x \to 0$ using
$$\left|\frac{1}{x}\int_{2/x}^\infty\frac{\sin t}{t^3} \, dt\right| \leqslant \frac{1}{x}\int_{2/x}^\infty\frac{1}{t^3} = \frac{x}{8}$$
showing that
$$\lim_{x \to 0} \frac{1}{2x}\int_0^x \cos(2/u) \, du = 0$$
A: You are on right track. And the challenge is to evaluate $$\lim_{x\to 0}\frac{1}{x}\int_{0}^{x}\cos(2/t)\,dt\tag{1}$$ Let $f(x) =\cos(2/x),x\neq 0,f(0)=0$ and then the limit above can be written as $F'(0)$ where $F(x) =\int_{0}^{x}f(t)\,dt$. Next consider the derivative evaluation $$\frac{d} {dx} (x^2\sin(2/x))=2x\sin(2/x)-2\cos(2/x)\tag{2}$$ so that if $G(x) =x^2\sin(2/x),x\neq 0, G(0)=0$ and $g(x) =2x\sin(2/x),x\neq 0,g(0)=0$ then equation $(2)$ can be written as $$G'(x) =g(x) - 2f(x),\forall x\in\mathbb {R} \tag{3}$$ (verify that the above holds for $x=0$ also). Since $f, g$ are Riemann integrable it follows that $G'$ is also Riemann integrable and $$G(x)=G(x) - G(0)=\int_{0}^{x}G'(t)\,dt\\=\int_{0}^{x}g(t)\,dt-2\int_{0}^{x}f(t)\,dt=\int_{0}^{x}g(t)\,dt-2F(x)\tag{4}$$ It follows by differentiating the above equation that $$G'(x) =g(x) - 2F'(x)$$ (note that $g$ is continuous everywhere) and hence $F'(0)=(g(0)-G'(0))/2=0$.
