# Complex Integral Over a Triangular Contour

Integrate $$\frac{1}{(z^2+1)}$$ over a triangular contour with vertices, (0,0), (2,2), and (-2,2).

I have tried two manual (not using any theorems) methods so far that I think were incorrect. I am thinking about applying Cauchy Integral formula to obtain the answer directly. But the condition to use the formula requires the contour to be piecewise smooth. Is this triangular region piecewise smooth? Can the Cauchy Integral formula be used here?

• $\int \frac1{z^2+1}\ dz = \tan^{-1}z$. Doesn't seem too complex. May 7, 2018 at 5:03
Remember that there is a singularity within your triangle ($i$ is inside), so $f:=\frac{1}{z^2+1}$ is not holomorphic/analytic inside it, hence Cauchy Integral Formula does NOT apply.
You can use Cauchy's Residue Theorem if you know it to get the answer $1/(2i)=-i/2$ almost immediately.
You can also do it directly, but remember to parameterise the curve by say, $\phi$, and multiply the integrand by $\phi'$ (perhaps that was the problem with your manual calculation?)