Geometrical Interpretation of the Cauchy-Goursat Theorem? The Cauchy-Goursat theorem is really non-intuitive and is very astounding. Can someone geometrically explain to me why its true?
I'm specifically talking about this version of the theorem: 

For some complex function, the closed contour integral over a simply connected region is $0$ if the function is analytic in the region and $2\pi$ if the region contains a single non-analytic point, [where the function is continuous].

 A: It sounds like you want a kind of "visual" proof, or at least intuition. The go-to source for that is Needham's Visual Complex Analysis. Check out page 435 (of the pdf) of the linked book, which offers a few different explanations. Personally, I find the geometric intuition to be the following: if you can shrink the contour to a single point without crossing a singularity of the function, then the integral is 0. Then the idea follows immediately because you have function $f$ bounded by some $M$, (it has no singularities inside the contour!), and you're integrating it on an arbitrarly short loop around a point, of length $\epsilon$, so your integral is bounded above by $M\epsilon$, and $\epsilon$ can be made arbitrarily small. 
So in some sense you can think of a contour as a stretched rubber band, and each singularity as a peg (an imperfect analogy). In other words, it really helps to accept the fact that the choice of contour for contour integration is quite arbitrary (as long as you respect singularities). The precise formulation of this analogy is that what really matters is the winding number of the contour around each singularity. If the winding is 0, then the singularity does not contribute.
A: Just imagine z as a vector. If you're given a function f(z), it will be another vector existing at the point z. Now what are these two vectors z and f(z)? How do you imagine them? Let my z plane be an actual plane with z representing distance from zero. This means 4+3i would be a displacement vector pointing from origin to (4,3). The magnitude of the vector is the distance which is 5. The point has direction as well.f(z) is a vector representing flow of wind which means at point 'z' with what magnitude and direction would you get hit by a wind. 
Now let us for simplicity consider a case where flow of wind is represented by vector f(z)=z? This means as you move farther away from the origin, you'll get hit by wind in the same direction of line connecting you and origin and outwards. I hope you can visualize a radial vector field from the origin. At zero you're safe, since magnitude is zero. As you go away from the origin, you'll be hit by stronger and stronger wind in the same line connecting your position and the origin. The vector just looks like radially outward vectors with increasing magnitude as you go away from origin in any direction.
Now I'll show how the curve 1/z looks around the origin. 1/(z-z0) looks the same. but around z0.
Vector plots of $\frac{1}{z}$ and $z^2$
Now let us take a circular contour around origin. And let's slowly walk through the contour taking dz steps. Remember dz is another complex number which is again on the direction tangential to your circle. I have drawn a circle on the contour. The magnitude of dz for every $d\theta$ you walk around the circle is directly proportional to the radius of the circle (arc $dz = r\times d\theta$). 
When you multiply the complex numbers dz and 1/z you are only left with sum of their angles, while the magnitude of $\frac{1}{z}=\frac{1}{r}$ cancels the r in the $r\times d\theta$ of dz . If you look carefully in the figure, the sum of their angles is always 90. Let's consider a few points. The angles made by the vectors $(<dz,<1/z)$ are (90,0) and (180,-90) at points where circle cuts x-axis and y-axis respectively. This means you are always getting a unit vector with angle 90 when you multiply these two complex numbers. 
WINDING NUMBER : By walking around the circle once and adding(integrating) these products of the complex numbers dz and 1/z, you would have walked $2\pi r$. But your 1/z multiplication cancel's the radius magnitude. So, $2\pi$ magnitude and 90 degree angle represents the sum(integral) of the complex number : $\int{\frac{dz}{z}}$. ($2\pi$ magnitude, 90 phase = $2\pi i$). You can see that when you went around once, the vector rotated by 360 degree. For $z^2$, the vector would have rotated by 720 degree. i. e. at -ve y axis it would have already rotated once. Dividing the final complex number by $2\pi i$ is just making the answer = number of times the rotation of vector when you went once in the circle which is the winding number. The sum of angles maybe positive or negative which makes the winding number have a sign.
I hope this has given some kind of insight.
A: The function $\;\frac{(z-3)^2}z\;$ fulfills the conditions in the simple connected region $\;|z|\le 1\;$ , having one single non-analytic point, yet
$$\oint\limits_{|z|=1}\frac{(z-3)^2}zdz=\left.2\pi i\left(z-3\right)^2\right|_{z=0}=18\pi i$$
A: By rectangles: It will help to draw as you read through. Also this assumes basic understanding of real analysis one concepts.


