.cauchy integral formula. $\int \frac{e^{zt}}{\sinh z} \mathrm{d}z$ and $|z|=8$ this is the problem about Cauchy integral formula. I keep making a mistake and find the wrong solution. Can you help me?
So, we know the Cauchy integral formula $\frac{1}{2πi}\int \frac{f(p)}{z-p} \mathrm{d}p$ and since $|z|=8$ then we get $p=0,πi,2πi$ ($\sinh z=\frac{e^z-e^{-z}}{2}$).


*

*for $p=0$,   $f(p)=\frac{2e^{zt} \cdot e^z}{e^z+1}$ and this is equal to $1$. 

*for $p=πi$,  $f(p)=\frac{2e^{zt} \cdot e^z}{e^z-1}$ and this is equal to $\cos πt+i \sin πt$.

*for $p=2πi$, $f(p)=\frac{2e^{zt} \cdot e^z}{e^z+1}$ and this is equal to $\cos 2πt+i \sin2πt$.
Finally,
$\left((\cos 2πt+i \sin2πt)+(\cos πt+i \sin πt)+1 \right) \cdot 2πi$ but apparently this is not the correct solution.
Thanks for help.
 A: The zeros of the denominator $\sinh z$ are all simple, so the residue of
$$\frac{f(z)}{\sinh z},$$
where $f$ is a holomorphic function, in $k\pi i$ is
$$\operatorname{Res}\left(\frac{f(z)}{\sinh z}; k\pi i\right) = \frac{f(k\pi i)}{\sinh' (k\pi i)} = \frac{f(k\pi i)}{\cosh (k\pi i)} = (-1)^k f(k\pi i).$$
Thus we have
$$\begin{align}
\int_{\lvert z\rvert = 8} \frac{e^{zt}}{\sinh z}\,dz &= 2\pi i \sum_{\lvert \zeta\rvert < 8} \operatorname{Res}\left(\frac{e^{zt}}{\sinh z}; \zeta\right)\\
&= 2\pi i \sum_{k=-2}^2 (-1)^k e^{k\pi i t}\\
&= 2\pi i\bigl(1 - 2\cos (\pi t) + 2 \cos (2\pi t)\bigr)
\end{align}$$
in agreement with the official solution.
I must admit that I don't understand your

for $p=0$,   $f(p)=\frac{2e^{zt} \cdot e^z}{e^z+1}$ and this is equal to $1$.

etc. The right hand side does not depend on $p$. If you use Cauchy's integral theorem to replace the circle $\lvert z\rvert = 8$ with small circles around each of the zeros of the denominator so that you can apply the integral formula for each of the small circles, you still would need to write the integrand in the form $\dfrac{g(z)}{z-k\pi i}$, which leads to
$$g(z) = \frac{(z-k\pi i)e^{zt}}{\sinh z} = \frac{2(z-k\pi i)}{e^{2z}-1}e^{z(t+1)} = \frac{2(z-k\pi i)}{e^{2(z-k\pi i)}-1}e^{z(t+1)},$$
and the first factor of that tends to $\dfrac{1}{\exp'(0)} = 1$ for $z\to k\pi i$, so we obtain $g(k\pi i) = e^{k\pi i(t+1)} = (-1)^ke^{k\pi it}$ in accordance with the residues computed above.
