# Series - calculating the sum

I need to analyze the series $\sum_{n=0}^\infty{x^n\cos(\frac{n\pi}{2})}$, and I have already shown that it converges. Now I am trying to find the sum, and I noticed that $\cos(\frac{n\pi}{2})$ gives a sequence ${1; 0; -1; 0; 1;...}$, but how do I find the general term of this sequence generated by the $\cos$ to find the sum?

I am still new to series, so far I am trying to transform the series into a sum of terms of a geometric progression. Is there any other way to do it easily?

The series can be written out as: $1-x^2+x^4-...$ which is a geometric series with inital term 1 and ratio $-x^2$. therefore it converges for $|x| < 1$ and equals $\frac{1}{1+x^2}$