Cauchy Goursat and removable singularities

Cauchy Goursat extended theorem says that let $f$ be continuous on $D$ and be analytic on $D-{z_0}$ then we still have $\int_{C}fdz =0$ for all closed curve in $D$.

However, i am doing a question where there are like two singularities, $f = \dfrac{\cos z}{z^{2}-(\pi/2)^{2}}$ and i want to use Morera's theorem to construct a entire function $g$, however by using morera, i need to show that $\int_{C}fdz = 0$ for all closed contour $C$ in $\mathbb{C}$, and i am not sure how to use Cauchy Goursat since there are two singularities!

• I think write $\dfrac{1}{z^{2}-(\pi/2)^{2}}=\dfrac{1}{\pi}(\dfrac{1}{z-(\pi/2)}-\dfrac{1}{z+(\pi/2)})$. – Nosrati Mar 10 '17 at 3:36

The extended Cauchy-Goursat Theorem can still be applied even in the case of two isolated singularities. We can just apply it to each singularity separately. If we are integrating around a closed contour $\gamma$ enclosing two removable singularities, we can split $\gamma$ into two separate, but partially overlapping closed contours like so: And then we can say \begin{align} \int_\gamma f(z) \, dz &= \int_{\gamma_1} f(z) \, dz + \int_{\gamma_2} f(z) \, dz \end{align} because the contributions of the overlapping portion of $\gamma_1$ and $\gamma_2$ will cancel because one integral integrates it in one direction, while the other integrates it in the opposite direction.