Evaluate the sum of the infinite series $1+\cos x + \cos^2 x + \cos ^3 x ...$ for $0<x<\pi$
So am I correct in thinking that $$1+\cos x + \cos^2 x + \cos ^3 x ...=\sum ^\infty _{n=0} \cos^n x$$ which is just a geometric series with common ratio $\cos x$ and first term 1. So the sum of the series should be $$\sum ^\infty _{n=0} \cos^n x =\frac{1}{1-\cos x}$$ However, the answer to the question is $\frac1 2 \csc^2(\frac x 2)$. Is my method not correct or do I need to apply some identities, if so how do I get it into this form? any help would be great.