The Cauchy-Goursat theorem for a triangle contour states the following:
Let $\triangle=\triangle(a,b,c)$ be a triangle in an open set $\Omega \subseteq \mathbb{C},p\in \Omega,f:\Omega\rightarrow \mathbb{C}$ continuous and f analytical on $\Omega \setminus \{p\}$. Then:
$\int\limits_{\partial\triangle}f(z)dz=0$ , where $\partial\triangle$ means on and inside the triangle $\triangle$.
The proof then distinguishes a few cases around $p$... but why?:
1) $p \notin \triangle$
2) $p=a$
3) $p \in \triangle$ randomly.
I do understand the proof, but I don't understand what's the purposes of $p$. Why do we even mention it? What's the thought behind this? Some books don't mention it.
Edit:
Proof
Case 1: $ p\not\subset\triangle$. Let $a',\ b',\ c'$ be the midpoints of the segments $[b,\ c],\ [c,\ a],\ [a,\ b]$.
We denote with $\triangle^{j}(j=1,2,3,4)$ the triangles $(a,\ c',\ b'),\ (b,\ a',\ c'),\ (c,\ b',\ a'),\ (a',\ b',\ c')$. Let $I =\displaystyle \int_{\partial\triangle}f(z)dz$. We now have: $ I\ =\sum_{j=1}^{4}\int_{\partial\triangle^{j}}f(z)\mathrm{d}z $ There is a $j_{0}\in\{1,2,3,4\}$ so that $ \left|\int_{\partial\triangle^{j_{0}}}f(z)\mathrm{d}z\right|\geq\frac{|I|}{4} $ Let $\triangle_{1}:=\triangle^{j_{0}}$.
The same construction with $\triangle_{1}$ instead of $\triangle$ yields a triangle $\triangle_{2}$, etc. By induction we get a sequence $(\triangle_{n})$ of triangles with $\triangle\supseteq\triangle_{1}\supseteq\triangle_{2}\supseteq\ldots$, so that
$|I| \displaystyle \leq 4^{n}\left|\int_{\partial\triangle_{n}}f(z)\mathrm{d}z\right|,\ (n\in \mathbb{N})$
Further we have the length $L(\partial\triangle_{n})=2^{-n}L(\partial\triangle)$ and $\displaystyle \lim_{n\rightarrow\infty}$ diam $(\triangle_{n})=0$ because diam $(\triangle_{n})\leq L(\partial\triangle_{n})$. It follows that (Cantor) $ \triangle \bigcap_{n=1}\triangle_{n}=\{z_{0}\}. $ Because $f$ is in $z_{0}$ complex differentiable, there exists for $\varepsilon>0$ a $r>0$ with $ |f(z)-f(z_{0})-f'(z_{0})(z-z_{0})|\leq \varepsilon|z-z_{0}|\ (z\in C(z_{0},\ r)\subseteq\Omega) $ and there is a $n\in \mathbb{N}$ mit $\triangle_{n}\subseteq C(z_{0},\ r)$. For this $n$ we have: $ |z-z_{0}|\leq 2^{-n}L(\partial\triangle)\ (z\in\triangle_{n}) $ Furthermore: $ \int_{\partial\triangle_{n}}f(z)\mathrm{d}z=\int_{\partial\triangle_{n}}f(z)-f(z_{0})-f'(z_{0})(z-z_{0})\mathrm{d}z $
We have: $ \left|\int_{\partial\triangle_{n}}f(z)\mathrm{d}z\right|\leq \varepsilon\cdot(2^{-n}L(\partial\triangle))^{2} $ and thus $ |I|\leq 4^{n}\left|\int_{\partial\triangle_{n}}f(z)\mathrm{d}z\right|\leq \varepsilon(L(\partial\triangle))^{2} $ Because $\varepsilon>0$ was chosen arbitrarly, $I =0$ follows.
$\color{red}{\text{In my point of view, we are now completely done with the proof. But the proof continues, see below}}$
Case 2:
Now, let $p$ be a vertex of $\triangle$, for instance let $p=a$. If $a,\ b,\ c$ lie on the same line, then we have trivially $I=0$. If not, we choose $x\in[a,\ b],y\in[a,\ c]$ near $a$.
Then we have: $ \displaystyle \int_{\partial\triangle}f(z)\mathrm{d}z=\int_{\partial\triangle(a,x,y)}f(z)\mathrm{d}z+\int_{\partial\triangle(x,b,y)}f(z)\mathrm{d}z+\int_{\partial\triangle(b,c,y)}f(z)\mathrm{d}z $ $ =\int_{\partial\triangle(a,x,y)}f(z)dz. $ Because we can make $L(\partial\triangle(a,x,\ y))$ arbitrarily small, $I =0$ follows.
Case 3: If $ p\in\triangle$ arbitrarily, $I =0$ follows from case 2:
$ \displaystyle I\ =\int_{\partial\triangle(a,b,p)}f(z)\mathrm{d}z+\int_{\partial\triangle(b,c,p)}f(z)\mathrm{d}z+\int_{\partial\triangle(c,a,p)}f(z)\mathrm{d}z=0 $
$\color{red}{\text{Why the hassle of introducing } p?}$