2. Determine all complex numbers $z$ for which

$$
z \cdot|z|+2 z+i=0
$$
First solution.

Let $z=x+iy$. Then the equation takes the form

$$
(x+i y) \sqrt{x^{2}+y^{2}}+2 x+2 i y+i=0
$$

or

$$
x\left(\sqrt{x^{2}+y^{2}}+2\right)+i\left(y \sqrt{x^{2}+y^{2}}+2 y+1\right)=0
$$

From this, we get:

$$
\begin{gathered}
x\left(\sqrt{x^{2}+y^{2}}+2\right)=0 \\
y \sqrt{x^{2}+y^{2}}+2 y+1=0
\end{gathered}
$$

Since $\sqrt{x^{2}+y^{2}}+2>0$, from (1) it follows that $x=0$ (4 points),

and from (2) we get

$$
y|y|+2 y+1=0
$$

From this, $y<0$ and $y^{2}-2 y-1=0$.

The solutions to this quadratic equation are $y_{1,2}=1 \pm \sqrt{2}$. Since $y<0$, only $y=1-\sqrt{2}$ satisfies the condition.

Thus, the only solution is $z=i(1-\sqrt{2})$.