# Complex integral:- $\int_0^\infty \frac{1}{x^3+1} dx$ using an unusual contour

Given the integral $$I:= \int_0^\infty \frac{1}{x^3+1} dx$$.

There are various ways of solving it such as Cauchy's residues theorem, partial fraction. I am interested in solving it using the residues theorem but choosing a different contour than the ones i was able to find here (Integrating $\int_0^{\infty} \frac{dx}{1+x^3}$ using residues.). In addition, I would focus only in the part in which i can spot i made the mistake. Now lets jump into the problem:

The contour i want to use is half circle centered at z=R and let R approach infinity as shown in the picture. The integral over the contour is equal to the sum of the integrals over $$c_1$$ and $$c_2$$ as shown in the picture. The integral over $$c_1$$ is simply I as defined above. For the integral over $$c_2$$ lets use z=R+R$$e^{i\theta}$$, $$\theta$$ goes from 0 to $$\pi$$ ,dz=$$Rie^{i\theta}d\theta$$ hence the integral over $$c_2$$ (lets name it $$I_2$$) becomes $$I_2=\int_0^\pi \frac{Rie^{i\theta}}{R^3(1+e^{i\theta})^3+1} d\theta$$ , as R approaches infinity $$I_2$$ approaches zero leaving us with the integral over the contour equals I. Now lets use the residues theorem to obtain I=$$2{\pi}iRes(\frac{1}{z^3+1})$$.

I have calculated the residues and used it in a different calculation using a different contour and got the correct answer which means the mistake is somewhere in my contour choosing but i dont know where. I would like to know what i did wrong.

Your error is estimating the semi-circular integral. The integrand is $$\frac{Rie^{i\theta}}{R^3(1+e^{i\theta})^3+1}$$. As $$\theta \to \pi$$, we have $$1+e^{i\theta} \to 0$$ and the denominator $$\to 1$$. In fact, $$\lim_{R\to\infty}\int_0^\pi \frac{Rie^{i\theta}}{R^3(1+e^{i\theta})^3+1}\,d\theta$$ is something like $$0.6-1.0 i$$, not $$0$$.

In fact, according to Maple, $$\int \frac{Rie^{i\theta}}{R^3(1+e^{i\theta})^3+1}\,d\theta$$ has a symbolic antiderivative in terms of logarithms and arctangents. From that we get $$\lim_{R\to\infty}\int_0^\pi \frac{Rie^{i\theta}}{R^3(1+e^{i\theta})^3+1}\,d\theta = \frac{\pi}{3\sqrt3} - i\,\frac{\pi}{3} .$$ Conclusion: it is not zero.
• See here ... https://www.wolframalpha.com/input?i=integrate+100*I*exp%28I*theta%29%2F%281000000*%281%2Bexp%28I*theta%29%29%5E3%2B1%29+from+theta%3D0+to+theta%3DPI Dec 7, 2023 at 21:05
To reiterate GEdgar's post, the upper bound on the integral in question does not converge to $$0$$ for all $$\theta\in[0,\pi]$$:
$$\left\lvert \int_0^\pi \frac{i R e^{i\theta}}{R^3 \left(1+e^{i\theta}\right)^3 + 1} \, d\theta \right\rvert \le \frac{\pi R}{\left\lvert R^3 \left(1+e^{i\theta}\right)^3 + 1\right\rvert} \le \frac{\pi R}{\left\lvert 2^{3/2} R^3 (1 + \cos\theta)^{3/2} - 1 \right\rvert}$$
As $$\theta\to\pi^-$$, $$1+\cos\theta\to0$$ and the upper bound on the integral would be $$\pi R \not \to 0$$.