Contour Integral and Complex Identity While studying I came across this problem:
(a) For $z=x+iy$, show that
$$|\cos \pi z|^2=\frac{1}{2}(\cos(2\pi x)+\cosh(2\pi y))$$
(b) For a positive integer let $\gamma N$ be the square connecting the points $\pm N\pm Ni$ oriented in positive direction. Show that 
$$|\cos \pi z|\geq 1$$
for all $z$ on $\gamma N$.
(c) Making use of the contour integral
$$\int_{\gamma N} \frac{1}{z^3\cos \pi z}dz$$
evaluate the sum of the series
$$\sum_{n=1}^\infty \frac{(-1)^n}{(2n+1)^3}$$
I wish I could show more effort, but I honestly don't know where to begin or what the connection between parts is. ANY help appreciated.
 A: For (a), use the cosine addition formula: $\cos{(a+i b)} = \cos{a} \cos{i b} - \sin{a} \sin{i b}$. Note that $\cos{i b} = (e^{i (i b)} + e^{-i (i b)})/2 = (e^{-b}+e^b)/2 = \cosh{b}$.  Similarly, you can show that $\sin{i b} = i \sinh{b}$.  Then 
$$\cos{(a+i b)} = \cos{a} \cosh{b} - i \sin{a} \sinh{b}$$
so that
$$\begin{align}|\cos{\pi z}|^2 &= \cos^2{\pi x} \, \cosh^2{\pi y} + \sin^2{\pi x} \, \sinh^2{\pi y}\\ &= \left (\frac{1+\cos{2 \pi x}}{2} \right )\left (\frac{1+\cosh{2 \pi y}}{2} \right )+\left (\frac{1-\cos{2 \pi x}}{2} \right )\left (\frac{\cosh{2 \pi y}-1}{2} \right )\\ &= \frac12 (\cos{2 \pi x} + \cosh{2 \pi y})\end{align}$$
Note that, on $\gamma_N$, 
$$|\cos{\pi z}|^2 = \frac12 (1+\cosh{2 \pi N}) = \cosh^2{\pi N} \ge 1$$
Therefore, because $|\cos{\pi z}|\ge 1$:
$$\left | \int_{\gamma_N} \frac{dz}{z^3 \cos{\pi z}} \right | \le \frac{8 N}{N^3} = \frac{8}{N^2}$$
Therefore, the integral vanishes as $N \to \infty$.  In that case, the sum of the residues of the poles of the integrand also vanish.  There is a pole of order 3 at the origin, and poles at $z=(2 n+1)/2$ for $n \in \mathbb{Z}$.  For the pole at the origin, the residue is 
$$\frac12 \left[\frac{d^2}{dz^2} \sec{\pi z}\right ]_{z=0} = \frac{\pi^2}{2}$$
For the pole at $z=(2 n+1)/2$, the residue is
$$\frac{2^3}{(2 n+1)^3 (-\pi \sin{(n+1/2)\pi})} = -\frac{(-1)^{n} 8}{\pi (2 n+1)^3}$$
Summing over all $n$, we express that the sum of the residues is zero as
$$-\frac{8}{\pi}\sum_{n=-\infty}^{\infty} \frac{(-1)^n}{(2 n+1)^3} + \frac{\pi^2}{2} = 0 $$
Note that the sum is even in $n$; this the sum from $(-\infty,\infty)$ is twice the sum from $[0,\infty)$.  Therefore
$$\sum_{n=0}^{\infty} \frac{(-1)^n}{(2 n+1)^3} = \frac{\pi^3}{32}$$