Let $R$ be a rectangle, and let $f$ be a function holomorphic on $R$. Then
  $$
\int_{\partial R}f = 0
$$
  where $\partial R$ is the boundary of the rectangle. 


Now let's break this rectangle into four rectangles. Then
$$
\int_{\partial R}f = \sum_{i = 1}^4\int_{\partial R_i}f\Rightarrow
\biggl\lvert\int_{\partial R}f\biggr\rvert \leq \sum_{i = 1}^4\biggl\lvert\int_{\partial R_i}f\biggr\rvert
$$
There is one rectangle, say $R_1$, such that 
$$
\biggl\lvert\int_{\partial R_1}f\biggr\rvert\geq \frac{1}{4}\biggl\lvert\int_{\partial R}f\biggr\rvert
$$
Now we can break rectangle one up into four rectangles and again we have a rectangle in $R_1$ say $R_2$ such that
$$
\biggl\lvert\int_{\partial R_2}f\biggr\rvert\geq \frac{1}{4}\biggl\lvert\int_{\partial R_1}f\biggr\rvert
$$
We can continue this sequences ad infinitum such that
$$
\biggl\lvert\int_{\partial R_{n+1}}f\biggr\rvert\geq \frac{1}{4}\biggl\lvert\int_{\partial R_n}f\biggr\rvert\geq\frac{1}{4^n}\biggl\lvert\int_{\partial R}f\biggr\rvert
$$
Do you see how this is working by breaking up each rectangular region into 4 other rectangles and so on?
Now, let $\ell_n$ be the length of $\partial_n$. Then $\ell_{n+1}=\frac{1}{2}\ell_n$. By induction, we have that
$$
\ell_n = \frac{1}{2^n}\ell_0
$$
where $\ell_0$ is the length of $\partial R$. We will now use concept from a first course in real analysis that 
$$
\bigcap_{n=1}^{\infty}R_n = z_0
$$
where $z_0$ is a single point. Now the diameter of $R_n\to 0$ as $n\to\infty$, so its immediate that there is only one point in the intersection. Let $a_n$ be the center of sequence of $R_n$. This sequence is a Cauchy sequence since if given an $\epsilon >0$, let $N$ be such that the diameter of $R_n$ is less than $\epsilon$. If $n,m>N$, then $a_n$ and $a_m$ lie in $R_n$ and so
$$
\lvert a_n - a_m\rvert\leq\text{diameter } R_n<\epsilon
$$
Let our point $z_0 = \lim a_n$. Then $z_0$ lies in each rectangle since each rectangle is close. Thus, $z_0$ is in the intersection. Now $f$ is differentiable at $f$, there is a disc $U$ centered at $z_0$ such that for all $z\in U$, we have
$$
f(z) = f(z_0) + f'(z_0)(z-z_0)+(z-z_0)h(z)
$$
where $\lim_{z\to z_0}h(z) = 0$. If $n$ is sufficiently large, $R_n\subset U$ and
$$
\int_{\partial R_n}f(z)dz = \int_{\partial R_n}f(z_0)dz + \int_{\partial R_n}f'(z_0)(z-z_0)dz+\int_{\partial R_n}(z-z_0)h(z)dz
$$
The first two integrals are zero since
$$
\oint_{\gamma}z^ndz=0
$$ 
for $n\in\mathbb{Z}$ where $n\neq 1$. Thus, we have
$$
\int_{\partial R_n}f=\int_{\partial R_n}(z-z_0)h(z)dz
$$
so
$$
\frac{1}{4^n}\bigg\lvert\int_{\partial R_n}f\bigg\rvert\leq\bigg\lvert\int_{\partial R_n}f\bigg\rvert\leq\bigg\lvert\int_{\partial R_n}(z-z_0)h(z)dz\bigg\rvert\leq\frac{1}{2^n}\ell_0\text{ diameter }R^n\sup\lvert h(z)\rvert
$$
The diameter of $R_n$ is $\frac{1}{2^n}$ diameter of $R$ so
$$
\bigg\lvert\int_{\partial R_n}f\bigg\rvert\leq\ell_0\text{ diameter }R\sup\lvert h(z)\rvert
$$
As $n\to\infty$, $\ell_0\text{ diameter }R\sup\lvert h(z)\rvert\to 0$ so
$$
\int_{\partial R}f=0
$$ 
