Question: I need to show that $f(z) = |z|^2$ is differentiable only at the origin
Sufficient condition for differentiability: The sufficient condition for a function $f(z) = u + iv$ to be analytic at all the points in region $R$ are
$\displaystyle (a)\; \frac{\partial u}{\partial x} = \frac{\partial v}{\partial y} ,\frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x} $
$\displaystyle (b)\; \frac{\partial u}{\partial x} , \frac{\partial v}{\partial y} ,\frac{\partial u}{\partial y} ,\frac{\partial v}{\partial x} $ are continuous functions of $x$ and $y$ in region $R$ .
My answer:
$f(z) = |z|^2$ Let, $z = x + iy$
$f(z) = x^2 + y^2$
But $f(z) = u + iv$
$u = x^2 + y^2 , v = 0$
$\displaystyle \frac{\partial u}{\partial x} = 2x$ ,
$\displaystyle \frac{\partial v}{\partial y} = 0$
$\displaystyle \frac{\partial u}{\partial y} = 2y$ ,
$\displaystyle \frac{\partial v}{\partial x} = 0$
if $f(z) $ is differentiable then,
$\displaystyle \frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}$ or, $2x = 0$ or $x = 0$
& $\displaystyle \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}$ or, $2y = 0$ or $y = 0$
cauchy riemann equation is satisfied at $(0,0)$
For the second part of the condition (checking for continuity of the partial derivatives ) I see that $\displaystyle \frac{\partial u}{\partial x} = 2x$ which is continuous for any value of $x$ & $\displaystyle \frac{\partial v}{\partial x} = 0$ regardless of the value of x, so it's continuous.The other two are also similar.
I am confused about the second part of the proof.Have I understood it properly?
Another way of proving that $f$ is differentiable at $0$ is simply to observe that$$\lim_{z\to0}\frac{|z|^2}z=\lim_{z\to0}\overline z=0.$$Besides, if $z_0\neq0$, then$$\lim_{z\to z_0}\frac{|z|^2-|z_0|^2}{z-z_0}=\lim_{z\to z_0}\frac{|z|-|z_0|}{z-z_0}\bigl(|z|+|z_0|\bigr).$$Now, if $z$ approaches $z_0$ along the circle centered at $0$ passing through $z_0$, then the previous limit is $0$. And if $z$ approaches $z_0$ along the ray $\bigl\{\lambda z_0\,|\,\lambda\in(1,+\infty)\bigr\}$, then the previous limit is $2\overline{z_0}\neq0$. Therefore the limit does not exist.