Evaluate the following integral. The contour is a square centered at the origin with corners at .
20.
My mistake at not loking closer - sorry.
The answer is $\displaystyle 2 \pi i (i) = - 2 \pi$.
You can get this answer using the following formula (which is a special case of Cauchy's Integral Formula):
$\displaystyle \oint_{\Gamma} \frac{f(z)}{z-\alpha} dz = 2\pi i f(\alpha)$ where $\displaystyle \Gamma$ is any countor containing $\displaystyle \alpha$.
Alternatively, you can integrate along each part of the curve in the way I outlined in your other question .....
Alternatively, you can integrate directly:
I'll do the integral along the line segment Im(z) = 2 from z = 2 + 2i to z = -2 + 2i:
Note that on this line segment, z = x + 2i => dz = dx:
$\displaystyle \int_{x = 2}^{x = -2} \frac{x + 2i}{{\color{red} (x + 2i) - i}} \, dx = \int_{x = 2}^{x = -2} \frac{x + 2i}{x + i} \, dx $
$\displaystyle = \int_{x = 2}^{x = -2} 1 + \frac{i}{x + i} \, dx = \int_{x = 2}^{x = -2} 1 \, dx + i \int_{x = 2}^{x = -2}\frac{1}{x + i} \, dx $
$\displaystyle = -4 + i \left( \ln(x + i) \bigg{|}_{2}^{-2} \right) = -4 + i (\ln (-2 + i) - \ln (2 + i) )$
$\displaystyle = -4 + i \left( \left[ \ln(\sqrt{5}) + \left( \pi - \arctan \left( \frac{1}{2} \right)\right) \, i \right] - \left[ \ln(\sqrt{5}) + \left(\arctan \left( \frac{1}{2} \right)\right)\, i \right] \right)$
$\displaystyle = -4 + i (\pi \, i) = -4 - \pi$.
The integrals along the other line segments are done similarly. Then you add together all the bits from each integral.
It is even easier than that. $\displaystyle (z)' = 1$. (So it has a primitive. And integrals over piecewise smooth closed curves of a function possesing a primitive is zero. )
And interesting question to ask on an exam is why then $\displaystyle \oint z^{-1} dz \not = 0$. How about $\displaystyle \log z$?