How would one go about determining the Laurent series of such a series as
$$\frac{1+\cos(z)}{(z-\pi)^3}$$
I would like to expand this about the point $z= \pi$ in order to determine the residue however, I tried substitution $x = z-\pi$ so that we can expand;
$$\frac{1+\cos(x+\pi)}{x^3}$$ however the cos term is giving me trouble when it comes to expanding as it always provides so many x terms of the same order and I do not know how to account for this.
You can do it as follows:\begin{align}\frac{1+\cos(z)}{(z-\pi)^3}&=\frac{1+\cos\bigl((z-\pi)+\pi\bigr)}{(z-\pi)^3}\\&=\frac{1-\cos(z-\pi)}{(z-\pi)^3}\\&=-\frac{\sum_{n=1}^\infty\frac{(-1)^n}{(2n)!}(z-\pi)^{2n}}{(z-\pi)^3}\\&=\sum_{n=1}^\infty\frac{(-1)^{n+1}}{(2n)!}(z-\pi)^{2n-3}\\&=\frac1{2(z-\pi)}-\frac1{4!}(z-\pi)+\frac1{6!}(z-\pi)^3-\cdots.\end{align}