Finding the real and imaginary parts of $\frac {z}{(1-e^z)^2}$ Could anyone help me find the real and imaginary parts of this
$$ \frac {z}{(1-e^{z})^{2}} $$
where $z$ is complex? I can brute force it out but I'm worried that I'm missing an easier way, as I will be partially differentiating the two parts. 
 A: Multiply the numerator and denominator of the expression by the complex conjugate of the denominator, with the intent to make the denominator real:
$$
  \frac{z}{(1-\mathrm{e}^z)^2} = \frac{z}{(1-\mathrm{e}^z)^2} \frac{(1-\mathrm{e}^{z^\ast})^2}{(1-\mathrm{e}^{z^\ast})^2}
$$
Now, with $z = x + i y$:
$$
  (1-\mathrm{e}^z)^2 (1-\mathrm{e}^{z^\ast})^2 = ( 1 - 2 \operatorname{Re}(\mathrm{e}^z) + \mathrm{e}^{2 \operatorname{Re} z } )^2 = ( 1 - 2 \mathrm{e}^x \cos y + \mathrm{e}^{2 x})^2
$$
Using $\operatorname{Re}(a b^\ast) = \operatorname{Re}(a) \operatorname{Re}(b^\ast) - \operatorname{Im}(a) \operatorname{Im}(b^\ast) = \operatorname{Re}(a) \operatorname{Re}(b) + \operatorname{Im}(a) \operatorname{Im}(b) $:
$$
 \begin{eqnarray}
 \operatorname{Re}( z (1-\mathrm{e}^{z^\ast})^2 ) &=& x ( 1 - 2 \mathrm{e}^x \cos y + \mathrm{e}^{2x} \cos( 2 y)) + y ( 2 \mathrm{e}^x \sin y  + \mathrm{e}^{2x} \sin( 2 y) )  \\ 
 & = & x - 2 \mathrm{e}^x \left( x \cos y - y \sin y \right) + \mathrm{e}^{2x} \left( x \cos (2 y) + y \sin(2 y) \right) 
\end{eqnarray} 
$$
The final result is the quotient of these two:
$$
  \operatorname{Re}\left( \frac{z}{(1-\mathrm{e}^z)^2}  \right) = \frac{x - 2 \mathrm{e}^x \left( x \cos y - y \sin y \right) + \mathrm{e}^{2x} \left( x \cos (2 y) + y \sin(2 y) \right)}{ ( 1 - 2 \mathrm{e}^x \cos y + \mathrm{e}^{2 x})^2 }
$$
