Closed path integral equals $0$ without $f$ being holomorphic everywhere The closed path integral
$$\int_{\gamma}\frac1{z^2}dz$$
equals $0$ on the unit circle. So far as I can tell, this is not a consequence of Cauchy-Goursat's theorem, because $\frac1{z^2}$ is not holomorphic on $z=0$, and the theorem requires the function be holomorphic inside and on the curve. Is this correct?
 A: With a lot more grind, you can use Cauchy to show the result.
Excuse the crude drawing.

Let $R>0$ and consider the path shown above. The path starts where
the unit circle intersects the line $\operatorname{im} z = { 1\over R}$ and $\operatorname{re} z >0$, follows the unit circle until
it intersects the line $\operatorname{im} z = -{ 1\over R}$ and $\operatorname{re} z >0$; call this sub path $\gamma_{1,R}$.
Continue in a straight line parallel to the real axis to where the $R$ circle intersects $\operatorname{im} z = -{ 1\over R}$ and $\operatorname{re} z >0$;
call this sub path $l_{-R}$.
The sub paths $-\gamma_{R,R}$, $-l_R$ are described in a similar fashion.
Note that by continuity, $\lim_{R \to \infty} \int_{\gamma_{1,R}} f = \int_\gamma f$.
Since $f(z) = {1 \over z^2}$ is analytic on the simply connected set $\mathbb{C} \setminus [0,\infty)$, we see that
$\int_{\gamma_{1,R}+l_{-R}+(-\gamma_{R,R})+(-l_R)} f = 0$.
We note that
$\int_{l_{-R}} f + \int_{-l_{R}} f = 2Ri ({1\over 1+R^2} - {1 \over 1+R^4})$ and 
$|\int_{\gamma_{R,R}} f | \le {2 \pi \over R}$.
Since this is true for any $R>0$ it follows that $\int_\gamma f = 0$.
A: Yes, this does not follow from Cauchy, but instead one can prove it by direct calculation.
A: This indeed does not follow from Cauchy.
Parametrize $\gamma$ by $t \mapsto \exp(it)$ where $t \in [0,2\pi)$.
Then:
$$\begin{array}{rcl}
\displaystyle \int_\gamma \frac1{z^2} \mathrm dz
&=& \displaystyle \int_0^{2\pi} \frac1{\exp(it)^2} \mathrm d\exp(it) \\
&=& \displaystyle \int_0^{2\pi} \frac{i\exp(it)}{\exp(it)^2} \mathrm dt \\
&=& \displaystyle \int_0^{2\pi} i\exp(-it) \mathrm dt \\
&=& \displaystyle \exp(-it)_0^{2\pi} \\
&=& 0
\end{array}$$

Invoking residue theorem is circular because the steps to establish that the integral of a Laurent series is just $2\pi i$ times the coefficient of $z^{-1}$ relies on the fact that the integral vanishes for $z^k$ where $k \ne -1$, and the proof relies on integrating over a unit circle.
