Example 2. Investigate the analytical properties of the function $w=|z|^{2}$ and find its derivative.
SOLUTION.

1. Find the real and imaginary parts of the function

$$
w=|z|^{2}=|x+i y|^{2}=x^{2}+y^{2}
$$

We obtain

$$
u(x, y)=x^{2}+y^{2}, \quad v(x, y)=0
$$

2. Find the partial derivatives

$$
\begin{array}{ll}
\frac{\partial u}{\partial x}=2 x, & \frac{\partial v}{\partial y}=0 \\
\frac{\partial u}{\partial y}=2 y, & \frac{\partial v}{\partial x}=0
\end{array}
$$

The partial derivatives are clearly continuous everywhere, and therefore the functions $u(x, y)$ and $v(x, y)$ are differentiable everywhere.

3. Cauchy-Riemann conditions

$$
\frac{\partial u}{\partial x}=\frac{\partial v}{\partial y}, \quad \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}
$$

are satisfied only at the point $x=0, y=0$. Therefore, the function $|z|^{2}$ is differentiable at the single point $z=0$ and is nowhere analytic.

4. Compute the derivative of the function $|z|^{2}$ at the point $z=0$, for example using the formula:

$$
f^{\prime}(0)=\frac{\partial u}{\partial x}(0,0)+i \frac{\partial v}{\partial x}(0,0)=0
$$

Answer. The function $f(z)=|z|^{2}$ is differentiable at one point $z=0$ and is nowhere analytic. $f^{\prime}(0)=0$.