I'm reading "Time Series Analysis and Its Applications with R examples", 3rd edition, by Shumway and Stoffer, and I don't really understand a proof. This is not for homework, just my own edification. It goes like this: Σt=1n cos2(2πtj/n) = ¼ ∑t=1n (e2πitj/n - e2πitj/n)2 = ¼∑t=1ne4πtj/n + 1 + 1 + e-4πtj/n = n/2. I'm don't see how the last equality follows. I think, somehow, that the e4πtj/n and e-4πtj/n terms cancel out, but how? Any ideas?