# Is the function differentiable at $0$?

Let f(x) = \begin{cases}\begin{align*}&\cos{\dfrac{1}{x}}, &x \neq0 \\ &0, &x=0. \end{align*}\end{cases}

Is the function $F(x) = \displaystyle \int_{0}^x f dx$ differentiable at $0$?

We can see that the function $f(x)$ is continuous everywhere except $x=0$. In order to show differentiability we will need to show the derivatives from the left and right are equal. So we need to show that $$\lim_{h \to 0^+} \dfrac{F(x+h)-F(x)}{h} = \lim_{h \to 0^-} \dfrac{F(x+h)-F(x)}{h}.$$ The derivative from the right is $$\lim_{h \to 0^+} \dfrac{F(x+h)-F(x)}{h} = \lim_{h \to 0^+} \dfrac{\displaystyle \int_{0}^x\cos{\dfrac{1}{x+h}}-\int_{0}^x\cos{\dfrac{1}{x}}}{h}$$ and the derivative from the left is $$\lim_{h \to 0^-} \dfrac{F(x+h)-F(x)}{h} = \lim_{h \to 0^-} \dfrac{\displaystyle \int_{0}^x\cos{\dfrac{1}{x+h}}-\int_{0}^x\cos{\dfrac{1}{x}}}{h}.$$ I am not sure how to proceed.

• I think I am misreading something, but are your difference quotients for $f(x)$ or $F(x)$ (which is the antiderivative of $f(x)$)? – Chill2Macht May 14 '16 at 2:11
• @William Thanks, I fixed that. – user19405892 May 14 '16 at 2:15
• This is great. Where'd you get this? – Tim kinsella May 14 '16 at 3:23
• @Timkinsella It is from Michael Spivak's calculus book. – user19405892 May 14 '16 at 3:25
• What page is the problem on? – Tim kinsella May 14 '16 at 4:37

For $x\geq 0$, let $[x]$ denote the largest element of $\mathbb{Z}\pi+\pi/2$ not greater than $x$.

$$\left|\int_0^x \cos(1/t)dt\right|=\left|\int_{1/x}^\infty \frac{ \cos(t)}{t^2}dt\right|\leq \left|\sum_{n=0}^\infty\int_{[1/x]+n\pi}^{[1/x]+(n+1)\pi}\frac{ \cos(t)}{t^2}dt\right|\leq \left|\int_{[1/x]}^{[1/x]+\pi}\frac{ \cos(t)}{t^2}dt\right|\leq$$

$$\left| [1/x]^{-2}\int_{[1/x]}^{[1/x]+\pi}\cos(t)dt\right|= 2[1/x]^{-2}\leq 2(1/x-\pi)^{-2}\leq cx^{2}$$

for some $c>0$ and all small enough $x$.

So $|F(x)|$ goes to zero like $x^2$ as $x\rightarrow 0^+$. So it has a right derivative which is zero. By symmetry the left derivative is also zero.

• You managed to estimate the integral without using some sort of anti-derivative (like I did in my answer) +1 – Paramanand Singh May 14 '16 at 5:53
• Also very nice +1 – RRL May 14 '16 at 7:02
• $Cx^{-2}$ should be $Cx^2$, right? – Hans Lundmark May 14 '16 at 7:33
• yes, thanks. fixed – Tim kinsella May 14 '16 at 7:52

The problem is slightly tricky because we don't know the anti-derivative of $\cos (1/x)$ but we do know that function $g(x) = x^{2}\sin(1/x), g(0) = 0$ is continuous and differentiable for all $x$ and $$g'(x) = 2x\sin (1/x) - \cos(1/x),g'(0) = 0$$ and hence $$g(h) = \int_{0}^{h}(2t\sin (1/t) - \cos (1/t))\,dt$$ or $$\int_{0}^{h}\cos(1/t)\,dt = 2\int_{0}^{h}t\sin(1/t)\,dt - g(h)$$ and hence \begin{align} F'(0) &= \lim_{h \to 0}\frac{1}{h}\int_{0}^{h}\cos(1/t)\,dt\notag\\ &= \lim_{h \to 0}\frac{2}{h}\int_{0}^{h}t\sin(1/t)\,dt - \frac{g(h)}{h}\notag\\ &= 2\lim_{h \to 0}\frac{1}{h}\int_{0}^{h}t\sin(1/t)\,dt\notag\\ \end{align} Now $t\sin(1/t)$ has a removable discontinuity at $t = 0$ and its limit is $0$ as $t \to 0$ hence by Fundamental Theorem of Calculus the limit $$\lim_{h \to 0}\frac{1}{h}\int_{0}^{h}t\sin(1/t)\,dt$$ above is $0$ and therefore $F'(0) = 0$.

• Very nice. (+1) – Tim kinsella May 14 '16 at 5:53
• Very nice answer +1 – RRL May 14 '16 at 7:02

What you have is the derivative of f, not the derivative of F which is what you want. The derivative of F at x= 0, from the right, is $\lim_{h\to 0^+}\frac{F(h)- F(0)}{h}= \lim_{h\to 0^+}\frac{\int_0^h f(t)dt}{h}$.

• shouldn't this be a comment? – Tim kinsella May 14 '16 at 2:21
• What about from the left? – user19405892 May 14 '16 at 2:29