I'm having trouble trying to understand what I'm doing wrong in solving this complex integral.
I partitioned the square into 4 different parameterized curves (each curve being 1 of the sides of the square) and added the 4 integrals. The final answer I got was zero, but the book says the answer is $πi$. I cannot for the life of me understand how they got such an answer. Any tip will be greatly appreciated. Thanks!
EDIT: I parameterized the square as such
$c_1(t)=t-i$
$c_2(t)=1+it$
$c_3(t)=-t+i$
$c_4(t)=-1-it$, with $-1\leq t\leq 1$ for all the $c$ curves.
I obtained the following complex integrals via $\int_{-1}^{1} f(c(t))c'(t)dt$:
For $c_1$, $\int_{-1}^{1}\frac{1}{2(t-i)+1}dt$ = $\frac{1}{2}ln(3-2i) - \frac{1}{2}ln(-1-2i)$.
For $c_2$, $\int_{-1}^{1}\frac{i}{2(1+it)+1}dt$ = $\frac{1}{2}ln(3+2i) - \frac{1}{2}ln(3-2i)$.
For $c_3$, $\int_{-1}^{1}\frac{-1}{2(-t+i)+1}dt$ = $\frac{1}{2}ln(-1+2i) - \frac{1}{2}ln(3+2i)$.
For $c_4$, $\int_{-1}^{1}\frac{-i}{2(-1-it)+1}dt$ = $\frac{1}{2}ln(-1-2i) - \frac{1}{2}ln(-1+2i)$.
I added the 4 integrals up and they all cancelled out to zero. But I don't see how $πi$ was obtained.