Why does differentiability imply continuity?
For instance, consider $f(x)=x$ on $(-\infty,0]$ and $f(x)=x+1$ on $(0,\infty)$. Then the at 0 the left derivative equals the right derivative equals 1, so why doesn't $f'(0)=1$?
Why does differentiability imply continuity?
For instance, consider $f(x)=x$ on $(-\infty,0]$ and $f(x)=x+1$ on $(0,\infty)$. Then the at 0 the left derivative equals the right derivative equals 1, so why doesn't $f'(0)=1$?
The right derivative at the origin is not $1$; it's undefined, since the line connecting the point $(h,f(h))=(h,h+1)$ (for $h>0$) to the point $(0,f(0))=(0,0)$ becomes infinitely steep as $h$ approaches zero.
Theorem. Let $f$ be differentiable at $x_0$. Then $f$ is continuous at $x_0$.
Yourr function cannot be differentiable, because $\lim_{x \to 0+} f(x) =1 \neq 0=f(0)$.