# Find the fallacy in the resoning of showing $\lim\limits_{x\to0} \cos\frac{1}{x} =0$

Question The function$$f(x)=\begin{cases} x^{2} \sin \frac{1}{x} & \text {for } x \neq 0 \\ 0 & \text {for } x=0 \end{cases}$$ is differentiable for any $$x$$. By Lagrange's Mean Value Theorem$$x^{2} \sin \frac{1}{x}=x\left(2 \xi \sin \frac{1}{\xi}-\cos \frac{1}{\xi}\right)\text{ where }0 <\xi Hence $$\cos \frac{1}{\xi}=2 \xi \sin \frac{1}{\xi}-x \sin \frac{1}{x}$$ As $$x$$ tends to zero, $$\xi$$ will also tend to zero. Passing to the limit, we obtain $$\lim\limits_{\xi \to 0} \cos (1 / \xi)=0$$ whereas it is known that $$\lim \limits_{x \to 0} \cos \frac{1}{x}$$ is non-existent.

Find the mistake in this reasoning. This proof seems logical but this is not valid. Why is this?

• This is a good illustrative example. "Passing to the mean value" in limits is a common trick, but often not justified without some hypotheses (e.g., that the function is $C^{1}$). Aug 27, 2020 at 7:45

Your argument does not prove that $$\lim_{\xi \to 0} \cos (\frac 1 {\xi})=0$$ It only proves that $$0$$ is a limit point of $$\cos (\frac 1 {\xi})$$. The reason is $$\xi$$ is not arbitrary. Though it tends to $$0$$ as $$x \to 0$$ it need not take all values near $$0$$.

Your line $$x^{2} \sin \frac{1}{x}=x\left(2 \xi \sin \frac{1}{\xi}-\cos \frac{1}{\xi}\right)\text{ where }0 <\xi is mathematically illiterate, and I think is the source of your problem. It should read $$\text{There exists }\xi\in(0,x)\text{ such that }x^{2} \sin \frac{1}{x}=x\left(2 \xi \sin \frac{1}{\xi}-\cos \frac{1}{\xi}\right)$$ or alternatively $$x^{2} \sin \frac{1}{x}=x\left(2 \xi \sin \frac{1}{\xi}-\cos \frac{1}{\xi}\right)\text{ for some }0 <\xi Your subsequent argument seems to assume that this holds for an arbitrary $$\xi\in(0,x)$$, which is not the case.

Note that $$\xi$$ is not a free value but a particular value between $$0$$ and $$x$$, dependent upon $$x$$, such that the original identity holds and such that the limit for $$\cos \frac1{\xi}$$ is equal to zero.

We should write

$$0< \xi(x)

and

$$\lim_{x\to 0}\cos \frac{1}{\xi(x)}=\lim_{x\to 0} \left(2 \xi(x) \sin \frac{1}{\xi(x)}-x \sin \frac{1}{x} \right)=0$$