Evaluate the following integral. The contour is a square centered at the origin with corners at .
The answer is .
You can get this answer using the following formula (which is a special case of Cauchy's Integral Formula):
where is any countor containing .
Alternatively, you can integrate along each part of the curve in the way I outlined in your other question .....
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:
The integrals along the other line segments are done similarly. Then you add together all the bits from each integral.