<s>[INST] Find z s.t. $z+\frac{1}{z}$ is real. Is my solution good? I must find all z s.t. $z+\frac{1}{z}$ is real. I know that $z = a + bi$ is real when the Imaginary part is 0. So, there we go:
$$z+\frac{1}{z}= \frac{z^2+1}{z}=\frac{(a+bi)^2+1}{a+bi}=\frac{[(a+bi)^2+1](a-bi)}{(a+bi)(a-bi)}$$
$$\frac{[(a+bi)^2+1](a-bi)}{(a+bi)(a-bi)} = \frac{(a^2 +2abi-b^2+1)(a-bi)}{(a^2+b^2)}$$
$$\frac{(a^2 +2abi-b^2+1)(a-bi)}{(a^2+b^2)}=\frac{a^3 +2a^2bi-b^2a+a-ba^2i+2ab^2+b^3i-bi}{(a^2+b^2)}$$
$$2a^2b-ba^2+b^3-b=0$$
$$a^2b+b^3-b=0$$
$$b_1=0$$
$$a^2+b^2-1=0$$
$$b^2=1-a^2$$
$$b_2=\sqrt{1-a^2}$$
$$b_3=-\sqrt{1-a^2}$$
so, the solutions are:
$$z_1=a+0i$$
$$z_1=a+\sqrt{1-a^2}i$$
$$z_1=a-\sqrt{1-a^2}i$$
I am not sure if that should be done like I did it.
 [/INST] Your solution is correct if you restrict $a \ne 0$ in the case
$$
 z = a + 0i
$$
and $|a| \le 1$ in the case
$$
 z = a \pm i \sqrt{1-a^2} \, .
$$
So for nonzero $z$,  $z + 1/z$ is real if $z$ is real or $|z| = 1$.
As alternative solution you can use that a complex number is real if and only if it equal to its complex conjugate:
$$
 z + \frac 1 z \in \Bbb R \\
\iff z + \frac 1 z = \overline z + \frac{1}{\overline z} \\
\iff z^2 \overline z + \overline z = z \overline z^2 + z \\
\iff (z - \overline z)(|z|^2 - 1) = 0 \, .
$$
</s>