Is this Function Differentiable? $f(x) = \begin{cases} x^2-4x+5, & \text{if } x\neq 0\\ 3x+5, & \text{if } x=0 \end{cases}$ $$f(x) = \begin{cases} x^2-4x+5,  & \text{if $x\neq0$ } \\ 3x+5, & \text{if $x=0$ } \end{cases}$$
Can we Present this function as a Differentiable Function whose Derivate Function is Not Continues?
I Suppose the Derivate Function would be:
$$f'(x) = \begin{cases} 2x-4,  & \text{if $x\neq0$ } \\ 3, & \text{if $x=0$ } \end{cases}$$
Am I Right?
And is this function basically differentiable?
Thanks in Advance.
 A: You are not right. Since $3x+5=5$ for $x=0$ we have
$f(x)=x^2-4x+5$ for all $x$
Then $f$ is differentiable on $ \mathbb R$ with $f'(x)=2x-4$ for all $x$.
A: No, you can't do what you're suggesting. The main problem is that a derivative is defined based on the values of a function in a neighborhood of a point, i.e., in some open region around the point, not just what it's at the one point. Consider the basic definition of what $f'(0)$, if it exists, actually states, i.e., 
$$f'(0) = \lim_{x \to 0}\frac{f(x) - f(0)}{x} \tag{1}\label{eq1A}$$
In your case, you have that $f(x) = 3x + 5$ only at $x = 0$, so the $f(x) = x^2 - 4x  + 5$ definition would actually be used instead for the $x \to 0$ points being checked in the limit.
As David C. Ullrich's comment indicates, since using the $f(0) = 3x + 5 = 5$ definition for $x \neq 0$ since $\lim_{x \to 0} x^2 - 4x + 5 = 5$, you have that your $2$ definitions are basically the same as the one of $f(x) = x^2 - 4x + 5$ for all real $x$. Thus, $f'(x) = 2x - 4$ is the correct derivative everywhere, including at $x = 0$, instead.
