<s>[INST] If $\sum_{n=-2}^{\infty}\cos^n x=8$, then find $x.$ Let $0<2x<\pi$. If $$\sum_{n=-2}^{\infty}\cos^n x=8,$$ then please find $x.$ 
I tried $\sum_{n=-2}^{\infty}\cos^n x=\frac{1}{1-\cos x}+\frac{1}{\cos x}+\frac{1}{\cos^2 x}=\frac{1+\cos x}{\cos^2 x \sin^2 x}=8.$ But I cant find $x.$
 [/INST] Hint: If $-1 \lt \cos(x)\lt 1$ and $\cos(x)\ne 0$, we get that:
$$
\begin{align}
\sum_{n=-2}^{\infty} \cos(x)&=\frac{1}{\cos^2(x)}+\frac{1}{\cos(x)}+\frac{1}{1-\cos(x)}\\
&=\frac{1-\cos(x)+(1-\cos(x))\cos(x)+\cos^2(x)}{(1-\cos(x))\cos^2(x)}\\
&=\frac{1}{(1-\cos(x))\cos^2(x)}
\end{align}
$$
</s>