<s>[INST] solving difficult complex number proving if $z= x+iy$ where $y \neq 0$ and $1+z^2 \neq 0$, show that the number $w= z/(1+z^2)$ is real only if $|z|=1$
solution :
$$1+z^2 = 1+ x^2 - y^2 +2xyi$$ 
$$(1+ x^2 - y^2 +2xyi)(1+ x^2 - y^2 -2xyi)=(1+ x^2 - y^2)^2 - (2xyi)^2$$
real component
$$(1+ x^2 - y^2)x - yi(2xyi) = x + x^3 + xy^2$$
imaginary component 
$$-2yx^2 i +yi + x^2 yi - y^3 i=0i$$
$$-2yx^2 +y + x^2 y - y^3 =0$$
... 
can't solve this question 
 [/INST] HINT:
Let $z=r(\cos A+i\sin A)$ where $r\ge0,A$ are real
As $y\ne0,\sin A\ne0$
$1+z^2=1+r^2\cos2A+i(r^2\sin2A)$
$\dfrac1{1+z^2}=\dfrac{1+r^2\cos2A-ir^2\sin2A}{(1+r^2\cos2A)^2+(r^2\sin2A)^2}$
$r(\cos A+i\sin A)\cdot(1+r^2\cos2A-ir^2\sin2A)$
$=\cdots+ir[\sin A(1+r^2\cos2A)-r^2\cos A\sin2A]=\cdots+ir[\sin A-r^2\sin(2A-A)]$
$=\cdots+ir\sin A(1-r^2)$
</s>