Why is the slope function not differentiable? I encountered this (complex) function in my textbook:
$$
g(z)=
\left\{
\begin{split}
&\frac{f(z)-f(a)}{z-a}&, \space z \neq a\\
&f'(a)&, z=a
\end{split}
\right.
$$
The book says that $g(z)$ is continuous everywhere. However, $g$ is not differentiable at $z=a$. I understand the continuity part, but I am not sure the reason for $g$ not differentiable at $z=a$.
Below is my attempt:
$$
\lim_{h \to 0} \left. \frac {g(z+h)-g(z)}{h} \right |_{z=a}=\lim_{h \to 0} \frac {g(a+h)-g(a)}{h} = \lim_{h \to 0} \frac { \frac{f(a+h)-f(a)}{h}-f'(a)}{h}\\
$$
Now how do I show that the limit doesn't exist? It looks like there is an indetermitane form in this limit, though I am not sure.
 A: If $f$ happens to be analytic in some neighborhood $U$ of $a$ then the function $g$ is not only continuous on $U$ but even analytic as well, in particular differentiable at $a$. There is no question about that. 
On the other hand, if $f$ is any old continuous function which is, by coincidence, complex differentiable at $a$, but maybe nowhere else, then $g$ is indeed continuous, but maybe not differentiable at $a$. Consider the  example $f(z):=z\bar z$. For this $f$ we have
$$\lim_{z\to0}{f(z)-f(0)\over z}=\lim_{z\to0}\bar z=0\ ,$$
hence $f$ is complex differentiable at $0$. Furthermore
$g(z)=\bar z$ is continuous on all of ${\mathbb C}$, but not complex differentiable anywhere.
A: Use $f(x) = x|x|$ and $a = 0$. Then $f'(0) = 0$, $f(0) =0$, so that for all $x \neq 0$ $g(x) = \frac{f(x)}{x}= \frac{x|x|}{x} = |x|$ and $g(0) = f'(0) = 0.$ 
Thus: 
$ \lim_{h \rightarrow 0^+}  \frac{g(h)-g(0)}{h} = \lim_{h \rightarrow 0^+}  \frac{|h|}{h}= 1 \neq \lim_{h \rightarrow 0^-}  \frac{g(h)-g(0)}{h} = \lim_{h \rightarrow 0^-}  \frac{|h|}{h}= -1$ , so $g$ is not differentiable at $0$. 
