So I want to show that $f(z)=|z|$ where $z$ is a complex number is not differentiable anywhere, and that $g(z)=|z|^2$ is differentiable at $z=0$ only. Now with some computation, I got:
$\lim_{h\rightarrow 0}\frac{|z+h|-|z|}{h}=\frac{\partial}{\partial x}\sqrt{x^2+y^2}=\frac{x}{\sqrt{x^2+y^2}}$ and $\lim_{ih\rightarrow 0}\frac{|z+ih|-|z|}{ih}=\frac{1}{i}\frac{\partial}{\partial y}\sqrt{x^2+y^2}=\frac{y}{i\sqrt{x^2+y^2}}$. Thus they are not equal for $z\ne x+iy.$
Now what I do not get it is, this result would imply what I have to prove in the question, but why would this mean that this $f(z)$ is not differentiable anywhere?
Similary, for $g(z)$, the computation I get for $\lim_{h\rightarrow 0}\frac{|z+h|^{2}-|z|^2}{h}=2x$ and $\lim_{ih\rightarrow 0}\frac{|z+ih|^{2}-|z|^2}{ih}=\frac{2y}{i}$, this is not equal unless $z=0$. The conclusion once again is $g$ is not differentiable unless at $z=0.$
Questions
1) Why is $f$ not differentiable anywhere? Is it because the only possible place where it is differentiable is if $z=0?$, but that would imply the denominator is $0 $ and hence undefined?
2) Why do we have to have the condition in which the partials have to be equal in order for the function to be differentiable at some given domain?
I would appreciate some clear explanation. Thank You.