I wish to calculate the following integral:
$$\oint_{\gamma}z^ndz$$
$\gamma$ is a triangle with vertices at $0,1,i$, in the positive direction and $n\in \mathbb Z$.
Here is what I think, please correct me if I'm wrong
For $n\ge 0$ $z^n$ is analytic on and inside the triangle, and $\gamma$ is a closed path, so $\oint_{\gamma}z^ndz=0$
For $n<0$ the function is not defined at $z=0$, so I think can't use the same theorem.
I tried calculating it using the following parameterization:
$$\gamma(t)=\begin{cases} \gamma_1 && t\in[0,1] && t \\ \gamma_2 && t\in[0,1] && (1-t) + i\cdot t \\ \gamma_3 && t\in[0,1] && (1-t)i \end{cases}$$
But since I don't know $n$, I don't think I can solve it.
Edit: I think I can use Green theorem, Is that right?
For $n\ge 0$, I was correct.
For $n<0$, the function is not defined at $0$, so this integral is unsolvable.