Separating real and imaginary parts $\frac{(\cos x + i \sin x) (\cos nx + i \sin nx)(\cos x + i \sin x)}{1-(\cos x + i \sin x)}$ I have the following expression: 

$$\frac{(\cos x + i \sin x)  (\cos nx + i \sin nx)(\cos x + i \sin x)}{1-(\cos x + i \sin x)}$$

I need to separate the imaginary and real parts however I am not understanding how should I deal with the denominator. 
Question:
What should I do to separate the expression into real and imaginary parts? Am I missing some complex number property?
Thanks in advance!
 A: Hint: $$\frac{...\color{red}{(1-\cos x + i \sin x)}}{(1-\cos x - i \sin x)\color{red}{(1-\cos x + i \sin x)}}$$
A: If you have ${a\over b}$ where $a,b$ are complex, then ${a \over b} = {a \overline{b} \over  |b|^2}$.
Then ${a \over b} = {1 \over |b|^2} (\operatorname{re} (a \overline{b}) +  i\operatorname{im} (a \overline{b}) )$.
In your case, the expression is
${e^{ix} e^{inx} e^{ix} \over 1-e^{-ix}} = {e^{i(2+n)x} (1-e^{-ix})\over (1-e^{-ix}) (1-e^{-ix})} = {e^{i(2+n)x} (1-e^{-ix})\over 2(1-\cos x)}$.
Hence we have ${1 \over 2(1-\cos x)} (\cos((2+n)x)) - \cos((1+n)x) + i(\sin((2+n)x)) - \sin((1+n)x)))$.
A: A hint to help with the denominator: multiply numerator and denominator by $\cos(x/2) - i\sin(x/2) (=e^{-ix/2})$.
By the way, if you know Euler's formula, ($e^{i\theta} = \cos\theta + i\sin \theta$), or even a notation like $\mathrm{cis}(\theta) = \cos \theta + i\sin \theta$, it would simplify the notation a lot and remind you more easily probably of how you can multiply these complex numbers together. 
A: Note:
$$\frac{(\cos x + i \sin x)  (\cos nx + i \sin nx)(\cos x + i \sin x)}{1-(\cos x + i \sin x)}=\frac{(\cos x+i\sin x)^2(\cos nx+i\sin nx)}{1-(\cos x+i\sin x)}=\frac{e^{2ix}\times e^{inx}}{1-e^{ix}}=\frac{e^{(2+n)ix}}{1-e^{ix}}$$
And you should be able to continue from here
A: It is really convenient to write $\cos nx+i\sin nx=e^{inx}$ and use the properties of the exponential. Also, whenever you see an expression like $e^{ix}-1$, it is very convenient to set $x=2y$ and to write
$$
e^{ix}-1=e^{2it}-1=e^{it}(e^{it}-e^{-it})=2ie^{it}\sin t
$$
using again Euler's formulas.
Thus you have
$$
\frac{e^{2it}e^{2nit}e^{2it}}{-2ie^{it}\sin t}=\frac{i}{2\sin t}e^{(2n+3)it}
$$
and then you can use back $e^{ix}=\cos x+i\sin x$.
