# Differentiability: What if Left-hand and Right-hand Limit are Equal in $x$ but differ from $f(x)$?

Earlier today I asked this question: Derivative of Function with Cases: $f(x)=x^2\sin x^{-1}$ for $x\ne0$

Following the answers to my question I worked on my problem. Among other things I showed that the left hand limit of the derivative of the function from the question is equal to the left hand derivative. But that lead me to a new question:

A function is differentiable in $x$ iff $f'_+(x) = f'_-(x)$. But also a function isn't differentiable in $x$ if it is not continuous in $x$. What if both things are true?

The function $$f(x) = \begin{cases}x^2\sin x^{-1} & \text{if } x \neq 0\\ 10 & \text{else }\end{cases}$$ for instance. Here the right hand derivative is equal to the left hand derivative:

from the left:

\begin{align*} \lim_{x \to 0^-} \frac{f(x) - f(0)}{x - 0} & = \lim_{x \to 0^-} \frac{x^2 \sin \left( \frac{1}{x} \right) - {0^2 \sin \left( \frac{1}{0} \right)}}{x - 0}\\ & = \lim_{x \to 0^-} \frac{{x} \left(x\sin \left( \frac{1}{x} \right) \right)}{{x}}\\ & = \lim_{x \to 0^-} \frac{{x\sin \left( \frac{1}{x} \right)}}{1}\\ & = 0 \end{align*}

from the right:

\begin{align*} \lim_{x \to 0^+} \frac{f(x) - f(0)}{x - 0} & = \lim_{x \to 0^+} \frac{x^2 \sin \left( \frac{1}{x} \right) - {0^2 \sin \left( \frac{1}{0} \right)}}{x - 0}\\ & = \lim_{x \to 0^+} \frac{{x} \left(x\sin \left( \frac{1}{x} \right) \right)}{{x}}\\ & = \lim_{x \to 0^+} \frac{{x\sin \left( \frac{1}{x} \right)}}{1}\\ & = 0 \end{align*}

So, as the left and right hand limits are the same $f$ must be differentiable in $0$, right? But it is obviously not continuous at $0$, as $f(0) = 10$ but $\lim_{x \to 0} f(x) = 0$, so then it must not be differentiable... What am I missing here? Is the left-right-hand limit equality just a necessary rather than a sufficient precondition for differentiability?

• What you're missing is that $f(x) - f(0) = f(x) - 10$. – user384138 Jan 14 '17 at 8:03
• $f(0)$ is $10$ and not $(0^2 \sin \left( \frac{1}{0} \right))$ according to your definition of $f$. Besides that the latter expressiond does not make sense because of $\frac{1}{0}$. – miracle173 Jan 14 '17 at 8:07
• @user3578468 It's not relevant. The definition of $f$ says that when $x = 0$, $f(x) = 10$, no matter what expression $f$ has otherwise. The limit of $f$ as $x \to 0$ is $0$, because $x^2$ pushes it to $0$, but the value at $0$ is $10$. – Arthur Jan 14 '17 at 8:20
• You're investigating the derivative at $0$, and part of that involves evaluating $f$ exactly at $0$. – Arthur Jan 14 '17 at 9:04
• You can look at the definition of $f'(0)$, which is $\lim_{h \to 0}\frac{f(h) - f(0)}{h}$. You see the $f(0)$ in there? That's not a limit, that's actually $f(0)$. How can you convince yourself of that? Because that's what it says. If we had meant something else, we would've written something else. – Arthur Jan 14 '17 at 9:09

1.There is no real number $\frac {1}{0}.$ Any computations using it are false or meaningless.
1. If $f(x)=x^2 \sin 1/x$ for $x>0$ and $f(x)=10$ for $x\leq 0$ then for $x>0$ we have $$\frac {f(x)-f(0)}{x-0}=\frac {x^2\sin 1/x -10}{x}=x(\sin 1/x) -10/x$$which has no limit as $x\to 0.$ So $f$ has no "upper" derivative at $0.$
• What do you mean by that? $\lim_{x \to 0} \frac{x \sin \frac{1}{x} - 10}{x} = \lim_{x \to 0} \frac{x \sin \frac{1}{x}}{x} - \lim_{x \to 0} \frac{10}{x} = 0 -\infty$ – user3578468 Jan 14 '17 at 9:19
• Infinity is not a real number either. When we say that something goes to infinity, it is a euphemism for a longer rigorous statement. And $\lim_{x\to \infty}f(x)=y$ is a short form for a longer rigorous statement that is meaningful only when $y\in \mathbb R.$ – DanielWainfleet Jan 14 '17 at 10:20