The question is $I = \int \frac{\cosh(πz)}{z(z^2+1)}dz$ where contour is the circle $|z| = 2$.
My Working:
So, I split the functions as $\cosh(πz)$ and $\frac{1}{z(z^2+1)}$
$I_1$ for the hyperbolic $\cos$ was $0$. (which is correct)
I calculated $I_2$ as $0$ as well. My answer is wrong even though my poles$(0,\pm i)$ were found to be correct. The Wolfram answer matches my working as well.
My Final Answer: $I = 0$
Answer given: $I = 4πi$
How is my answer incorrect?
I can't say what you did that was wrong, since I don't know what you mean when you talk about splitting the integrals. But\begin{align}\int_{|z|=2}\frac{\cosh(\pi z)}{z(z^2+1)}\,\mathrm dz&=2\pi i\left(\operatorname{res}_{z=-i}\frac{\cosh(\pi z)}{z(z^2+1)}+\operatorname{res}_{z=0}\frac{\cosh(\pi z)}{z(z^2+1)}+\operatorname{res}_{z=i}\frac{\cosh(\pi z)}{z(z^2+1)}\right)\\&=2\pi i\left(\frac12+1+\frac12\right)\\&=4\pi i.\end{align}