simplifying $-\pi i/8 (e^{i\pi/8} + e^{i3\pi/8} + e^{i5\pi/8} + e^{i7\pi/8})$
in my lecture notes somehow my lecture got from$-\pi i/8 (e^{i\pi/8} + e^{i3\pi/8} + e^{i5\pi/8} + e^{i7\pi/8})$ to $\dfrac{\pi}{8\sin(\pi/8)}$, could someone show me how? I've spent the last 90 minutes on it!
$$-\frac{\pi i}{8} (e^{\pi i/8} + e^{3\pi i/8} + e^{5\pi i/8} + e^{ 7\pi i/8})=-\frac{e^{\pi i/8}\pi i}8\left(1+e^{\pi i/4}+e^{2\pi i/4}+e^{3\pi i/4}\right)=$$
$$=-\frac{e^{\pi i/8}\pi i}8\frac{\overbrace{\left(e^{\pi i/4}\right)^4-1}^{=-2}}{\underbrace{e^{\pi i/4}-1}_{=\frac1{\sqrt2}(1+i)-1=}}=\frac{e^{\pi i/8}\pi i}{4\left(\frac1{\sqrt2}+\frac i{\sqrt2}-1\right)}=\ldots$$
I'll stop here as, if there's no mistake, the above number isn't real, as you say someone got.