# Where is the mistake ( in using mean value theorem)?

$$f(x)= \begin{cases} x^2\sin \frac1x & x \ne 0 \\ 0 & x=0\\ \end{cases}$$

$$f$$ is differentiable everywhere and $$f'(x)= \begin{cases} 2x\sin \frac1x-\cos \frac1x & x \ne 0 \\ 0 & x=0\\ \end{cases}$$

$$f$$ satisfies the MVT. Using it on $$(0,x)$$ we get: $$\frac{x^2\sin \frac1x-0}{x-0}= 2c\sin \frac1c-\cos \frac1c$$

$$c\in(0,x)$$

When $$x\to0$$ then $$c\to0$$. So we have a contradiction $$0=\lim \limits_{x \to 0}x\sin \frac1x=\lim \limits_{c \to 0}2c\sin\frac1c-\cos\frac1c$$ Last limit doesn't exist where is the mistake ?

I see that $$\lim \limits_{x \to 0}f'(x)$$ doesn't exist but MVT still applies?

Using a limit inside of an interval is something i dont understand dont we then get a single point? This process is important it used in the proof of l"Hospital rule.

• As a side note, this particular function exhibits some surprising properties because it isn’t analytic at 0. While it seems nice and smooth around 0, that’s only the case for real numbers, if $x$ approaches 0 along the imaginary axis there’s no limit. – Roman Odaisky Dec 31 '19 at 21:20

In the last equation, the "constant" $$c$$ actually depends on $$x$$, so it can really be viewed as a function $$c(x)$$:

$$0=\lim \limits_{x \to 0}x\sin \frac1x=\lim \limits_{c \to 0}2c(x)\sin\frac1{c(x)}-\cos\frac1{c(x)}$$

All you know about $$c(x)$$ is that $$0 (which implies $$c(x)\to 0$$ when $$x\to 0$$), but it may have nice additional properties that "smoothen" the expression on the right so that the limit would exist. (Imagine, for example, if $$\frac{1}{c(x)}$$ is always an odd multiple of $$\frac{\pi}{2}$$ so the "offending" $$\cos$$ is always $$0$$...)

• One thing, $c$ depends on $x$, but it is not necessarily a function [I assume the convention that "function" is defined to be univalent]. – xbh Jan 1 '20 at 7:13
• @xbh Did not want to over-complicate the explanation. You are right, of course. – Stinking Bishop Jan 2 '20 at 18:51

$$c$$ depends on $$x$$. call it $$c(x)$$. There is no contradiction in $$\lim _{x \to 0} \cos(\frac 1 {c(x)})=0$$ even though $$\cos (\frac 1 c)$$ itself does not have a limit as $$c \to 0$$. [Like a subsequence of sequence being convergent even though the squence itself is not].

The mean value theorem says that there exists some $$c$$ in the interval $$(0,x)$$ such that [...]. And it is indeed the case that for any $$x>0$$ you can find such a $$c$$. That is not to say that any $$c$$ in $$(0,x)$$ satisfies the MVT, or even that the other numbers in $$(0,x)$$ behave nicely.

So what the MVT actually tells you in this case is that for any $$x>0$$, there is a $$c_x\in(0,x)$$, and these $$c_x$$ are such that $$2c_x\sin\frac1{c_x}-\cos \frac1{c_x}\to 0$$

MVT indicates that there exists $$c$$ s.t. $$2c \sin \frac 1c - \cos \frac 1c = x \sin \frac 1x [c =tx , t\in (0,1)]$$ so generally we cannot assert that $$\lim_{c \to 0 } 2c \sin \frac 1c - \cos \frac 1c = \lim _{x \to 0} x \sin \frac 1x$$ since $$x \to 0 \implies c \to 0$$ when $$c = tx$$ for some $$t \in (0,1)$$ but not the other way around.

To be clear, the limit on the LHS requires $$c$$ approaches $$0$$ via every possible "routes", while the MVT method only picked some of them.

• You mean limit on LHS? – Milan Dec 31 '19 at 12:01
• @Milan Yes, thanks. ${{{{{{{{{{}}}}}}}}}}$ – xbh Dec 31 '19 at 12:02