TITLE: The antiderivative of $\sin(1/x)$
QUESTION [7 upvotes]: How to prove that the function $f(x)=\sin\frac{1}{x}$ for $x\neq 0,f(0)=0$ has an antiderivative? This means $F(x)=\int^{x}_{0}\sin(1/t)dt$ has derivative $0$ at $x=0$, but I have no idea how to prove it.

REPLY [7 votes]: I just blogged another solution to this question in my blog. The idea is to consider the following function
$$G(x)=\begin{cases}x^2\cos \frac 1x, & \text{ if } x \ne 0,\\ 0, & \text{ if }x=0.\end{cases}$$
which is differentiable. Clearly,
$$G'(x)=\begin{cases} \sin \frac 1x + 2x \cos \frac 1x, & \text{ if } x \ne 0,\\ 0, & \text{ if }x=0.\end{cases}$$
Hence, $G' = f + h$ where
$$h(x)=\begin{cases} 2x \cos \frac 1x, & \text{ if } x \ne 0,\\ 0, & \text{ if }x=0.\end{cases}$$
Since $h$ is continuous, it has antiderivative $H$, thus giving us $f = (G-H)'$. In other words, $G-H$ is an antiderivative of $f$.