I would like to classify the singularities of the complex function
$$f(z)=z^{-2}\cos\left(\frac{z\pi}{z+1}\right).$$
Clearly $z=0$ is just a pole of order 2.
The only other singularity i can see is $z=-1$
In this case, the numerator of the cosine function is:
$$e^{\frac{iz\pi}{z+1}}+e^{\frac{-iz\pi}{z+1}}$$
Just like how $e^{1/z}$ has an essential singularity at zero, the function above has a essential singularity at $z=-1$
Is this argument correct? I am not sure if the second exponential term could somehow cancel out the behaviour of the first, resulting in no singularity at $z=-1$.
A second argument that i can think to justify this is that as $z$ tends towards -1, the cosine function will oscillate and not have a defined limi. THis also jsutifies it being an essential singularity, correct?