Are my answers correct in evaluating integrals in complex analysis Are the solution answers correct ? I would appreciate it if you could confirm, i have submitted the evaluate integral questions and solution workouts in images below.
I am posting on behalf of my friend, English is her second language so i will help to convey to her anything she does not quite understand, maths is not my field however she can interpret any input in a maths sense.
Here are images of the two questions, and solutions, solution 1 is at the top and solution 2 at the bottom.
any input is greatly appreciated!



Many thanks!
 A: Both solutions are wrong.
Concerning the solution to question number 1, it makes no sense to say that the number of zeros is $\frac{2n+1}2$ and that the number of poles is $n$. What is $n$? There is no $n$ in the question.
If $f(z)=\sin(\pi z)$, the $f$ has $7$ zeros ($0$, $\pm1$, $\pm2$, and $\pm3$) when $|z|<\pi$, and $0$ poles. Therefore\begin{align}\int_{|z|=\pi}\pi\cot(\pi z)\,\mathrm dz&=\int_{|z|=\pi}\frac{f'(z)}{f(z)}\,\mathrm dz\\&=2\pi i\times(7-0)\\&=14\pi i.\end{align}
Concerning the solution to question number 2, the answer cannot be $0$, since we are dealing here with the integral of a function which takes only values greater than $0$ (when $z\in\Bbb R$). Note that the zeros of $z^4+4$ are $\pm\sqrt2e^{\pi i/4}$ and $\pm\sqrt2e^{3\pi i/4}$. Of these four, those with imaginary part greater than $0$ are $\sqrt2e^{\pi i/4}$ and $\sqrt2e^{3\pi i/4}$. So, your integral is equal to\begin{align}2\pi i\left(\operatorname{res}\left(\sqrt2e^{\pi i/4},\frac1{z^4+4}\right)+\operatorname{res}\left(\sqrt2e^{3\pi i/4},\frac1{z^4+4}\right)\right)&=2\pi i\left(\frac{-1-i}{16}+\frac{1-i}{16}\right)\\&=\frac\pi4.\end{align}
