Simplify expression involving real or imaginary part of complex rational function Basically I want simplify the following so that the real or imaginary operator do not appear: 
$$\Im \prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i}$$
or 
$$\Re \prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i}$$
where $z = x+iy$ is complex and $x_i$ is real. The $l_i$ can be any real number. Is such a form readily obtained? 
 A: Such a form is easily obtained if you allow the conjugate operator.
For any complex $z$, $\Re(z)=\frac 12(z+\overline z)$ and $\Im(z)=\frac 1{2i}(z-\overline z)$. Therefore we can write
$$\begin{align}
\Re \left(\prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i}\right)
  &= \frac 12\left( \prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i} +
     \overline{\prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i}} \right) \\[2ex]
  &= \frac 12\left( \prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i} +
     \prod_{i=1}^{N-1} \left( \overline z-x_i\right)^{l_i} \right)
\end{align}$$
since the $x_i$ and $l_i$ are real, and similarly
$$\begin{align}
\Im \left(\prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i}\right)
  &= \frac 1{2i}\left( \prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i} -
     \overline{\prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i}} \right) \\[2ex]
  &= \frac 1{2i}\left( \prod_{i=1}^{N-1} \left(  z-x_i\right)^{l_i} -
     \prod_{i=1}^{N-1} \left( \overline z-x_i\right)^{l_i} \right)
\end{align}$$
You will need something like the conjugate operator to get the imaginary part (and thus the real part), since the complex numbers are isomorphic to their conjugates under the usual operations of addition, multiplication, and so on.
