Why does this function have pole of order n=2, not 3? $\frac{1-cos(z)}{z^4}$, find the order of pole for this function at $z=0$
Initially I thought if you plug in $z=0$ you get $\frac{0}{0^4}$ so one removable singularity, thus pole is of order n=3.
However, if you taylor expand the cosine, you see that the pole order is n=2.
My question is, why is the first method wrong, and when does it/does it not work? (Because some problems the first method works fine)
 A: The order of the pole of $f$ at $z=0$ is the least $k$ such that
$$z^k f(z)$$
has a removable discontinuity at $z=0$. So the pole of this function is of order $2$ if
$$\lim_{z\to 0} z^2\cdot \frac{1-\cos(z)}{z^4}$$
exists and is finite but
$$\lim_{z\to 0} z\cdot \frac{1-\cos(z)}{z^4}$$
is infinite.
Since
$$\cos(z)=1-\frac{z^2}2+\frac{z^4}{4!}-\frac{z^6}{6!}+\cdots,$$
then
$$z^2\cdot \frac{1-\cos(z)}{z^4}=\frac12-\frac{z^2}{4!}+\cdots,$$
so
$$\lim_{z\to 0} z^2\cdot \frac{1-\cos(z)}{z^4}=\frac12.$$
But is easy to see, through the same reasoning, that
$$\lim_{z\to 0} z\cdot \frac{1-\cos(z)}{z^4}=\infty.$$

Of course that
$$\lim_{z\to 0} z^3\cdot \frac{1-\cos(z)}{z^4}$$
is also finite ($0$ indeed, and the same is true for higher exponents), but since $2$ is the least exponent such that the limit
$$\lim_{z\to 0} z^k\cdot \frac{1-\cos(z)}{z^4}$$
is finite, the order of the pole is $2$.
A: The initial problem with your first approach is that $1-\cos z$ has a double zero at 0 (since $\cos$ has slope 0 at 0). In general, if $f$ has a zero of order $k$ at 0 and $g$ a zero or order $j$ at 0 then $f/g$ has a zero of order $k-j$ (where a zero of order $-n$ is a pole of order $n$). 
A: $1 - \cos z= {1 \over 2} z^2 + \cdots $ .
So, ${1 - \cos z \over z^4} = {1 \over 2} {1 \over z^2} + \cdots $ 
A: Because $1-\cos z=0$ when $z=0$  and note that $$\cos z=1-\frac{z^2}{2!}+\frac{z^4}{4!}-\cdots$$ so your function can be written as $$\frac{(\frac{z^2}{2!}-\frac{z^4}{4!}+\cdots)}{z^4}=\frac{\phi(z)}{z^2}$$ where $\phi(z)=\frac{1}{2!}-\frac{z^2}{4!} \cdots $ with $\phi(0) \neq0$ 
