I am studying Fourier analysis and had a question involving the following equality:
$$\operatorname{Im}{\frac{1-e^{iny}}{-2i\sin{\frac{y}{2}}}}=\frac{1}{2\sin{\frac{y}{2}}}\operatorname{Re}(1-e^{iny})$$
I can see that $\operatorname{Im}{\frac{1}{-2i\sin{\frac{y}{2}}}}=\frac{1}{-2\sin{\frac{y}{2}}}$, but I cannot get to the RHS of the above equation. What am I missing?
We have $\frac{1}{-2i\sin{\frac{y}{2}}}=\frac{i}{2\sin{\frac{y}{2}}}$ as $i^2=-1$.
Then $\frac{1-e^{iny}}{-2i\sin{\frac{y}{2}}}=\frac{1-e^{iny}}{2\sin{\frac{y}{2}}}i=\frac{i-i(\cos(ny)+i\sin(ny))}{2\sin{\frac{y}{2}}}=\frac{\sin(ny)+i(1-\cos(ny))}{2\sin{\frac{y}{2}}}$ and
Re($1-e^{iny})=1-\cos(ny)$.