# Let $f(x)=x\sin{(\pi x)}$. Spivak's solution manual seems to imply $f'(0)$ does not exist for this function. Why?

The following is a problem from Ch. 23 of Spivak's Calculus

Let $$f$$ be a continuous function on an interval around $$0$$, and let $$a_n=f(1/n)$$ (for large enough $$n$$).

6(d) Suppose $$\sum\limits_{n=1}^\infty a_n$$ converges. Must $$f'(0)$$ exist?

The answer I came up with is simply a function that has a kink at $$f(0)=0$$ (ie, not differentiable there), but which for non-negative $$x$$ is such that $$a_n=f(1/n)$$ and $$\{a_n\}$$ is summable.

For example, $$f(x)=x^2$$ for $$x\geq 0$$, and $$f(x)=-x$$ for $$x<0$$.

Then, $$f(0)=0$$, $$f$$ is continuous there, and $$f'(0)$$ does not exist, but $$\{a_n\}=\{1/n^2\}$$ is summable.

Is this an adequate counterexample to the idea that $$f'(0)$$ must exist if $$\sum a_n$$ converges?

Then I looked at the solution manual and it says

No. Consider $$f(x)=x\sin\{(\pi x)\}$$, $$f(0)=0$$.

But isn't this function differentiable at $$0$$?

• Please check that my edit preserves the intent, and compare with the question title. Commented Nov 1, 2022 at 17:24
• Please explain how the series relates to $f$, e.g. by quoting the relevant part of the exercise.
– Joe
Commented Nov 1, 2022 at 17:27
• I forgot to put in the beginning of the problem statement. It is fixed now.
– xoux
Commented Nov 1, 2022 at 17:34
• IT must be a typo in your booklet. I think the meant to write $x\sin(\pi/(x))$ for then $f(1/n)=0$ Commented Nov 1, 2022 at 18:01
• $\frac{d}{dx}(x \sin(π x)) = \sin(π x) + π x \cos(π x)$ Commented May 31, 2023 at 3:35

The answer is likely a typo that intended $$f(x)= x\sin(\frac{\pi}{x})$$
Here $$f(\frac{1}{n})=0$$ for all $$n$$, yet $$f$$ is not differentiable at 0.