the question in the title. im working on a z- transform problem. to find the Z - transform of $x(n) = a^ncos(\omega n)u(n)$, u(n) being the step unit function
essentially i come down to the answer being
$$X(z) = (1/2) [\sum_{n=0}^\infty (ae^{j\omega}z^{-1})^n + \sum_{n=0}^\infty (ae^{-j\omega}z^{-1})^n]$$
however in the solution they were able to simply this answer and thus removing the summation.
solution is
$$(\frac12) [\frac{1}{1-ae^{j\omega}z^{-1}} + \frac{1}{1-ae^{-jw}z^{-1}}]$$
It is a standard result for the sum of a geometric series (where $x$ may be real or as we need here, complex): $$ \sum_{k=0}^n x^{k}= \frac{1-x^{n+1}}{1-x} $$ which you can see by multiplying out $(1-x)\sum_{0}^nx^k$ which gives a telescoping sum equal to $1-x^{n+1}$.
Now if $|x|<1$ the sum converges as $n\to \infty$ and the result is: $$ \sum_{k=0}^{\infty} x^{k}= \lim_{n \to \infty}\frac{1-x^{n+1}}{1-x}=\frac{1}{1-x} $$
Other ways to see this is to consider the binomial series , or the Maclaurin series for: $(1-x)^{-1}$