I stumbled upon a fast way to characterize poles of order $m$ of a meromorphic function $f$ (on some open set $\Omega$) in this answer here. My question is, does this general strategy always work?
Here's why I think it doesn't always work. Consider $$f(z) = \frac{\cos z -1}{z^2}.$$ According to the general strategy given in the answer, $z = 0$ should be a simple pole (pole of order $1$) as $0$ is a root of $z^2$ of multiplicity $2$ and $0$ is a root of $\cos z - 1$ of multiplicity $1$. Therefore, $0$ is a pole of order $2-1 = 1$.
But then, considering the power series expansion of $\cos z$, we have $$f(z) = -\frac{1}{2!} + \frac{z^2}{4!} - \frac{z^4}{6!} + \ldots$$ So evidently we see here that $z= 0$ is a removable singularity of $f(z)$.
Is there a flaw in how I used the answerer's argument or it is thus true that the general strategy does not always work?