# Derivative on removable discontinuity [duplicate]

I have a simple question and I would appreciate if anyone could clarify for me, please.

I understand that a function can fail to differentiate when you have a "corner", a vertical assymptote or a non-removable discontinuity on a given point. But what about a function with a removable discontinuity?

Let's say that you have the function

$$y = \frac{x-1}{x-1}$$

for all $$x \neq 1$$

and

$$y=2$$

when

$$x = 1$$

Can you take the derivative of that function on $$x = 1$$

?

Best Regards,

Bruno

• So, in short you have $$y(x)=\begin{cases}x&\text{for }x\ne 1\\2&\text{for }x=1\end{cases}$$? That's quite discontinuous at $x=1$, and you can only "remove" that by considering a different function instead. Commented Aug 7, 2014 at 18:42
• The definition of the derivative forces an answer of no. And there is no reason to wish it were not so: saying that $y$ is $2$ at $x=1$ is a deliberate act. The situation is different if the function is simply left undefined at $x=1$. The definition of most calculus books would leave the answer at no, but it would be sensible to quietly close up and view $y(1)$ as being equal to $1$. Commented Aug 7, 2014 at 18:45
• Henning, the function OP mentioned HAS a removable discontinuity point..isnt it? Commented Aug 7, 2014 at 18:48
• @luka5z: No, he explicitly defined the value at $1$ to be $2$. "Removable" implies that you can make the function nice by extending it, not by changing values where it is already defined. Commented Aug 7, 2014 at 18:51
• (Also, it looks like I'm unable to divide $x-1$ by itself ...) Commented Aug 7, 2014 at 18:52

The function $$f(x) = \frac{x-1}{x-1}$$ is really shorthand for the constant function $$1$$ with domain $$\mathbb{R} \setminus \{1\}$$. This function cannot have a derivative at $$x = 1$$ because $$x = 1$$ is not part of its domain. However, if you "remove" the discontinuity (as one often does), you can arrive at a corresponding function $$g(x) = 1$$ which is differentiable at $$x = 1$$.

Similarly a function like $$h: \mathbb{R} \to \mathbb{R}$$ $$h(x) = \begin{cases} 1 & \text{if } x \ne 1 \\ 2 & \text{if } x = 1 \end{cases}$$ is not differentiable at $$1$$ but can be made differentiable by changing the value of the function at a single point.

That $$h$$ is not differentiable is a result of the definition of the derivative: $$\lim_{\Delta \to 0} \frac{h(1 + \Delta) - h(1)}{\Delta} = \lim_{\Delta \to 0} \frac{1 - 2}{\Delta} = \lim_{\Delta \to 0} \frac{-1}{\Delta}$$ which does not exist.

• I get it Goos, thanks. But let's say that I leave the function like I originally posted, with the Domain R (all real numbers). Can I take the derivative of that function when $$x = 1$$? The limit surely exists... Commented Aug 7, 2014 at 18:59
• No it doesn't; your limit becomes $\lim_{h \to 0} 1/h$.
– Ian
Commented Aug 7, 2014 at 19:09
• @bru1987 No, that is my function $h$ and the limit does not exist. I will clarify in my answer. Commented Aug 7, 2014 at 19:15
• Thanks for your explanation Goos. Best Regards! Commented Aug 7, 2014 at 19:55
• Is $h(x)$ supposed to be flipped in that $h(x)=1$ when $x = 1$ and $h(x)=2$ when $x \neq 1$? It appears flipped based on the limit provided, but wasn't sure if I was missing something. Commented May 15, 2021 at 7:15

Edited to be correct (I hope):

As Daniel Fischer points out in the comments, the left- (resp. right-) derivative of a function $f$ at $x$ is not defined unless $f$ is left- (resp. right-) continuous at $x$. So I was wrong to claim that your function $y$ is left- and right-differentiable everywhere. It is simply not differentiable at $x=1$, because it is not continuous there.

Sorry for the confusion.

• Thanks Tony, your answer makes sense. Best Regards! Commented Aug 7, 2014 at 19:54
• Just a note: right-differentiability at $a$ implies right-continuity at $a$. Analogously for left-differentability. Hence (in the one-dimensional case) semi-differentiability at $a$ implies continuity at $a$ (see third bullet point in the section). Commented Aug 7, 2014 at 19:59
• Oh, and neither the left nor the right derivative of the function $y$ from the question exists at $1$. That part is incorrect. Commented Aug 7, 2014 at 20:01
• @DanielFischer: Thank you for pointing that out! I have edited my answer accordingly. Commented Aug 7, 2014 at 20:12
• Thanks @TonyK for being honest and Daniel Fischer for the answer. Best regards for both! Commented Aug 7, 2014 at 20:32