# Spivak Chapter 14 Problem 9

Let $f(x)=\cos \frac{1}{x}$ for $x \ne 0$, and $f(x)=0$ for $x=0$. Is the function $F(x)=\int_0^x f$ differentiable at 0?

My progress:

$$\lim_{h\to0^+} \frac{F(h)}{h} = \lim_{h\to0^+} \frac{\int_0^h f}{h}=\lim_{h\to0^+}\frac{\cos(\frac{1}{h})}{1}$$,

which does not exist.

We know that $$F'(0) = \lim_{h \to 0} \frac{F(h)}{h}$$. Therefore, the limit above should be equal to $0.$ However, the answer is that $F'(x)=0.$

What did I mess up?

Edits made: Your wanting to use the L’Hospital’s rule is fair, but your conclusion is not valid

You do find a zero numerator and denominator. So you are right to try progress by differentiating both. Edit: thanks to what is pointed out in the comments, the derivative is indeed $f(h)$. However, the limit does not exist. So you cannot conclude anything from L’H rule (see the section “requirement that the limit exist” here for an example). In brief, “L’H computations lead to a no-limit situation” does not imply the limit does not exist.

As to why the derivative is zero, an outline: try writing the limit as $$\lim_{h \to 0} \frac{\int_0^h f}{h}=\lim_{M\to \infty} M\int_M^{\infty}\frac{\cos y}{y^2}dy$$

