I am really stuck trying to find the real parts to both sides of this equation.

1 + exp(theta(i)) + exp(2theta(i)) + .... + exp((n-1)theta(i)) = (exp(ntheta(i)) - 1) / (exp(theta(i)) -1)

I think that the real part of the left hand side is

1 + cos(theta) + cos(2theta) + ..... + cos((n-1)theta)

i have no idea what the real part is for the right.

Someone please help