Derivative at $0$ of $\int_0^x \sin \frac{1}{t} dt$ Let
$f(x)=\int_0^x \sin \frac{1}{t} dt   \textrm{ for }  x \in \mathbb R$.
Is $f$ differentiable at $0$ ?
 A: Let us consider the difference quotient
$$Q(x) := \frac{f(x) - f(0)}{x} = \frac1x \int_0^x \sin \frac1t\,dt$$
for small positive $x$ and apply a few substitutions:
$$\begin{align}
u = \frac1t &\leadsto Q(x) = \frac1x\int_{1/x}^\infty \frac{\sin u}{u^2}\,du\\
A = \frac1x &\leadsto Q(1/A)= A \int_A^\infty \frac{\sin u}{u^2}\,du\\
u = Ay &\leadsto Q(1/A) = A\int_1^\infty \frac{\sin (Ay)}{(Ay)^2}\, d(Ay) = \int_1^\infty \frac{\sin (Ay)}{y^2}\,dy.
\end{align}$$
Now, the Riemann-Lebesgue lemma says(1)
$$\lim_{A\to\infty} Q(1/A) = 0,$$
in other words, $f$ is differentiable at $0$, with $f'(0)= 0$.

(1) Riemann-Lebesgue is a bigger gun than is needed here, but it's an important thing to know, so its mention has a reason.
Here, we can do with partial integration:
$$\begin{align}
\int_1^\infty \frac{\sin (Ay)}{y^2}\,dy &= \left[-\frac{\cos (Ay)}{Ay^2}\right]_1^\infty - \frac{2}{A}\int_1^\infty \frac{\cos (Ay)}{y^3}\, dy\\
&= \frac{1}{A} - \frac{2}{A} \int_1^\infty \frac{\cos (Ay)}{y^3}\, dy
\end{align}$$
and we can estimate
$$\left\lvert \int_1^\infty \frac{2\cos (Ay)}{y^3}\,dy\right\rvert \leqslant \int_1^\infty \frac{2}{y^3}\,dy = 1$$
to obtain
$$\lvert Q(1/A)\rvert \leqslant \frac{2}{A}.$$
