Let $\gamma: [0,4\pi] \to \mathbb{C}$ be given by
$$\gamma: \gamma(t)=\begin{cases} 3te^{it}, & \text{if $0\le t \le 2\pi$} \\[2ex] 10\pi -2t, & \text{if $2\pi \le t \le 4\pi$.} \end{cases} $$
Evaluate the integral $\int_\gamma (z^2+\pi^2)^{-1}dz$.
The hint of this exercises says Use the Cauchy theorem for multiply connected domains and the Cauchy Integral Formula. However, the curve $\gamma$ is not even closed here, so how can we apply the Cauchy theorem? I would greatly appreciate any help.
Since you are using Cauchy's theorem (as opposed to the residue theorem) you need a little care. Let $\eta$ be the curve joining $\gamma(4\pi)$ to $\gamma(0)$. Call the curve $\gamma$ followed by $\eta$ to be $\gamma+\eta$.
First you must show that $\int_{\gamma+\eta} f(z)dz = 0$ from which it follows that $\int_\eta f(z)dz = -\int_\gamma f(z)dz$