[Math] Is a function differentiable if it has a removable discontinuity

calculuscontinuityderivatives

There are many questions on Math Stack Exchange asking if a function is differentiable if it has a removable discontinuity at $x=a$. But, I'm having trouble following the answers. I get the impression, from reading here on Stack Exchange and elsewhere that such a function is not differentiable but I don't understand why.

Consider the following equation: $f(x)=\frac{x^3}{x}$. The function is undefined at $x=0$ but it is clearly differentiable. First by simplifying:

$\frac{d}{dx}\frac{x^3}{x}=\frac{d}{dx}x^2=2x$

Or, using the quotient rule:

$\frac{d}{dx}\frac{x^3}{x}=\frac{3x^2\cdot x-x^3\cdot 1}{x^2}=\frac{3x^3-x^3}{x^2}=\frac{2x^3}{x^2}=2x$

And, finally, my calculator agrees.

Therefore, it is established that the function is differentiable and has a derivative at every x-value in its domain, including the troublesome $x=0$.

I conclude that a function is differentiable at $x=a$ if the discontinuity is removable.

The only thing I can think of that would make this untrue is the idea that I have changed the original function $f(x)$ by removing the discontinuity with some algebra and I am really differentiating a different function (call it $g(x)$) that is not quite the same at the one point of interest. That argument would be more persuasive if I had simply simplified first and then differentiated. There I was clearly differentiating a different equation. But, I did not simplify when applying the quotient rule and I obtained the same answer. So, the argument seems weak, at best.

Best Answer

The map$$\begin{array}{rccc}f\colon&\mathbb R\setminus\{0\}&\longrightarrow&\mathbb R\\&x&\mapsto&\frac{x^2}x\end{array}$$is undefined at $0$, and therefore it is meaningless to ask whether or not it is differentiable there. It happens that we can extended it to one and only one continuous function $F\colon\mathbb R\longrightarrow\mathbb R$, which is defined by $F(x)=x$. And it happens that this function is differentiable at $0$.

However, if you take$$\begin{array}{rccc}g\colon&\mathbb R\setminus\{0\}&\longrightarrow&\mathbb R\\&x&\mapsto&\begin{cases}x&\text{ if }x>0\\-x&\text{ if }x<0,\end{cases}\end{array}$$then you can extend $g$ to one and only one continuous map $G\colon\mathbb R\longrightarrow\mathbb R$, which is $G(x)=\lvert x\rvert$, but the function $G$ is not differentiable at $0$.