Explanation for applying Cauchy Integral Formula 
I do not understand the last part.
How do you get:
$$\oint_{C_N} f(z) dz = \frac{-7\pi^3}{45} + 4\sum_{n=1}^{N} \frac{\coth(n\pi)}{n^3}$$
How do you derive this, and what part of cauchy's formula is this?
Thanks!
 A: The paragraph above the last part is finding the residues of $f(z)$ at its poles inside $C_N$.  $C_N$ is a simple positively oriented closed contour.  Then you just use the residue theorem to express the integral around $C_N$ in terms of the sum of those residues.
Actually, there's a factor of $\dfrac{1}{2\pi i}$ that I don't see in the formulas given, but maybe the book is using a definition of $\oint dz$ that takes this into account.  The factor of $4$ comes from the fact that the same residue
$\coth(n\pi)/n^3$ comes from four poles, at $n$, $-n$, $ni$ and $-ni$.
A: You get the result from the residue theorem.  As has been pointed out, the integrand
$$f(z) = \frac{\pi \cot{\pi z} \coth{\pi z}}{z^3} $$
has poles at $z= \pm n$ and $z=\pm i n$, for $n \in \mathbb{Z}$.  The poles for $n \ne 0$ are simple, while the pole for $n=0$ has order $5$.  
Note that $\lim_{x\to 0} x \cot{x} = 1$.  Thus, the residue for $n \ne 0$ at $z=\pm n$ is
$$\operatorname*{Res}_{z=\pm n} \frac{\pi \cot{\pi z} \coth{\pi z}}{z^3} = \frac{\coth{\pi n}}{n^3} $$
Note also that $\lim_{x\to 0} x \coth{x} = 1$ and $i \cot{i \pi n} = \coth{\pi n}$.  Thus,
$$\operatorname*{Res}_{z= \pm i n} \frac{\pi \cot{\pi z} \coth{\pi z}}{z^3} = \frac{\coth{\pi n}}{n^3} $$
The above explains the sum on the RHS.
The other piece is the residue at $z=0$.  Given that the pole is of order 5, the residue is
$$\operatorname*{Res}_{z= 0} \frac{\pi \cot{\pi z} \coth{\pi z}}{z^3} = \frac{\pi}{4!} \left [\frac{d^4}{dz^4}(z^2\cot{\pi z} \coth{\pi z})  \right ]_{z=0} $$
That is a pretty horrifying calculation.  An easier way is to return to the definition of the residue, which is simply the coefficient of $1/z$ in the Laurent series of $f(z)$.  Now, use the fact that
$$\cot{\pi z} = \frac1{\pi z} \left (1-\frac13 \pi^2 z^2 - \frac1{45} \pi^4 z^4 + O(z^6) \right ) $$
$$\coth{\pi z} = \frac1{\pi z} \left (1+\frac13 \pi^2 z^2 - \frac1{45} \pi^4 z^4 + O(z^6) \right ) $$
Then
$$\frac{\pi \cot{\pi z} \coth{\pi z}}{z^3} = \frac{1}{\pi z^5} \left (1 - \frac{2}{45} \pi^4 z^4 - \frac1{9} \pi^4 z^4 + O(z^6) \right ) $$
The residue is then
$$-\frac{2}{45} \pi^3 - \frac19 \pi^3 = -\frac{7 \pi^3}{45}$$
as shown above.
