# The Laurent series of $g(z)=\frac{z^n+z^{-n}}{z^2-(a+\frac{1}{a})z+1}$

How to find Laurent series of g(z) ? $$g(z)=\frac{z^n+z^{-n}}{z^2-(a+\frac{1}{a})z+1} \hspace{10mm} \begin{cases} n \in N \\ 0<a<1 \end{cases}$$ answer is : $$g(z)=\sum_{p=-n}^{n+1}\frac{1}{a^{p+n}}.\frac{1-a^{2p+2+2n}}{1-a^2}z^p + \sum_{p=n}^{+ \infty} \frac{1}{a^{p+n}} . \frac{(a^{2n}+1)(1-a^{2p+2})}{1-a^2} z^p \hspace{10mm} (i)$$ I can't understand how . I try to solve, but I can't Please help me. Thank you so much. if Numerator was 1 : $$f(z)=\frac{1}{z^2-(a+\frac{1}{a})z+1}$$ $$z^2-(a+\frac{1}{a})z+1=0 \rightarrow \begin{cases} z_1=a \\ z_2=\frac{1}{a} \end{cases}$$ $$f(z)=\frac{1}{(z-a)(z-\frac{1}{a})}=\frac{\frac{1}{a-\frac{1}{a}}}{z-a}+\frac{\frac{-1}{a-\frac{1}{a}}}{z-\frac{1}{a}}$$ we know: $$(a+b)^n =a^n+\frac{n}{1!}a^{n-1}b+\frac{n(n-1)}{2!}a^{n-2}b^2+...+b^n$$ As regards $$|a|<1$$ Taylor series of f(z) is: $$f(z)=\frac{\frac{1}{a-\frac{1}{a}}}{z-a}+\frac{\frac{1}{a-\frac{1}{a}}}{\frac{1}{a}-z}=(\frac{1}{a-\frac{1}{a}}) \left[ \frac{-\frac{1}{a}}{1-\frac{z}{a}}+\frac{a}{1-az} \right]$$ $$f(z)=(\frac{1}{a-\frac{1}{a}}) \left[ \frac{-1}{a} \sum_{n=0}^{\infty}(\frac{z}{a})^n+a \sum_{n=0}^{\infty} (az)^n \right]$$ $$f(z)=\sum_{p=o}^{\infty} \frac{(1-a^{2p+2})}{a^p(1-a^2)}z^p$$ now if consider $$g(z)=(z^n+z^{-n}) f(z)$$ we have : $$g(z)=(z^n+z^{-n}) \sum_{p=o}^{\infty} \frac{(1-a^{2p+2})}{a^p(1-a^2)}z^p$$ $$g(z)= \sum_{p=o}^{\infty} \frac{(1-a^{2p+2})}{a^p(1-a^2)}z^{p+n} + \sum_{p=o}^{\infty} \frac{(1-a^{2p+2})}{a^p(1-a^2)}z^{p-n} \hspace{10mm} (ii)$$ I can't understand how (ii) transformed to (i)  Edit : (thanks to Hurkyl) if apply the Change of variables , we have: $$p \rightarrow p-n \space for \space first \space \sum \space and \space p \rightarrow p+n \space for \space second \space \sum$$ $$g(z)= \sum_{p-n=o}^{\infty} \frac{(1-a^{2(p-n)+2})}{a^{p-n}(1-a^2)}z^{p-n+n} + \sum_{p+n=o}^{\infty} \frac{(1-a^{2(p+n)+2})}{a^{p+n}(1-a^2)}z^{p+n-n}$$ $$g(z)= \sum_{p=n}^{\infty} \frac{(1-a^{2p-2n+2})}{a^{p-n}(1-a^2)}z^{p} + \sum_{p=-n}^{\infty} \frac{(1-a^{2p+2n+2})}{a^{p+n}(1-a^2)}z^{p}$$ $$g(z)= \sum_{p=n}^{\infty} \frac{(1-a^{2p-2n+2})}{a^{p-n}(1-a^2)}z^{p} + \left[ \sum_{p=n}^{\infty} \frac{(1-a^{2p+2n+2})}{a^{p+n}(1-a^2)}z^{p} +\sum_{p=-n}^{n-1} \frac{(1-a^{2p+2n+2})}{a^{p+n}(1-a^2)}z^{p}\right]$$ $$\sum_{-n}^{\infty}=\sum_{-n}^{n-1}+\sum_{n}^{\infty}$$ $$g(z)=\sum_{p=n}^{\infty}\frac{a^{p+n}(1-a^{2(p-n)+2})+a^{p-n}(1-a^{2(p+n)+2})}{a^{p+n}(1-a^2)a^{p-n}}z^p +\sum_{p=-n}^{n-1} \frac{(1-a^{2p+2n+2})}{a^{p+n}(1-a^2)}z^{p}$$ $$g(z)=\sum_{p=n}^{\infty} \frac{(a^{2n}+1)(1-a^{2p+2})}{a^{p+n}(1-a^2)}z^p+\sum_{p=-n}^{n-1} \frac{(1-a^{2p+2n+2})}{a^{p+n}(1-a^2)}z^{p}$$ now difference between my answer and book is: $$my \space answer : \rightarrow g(z)=\sum_{n}^{\infty}+\sum_{-n}^{\color{red}{n-1}}$$ $$book \space answer : \rightarrow g(z)=\sum_{n}^{\infty}+\sum_{-n}^{\color{red}{n+1}}$$ Please help me to understand where I am wrong

-

\begin{align} g(z) &= \sum_{p=o}^{\infty} \frac{(1-a^{2p+2})}{a^p(1-a^2)}z^{p+n} + \sum_{p=o}^{\infty} \frac{(1-a^{2p+2})}{a^p(1-a^2)}z^{p-n} \\ &= \sum_{(p-n)=o}^{\infty} \frac{(1-a^{2(p-n)+2})}{a^{p-n}(1-a^2)}z^{(p-n)+n} + \sum_{(p+n)=o}^{\infty} \frac{(1-a^{2(p+n)+2})}{a^{p+n}(1-a^2)}z^{(p+n)-n} \end{align}