Cauchy's Integral Theorem
If is analytic in a @simply-connected domain then for every simple closed @path in
Let By the definition of the contour integral, we have
Because is analytic, the Cauchy-Riemann Equations tell us that and have continuous first partial derivatives, and therefore, we can apply Green's Theorem. Now, we can take the first integral and transform it
But, by Cauchy-Riemann Equations, so this integral evaluates to
Now, for the second integral, using Green's Theorem again, we get
and by Cauchy-Riemann Equations, so this integral also evaluates to which makes the overall integral as well.
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 :
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:
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:
See If is the unit circle, then... and consider path independence and the principle of path deformation. Consider toy contours, particularly a collapsed keyhole contour around the singularity.
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.