# Calculate complex curve integral along rectangle

Determine the line/contour integral of:

$$\int_{\gamma}\frac {z}{z^3+1}dz$$ where $$\gamma$$ is the boundary of a rectangle defined for $$0\leq x\leq 2$$ and $$-2\leq y\leq 2$$.

I am almost certain we have to apply Cauchy's Integral Theorem, that is, if $$D\subset \mathbb{C}$$ is open and $$f:D\rightarrow \mathbb{C}$$ is holomorphic, then for $$z_0\in D$$ and $$r>0$$ with $$B_r[z_0]\subset D$$, we have:

$$f(z)=\frac {1}{2\pi i}\int_{\partial B_r(z_0)}\frac {f(\zeta)}{\zeta-z}d\zeta$$

But doesn't this only apply to the boundary of circles? How can we apply this for the boundary of a rectangle? I am quite new learning this concept and would appreciate any help.

• You don't need a circle. Any closed curve is fine. Commented Oct 17, 2018 at 10:13

No, it's not just for boundaries of circles. Rectangles are fine here. On the other hand, the best approach here is perhaps to use the residue theorem. It tells you that your integral is equal to$$2\pi i\left(\operatorname{res}_{z=-1}\left(\frac z{z^3+1}\right)+\operatorname{res}_{z=\omega}\left(\frac z{z^3+1}\right)+\operatorname{res}_{z=\omega^\star}\left(\frac z{z^3+1}\right)\right),$$where $$\omega$$ and $$\omega^\star$$ are the cube roots of $$-1$$ distinct from $$-1$$.

You can also use partial fraction decomposition, write$$\frac z{z^3-1}=\frac A{z+1}+\frac B{z-\omega}+\frac C{z-\omega^\star},$$for an appropriate choice of $$A$$, $$B$$, and $$C$$, and apply three time Cauchy's integral formula.

• We haven't learnt residue theorem yet, but this makes complete sense. I suspected that the theorem works for any closed curve, just wanted to make sure. Thanks for the answer! Commented Oct 17, 2018 at 10:20
• My apologies, I have a couple concerns. Firstly, what do you mean by the cube root of $-1$ distinct from $-1$? Isn't the cube root of $-1$ always equal to $-1$? Also, how would you apply Cauchy's theorem to each term in the partial fraction? I am a bit confused regarding how to integrate along the rectangle. I think I am overthinking this. Commented Oct 17, 2018 at 10:34
• The numbers $\pm\left(\cos\left(\frac\pi3\right)+\sin\left(\frac\pi3\right)i\right)$ are also cube roots of $-1$. And Cauchy's integral formula doesn't change just because you're deling with a rectangle:$$\int_\gamma\frac{f(z)}{z-\chi}\,\mathrm dz=2\pi if(\chi),$$as long as $\xi$ belongs to the region of $\mathbb C$ enclosed by $\gamma$. Commented Oct 17, 2018 at 12:11