Derivative on removable discontinuity 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$$
?
Thank you for your time,
Best Regards,
Bruno
 A: 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.
A: 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.
