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 

It's easier to work with $w=\dfrac{1+z^2}z=\dfrac1z+z$ (that doesn't change the claim).
Taking the imaginary part,
$$-\frac y{x^2+y^2}+y=y\left(1-\frac1{x^2+y^2}\right)=0,$$
i.e.
$$x^2+y^2=1.$$
Or, in polar coordinates,
$$-\frac1r\sin(\phi)+r\sin(\phi)=0\implies r=1.$$
