I'm trying to determine the order of the pole in the complex expression
$$f(z)=\frac{1}{(1-\cos(z))^2}$$
I have determined the pole to be $z=2\pi n, n\in \mathbb{Z}$.
However, when I use the equation $\lim\limits_{z\rightarrow 2\pi n}[(z-2\pi n)^k f(z)]$ with $k=1$, it equals $\frac{0}{1}=0$ or that the function is analytical in the neighborhood. I have used L'Hôpital's rule repeatedly to obtain this result. I checked my answer with Wolfram Alpha, and it's supposed to have a pole of order $4$ and $z=2\pi n$. Where am I going wrong?