Cauchy-Goursat Theorem
First, a less general theorem that can be shown using Green’s theorem:
If the derivative of a complex function is continuous in a domain containing a simple, closed, piecewise smooth curve and its interior, then
The Cauchy-Goursat Theorem is more general and doesn’t require continuity of :
If is analytic inside and on a closed, piecewise smooth curve , then
Note that has to be analytic both on and inside the piecewise smooth curve . This means that if encloses a singularity, then Cauchy-Goursat can’t be applied directly.
In these cases we can apply an extension of Cauchy-Goursat:
Let be a simple, closed piecewise smooth curve, and , , , be disjoint, simple, closed piecewise smooth curves in the interior of . If is analytic at all points that are both inside or on , and outside or on each , then
This arms us with a method to find the following contour integral:
Since has singularities at and that are completely encircled by , it’s not obvious whether or not has an antiderivative along . However, we can apply the theorem above by encircling the singularities:

Now we can find our contour integral by evaluating the contour integrals on paths around our singularities, as these paths are analytic everywhere outside them but inside .
A useful theorem to proceed from here is the following:
If is a simple, closed, piecewise smooth curve and is interior to , then:
Now, via partial fraction decomposition we have
The following theorems illustrate the nice properties of simply connected domains, where we don’t have to deal with singularities or holes:
When is analytic in a simply-connected domain , the contour integral of around every closed, piecewise smooth curve in vanishes.
When is analytic in a simply-connected domain , the contour integral of is independent of path in .
When is analytic in a simply-connected domain , it has an antiderivative therein.