<s>[INST] Find real part of $\frac{1}{1-e^{i\pi/7}}$ How can you find
$$\operatorname{Re}\left(\frac{1}{1-e^{i\pi/7}}\right).$$
I put it into wolframalpha and got $\frac{1}{2}$, but I have no idea where to begin. I though maybe we could use the fact that $$\frac{1}{z}=\frac{\bar{z}}{|z|^2},$$ where $\bar{z}$ is the conjugate of $z$. Unfortunately, the magnitude doesn't seem to be a nice number. I feel like this might be a trigonometry question in disguise, but converting $e^{i\pi/7}=\cos\left(\frac{\pi}{7}\right)+i\sin\left(\frac{\pi}{7}\right)$ hasn't been very fruitful.
 [/INST] Try this,
$$z=\frac{1}{1+e^{\frac{i\pi}{7}}}=\frac{1}{1+\cos\frac{\pi}{7}+i\sin\frac{\pi}{7}}$$
$$=\frac{1+\cos\frac{\pi}{7}-i\sin\frac{\pi}{7}}{(1+\cos\frac{\pi}{7}+i\sin\frac{\pi}{7})\times(1+\cos\frac{\pi}{7}-i\sin\frac{\pi}{7})}$$
$$=\frac{1+\cos\frac{\pi}{7}-i\sin\frac{\pi}{7}}{(1+\cos\frac{\pi}{7})^2+\sin^2\frac{\pi}{7}}$$
$$=\frac{1+\cos\frac{\pi}{7}-i\sin\frac{\pi}{7}}{2(1+\cos\frac{\pi}{7})}$$
$$=\frac{1}{2}-\frac{i\sin\frac{\pi}{7}}{2(1+\cos\frac{\pi}{7})}$$
And so $Re(z)=\frac{1}{2}$
</s>