<s>[INST] The real and imaginary parts of $\frac{z}{(1-z)^2}$ I have been trying to evaluate the real and imaginary parts of $\frac{z}{(1-z)^2}$ and I was wondering if my solution was correct, as it's quite not nice.
I first wrote out the z's as (x+iy)'s, turning the denominator into $1+x^2 -y^2 -2x +i(2y(1+x))$. Then I multiplied the expression by the complex conjugate of the denominator and did a lot of simplification to turn the expression into $\frac{x^3-2x^2+x+xy^2+2xy+i(-y^3+y-yx^2-2yx-2x^2)}{x^4+y^4-4x^3+2y^2+6x^2-4x+12y^2+2y^2x^2+1}$ . Obviously here you can just split the fraction to obtain the real and imaginary parts. It just seems quite heavy, and I was wondering if my process wasn't the best for this type of problem. Thank you!
 [/INST] By $w=\frac{z}{(1-z)^2}$, for the real part we have
$$2\Re(w)=w+\bar w=\frac{z}{(1-z)^2}+\frac{\bar z}{(1-\bar z)^2}=\frac{z(1-\bar z)^2+\bar z(1-z)^2}{(1-2\Re(z)+|z|^2)^2}=$$
$$=\frac{2\Re (z)-4|z|^2+2\Re(z)|z|^2}{\left(1-2\Re(z)+|z|^2\right)^2} \implies \Re \left(\frac{z}{(1-z)^2}\right) =\frac{x-2(x^2+y^2)+x(x^2+y^2)}{\left(1-2x+x^2+y^2\right)^2}$$
and similarly for the imaginary part we obtain
$$2i\Im(w)=w-\bar w=\frac{z}{(1-z)^2}-\frac{\bar z}{(1-\bar z)^2}=\frac{z(1-\bar z)^2-\bar z(1-z)^2}{\left(1-2\Re(z)+|z|^2\right)^2}=$$
$$=\frac{2i\Im (z)-2i\Im(z)|z|^2}{\left(1-2\Re(z)+|z|^2\right)^2} \implies \Im \left(\frac{z}{(1-z)^2}\right) =\frac{y-y(x^2+y^2)}{\left(1-2x+x^2+y^2\right)^2}$$

A more effective way
$$\frac{z}{(1-z)^2}= \frac{z}{(1-z)^2}\frac{(1-\bar z)^2}{(1-\bar z)^2}=\frac{z-2z\bar z+z\bar z^2}{\left(1-z-\bar z+z\bar z\right)^2}=\frac{z-2|z|^2+\bar z|z|^2}{\left(1-2\Re (z)+|z|^2\right)^2}$$
from which the previous result follows.
</s>