Derivative of $f(z) = z \bar{z}$ using limit definition I am trying to evaluate the derivative of the following function:
$$
f(z) = z \bar{z}
$$
Attempt:
$$
\lim_{h\to 0} \frac{f(z+h)-f(z)}{h}= \lim_{h\to 0} \frac{(z+h)(\bar{z}+\bar{h})-z\bar{z}}{h}=\lim_{h\to 0} \frac{h\bar{z}+z\bar{h}+h\bar{h}}{h}
$$
However, I am stuck at this step.
 A: You can split the fraction in three terms:
$$
\lim_{h \to 0} \left(\bar{z} + z \frac{\bar{h}}{h} + \bar{h}\right).
$$
The first terms tends to $\bar{z}$ and the third to $0$. For the second one: remember that for complex limits, $h$ can approach $0$ from all directions. What happens if $h$ is purely imaginary? What if $h$ is purely real?
A: The function $f$ is differentiable at $0$ and $f'(0)=0$, because$$f'(0)=\lim_{h\to0}\frac{h\overline h}h=\lim_{h\to0}\overline h=0.$$On the other hand, if $z\neq0$, then $f$ is not differentiable at $z$, because\begin{align}\lim_{h\to0}\frac{f(z+h)-f(z)}h&=\lim_{h\to0}\frac{|z+h|^2-|z|^2}h\\&=\lim_{h\to0}\frac{|z+h|-|z|}h\bigl(|z+h|+|z|\bigr)\end{align}and this limit doesn exist. If it existed the, since $\lim_{h\to0}|z+h|+|z|=2|z|\neq0$, then the limit$$\lim_{h\to0}\frac{|z+h|-|z|}h$$would exist too. But it doesn't, because:


*

*if you take $h$ such that $z+h$ belongs to the circle centered at $0$ and passing through $z$, then the limit is $0$;

*if $h=\lambda z$ with $\lambda\in(1,+\infty)$, then the limit is $\frac{|z|}z\neq0$.

A: $z \bar{z}=|z|^2=x^2+y^2$. Apply CR to find out where this thing is differentiable: it can only be at $x=y=0$ and the value at that point is 0 by just taking partial derivative respect to $x$. 
