While the Residue Theorem is used to easily solve integrals along improper bounds, I was wondering if it could be used to find indefinite integrals (antiderivatives) and when.
For example, on $\int\frac{1}{x^3+1}dx$ I was thinking to consider both $\int_{-\infty}^{n}\frac{1}{x^3+1}dx$ and $\int_{n}^{\infty}\frac{1}{x^3+1}dx$ to find the indefinite integral $F(n)$. If we were solving $\int_{-\infty}^{\infty}\frac{1}{x^3+1}dx$ we would create a closed contour including $-\infty$ to $\infty$ on the Real axis, so by a similar method we could 'split up' this single big closed contour into two (half as) big closed contours, one including $-\infty$ to $n$ and another including $n$ to $\infty$. One issue that I immediately run into is that there are singularities at $z=e^{i\pi/3}, e^{i\pi},e^{i5\pi/3}$ but each one would be at two different $z_0$ centers which depend on $n$ (and which integral it's within). I was thinking the contours could be centered at $z_0 = \lim_{R \to -\infty} \frac{R+n}{2}, \lim_{R \to \infty} \frac{R+n}{2}$ respectively with radius $\lim_{R \to \infty} \frac{R}{2}$ but I'm not sure where to go from here.