Now split the integral into intervals of length $2\pi$. In each interval, bound the positive part above (for example in $[2N\pi,(2N+1)\pi]$, we have $\frac{1}{y^2}\leq \frac{1}{(2N\pi)^2}$ and the negative part from below to show that M times the sum of integrals on these intervals is smaller than a constant times $1/M$. (There is a series sum involved). Reverse the bounds on the positive and negative parts to see that it is bounded below by a constant times $-1/M$. As $M \to \infty$, the limit is zero.

There might be a more elegant way to show the effect of the cancellation, but that’s all I could work out for now.

• Actually the derivative of the numerator is correct. The FTC2 requires continuity on the whole interval, not FTC1. If you’re still uncomfortable with that, split the integral into two and take the derivative so the first part will cancel and for the second part you get cos(1/x) – user334639 Jan 12 '18 at 4:02
• @user334639 FTC1 does require continuity at zero, it is FTC2 that allows it to be continuous just almost everywhere. But your point is right. f(h) is indeed the derivative. The issue is only in drawing conclusions from L’H rule. Having hit a roadblock with it does not mean the limit does not exist. – Mathemagical Jan 12 '18 at 5:51
• I like this approach (and it's where I was headed as I tried to finish this up this morning), but it leaves me wondering: What was Spivak thinking? Because this comes way before the chapters on sequences/series in the book. – John Hughes Jan 12 '18 at 13:17
• BTW, working out the lower bound on the same interval, I find that on each "period", the integral is bounded by something proportional to $\frac{1}{M-1}^3$ ... but my algebra could contain errors. At first, I was worried that the positive and negative lobe might cancel in a way that left the order of the difference being $1/M$, and that'd be no use at all. – John Hughes Jan 12 '18 at 13:26
• @JohnHughes I got (taking M=2 π K), the integral’s upper bound to be $\frac{K}{2\pi}\sum_{n=K}^{\infty}\frac{2n+1}{n^2(n+1)^2}$. So over each period, the leading order term was indeed like $\frac{1}{n^3}$. This sums to be proportional to $\frac{1}{K}$, so it does the job. As to what Spivak was thinking, I haven’t used this book, but once worked through his “manifolds” book. Usually, the brevity was fine. but sometimes, it drove me up the wall. Things that “immediately follow” didn’t follow at all. – Mathemagical Jan 12 '18 at 14:04

This is a tricky problem and Spivak has given a hint which you have perhaps overlooked. Consider the function $g(x) =x^2\sin(1/x),g(0)=0$ then it can be proved that $$g'(x) =2x\sin(1/x)-\cos (1/x), g'(0)=0$$ so that $$g'(x) =h(x) - f(x)$$ where $f$ is the function in your question and $$h(x) =2x\sin (1/x),h(0)=0$$ We have now via Fundamental Theorem of Calculus $$g(x) =g(x) - g(0)=\int_{0} ^{x} g'(t) \, dt=\int_{0}^{x}h(t)\,dt-\int_{0}^{x}f(t)\,dt$$ or $$F(x) =\int_{0}^{x}h(t)\,dt-g(x)$$ and using Fundamental Theorem of Calculus again we get $$F'(0)=h(0)-g'(0)=0$$ because $h$ is continuous at $0$.

• Excellent! OP, you should accept this elegant answer instead of mine (and remember to share hints with the community). @Paramanand Singh, Want to check with you about why h(0)=0. Because you define it that way? – Mathemagical Jan 13 '18 at 2:55
• @Mathemagical: I have defined it that way to make $h$ continuous at $0$. This is crucial in last step when I apply FTC. Also the hint was very cryptic: "Stare at page 165". So you actually need to look in Spivak book page 165 where he discusses about derivative of $x^2\sin(1/x)$. – Paramanand Singh Jan 13 '18 at 3:39
• @Mathemagical : $h(0)=0$ is also necessary if you want equation $g'(x) =h(x) - f(x)$ to hold for $x=0$ but this is secondary and not important. More importantly we need continuity of $h$ at $0$. – Paramanand Singh Jan 13 '18 at 3:48
• @Mathemagical: you see what I mean about Spivak Calculus being a little more reasonable? With a hint like this, we might have come up with a nice answer. :) – John Hughes Jan 13 '18 at 4:04
• @JohnHughes yeah. Tried to get a peek on the book now, but it seems no PDF available online. Gotta buy. Parmanand, thanks. Yes, I figured it was for continuity, but glad for your confirmation. – Mathemagical Jan 13 '18 at 4:20

Where does your second equality come from? Why is the integral of $f(x)$ (you've lost a "dx") from $0$ to $h$ the same as $cos(1/h)$? The mean value theorem tells you it's the same as $\cos (1/c)$ for some $c$ between $0$ and $h$, but there's no guarantee that this $c$ is actually $h$.

When you look at $\cos (1/c)$, you realize that this could be any number between $-1$ and $1$, so that this is not a profitable way to approach the problem.

Also, "We know that $F'(x) = \lim \ldots$" is wrong; that should be "We know that $F'(0) = \ldots$". And the thing inside the limit should be $$\frac{F(h) - F(0)}{h}$$ although perhaps you simplified by evaluating $F(0)$.

• L'Hospital's rule? Since at $h=0$, both the top and bottom go to 0. (By the way, my book doesn't usually use dx) – minimario Jan 12 '18 at 3:16
• If your book is Spivak, it writes either $\int_a^b f$ or $\int_a^b f(x) ~ dx$, but never a halfway mix of the two. – John Hughes Jan 12 '18 at 3:18
• Alright, fixed that :). Is something wrong with L'H here? – minimario Jan 12 '18 at 3:19
• For L'Hopital to apply, you need to know that the limit of the top and bottom both exist and are zero. I don't think you know that without a bit more work. – John Hughes Jan 12 '18 at 3:19
• Ah, so my fault comes from assuming that $\lim_{h\to0^+} \int_0^h f=0$ as $h \to 0$, which doesn't seem to be true. Thanks! – minimario Jan 12 '18 at 3:21

Naively one would say you can “apply L’Hopital” because you have 0/0, however L’Hopital is inconclusive if the ratio between the derivatives does not have a limit.

In order to show the derivative is zero, you need to check that, because of positive and negative cancellations you have the integral less than $c h$ for every $c$ provided $h$ is small enough.

You can try to show that using some change of variable.

• Do you have an example of this: "however L’Hopital is inconclusive if the ratio between the derivatives does not have a limit" – minimario Jan 12 '18 at 3:52
• @minimario The original question is an example. The theorem says the limit of a quotient is the limit of the quotient of the derivatives IF such limit exists. If the limit does not exist, which is the case here, then we are dealing with a perfect case of an inconclusive theorem. – user334639 Jan 12 '18 at 3:57
• Do you have another example that...I can work with better, for example, with more "useful" functions? ("Useful" being "better-defined", maybe...) – minimario Jan 12 '18 at 4:01
• I can try, please ask it as a separate question and link it here. – user334639 Jan 12 '18 at 4:05