How do I calculate $$\int_{-\infty}^{\infty} \frac{dw}{1+iw^3}$$ using complex path integrals?
I just need a hint on how to start, not the actual computation, because I need to understand how to deal with similar questions.
Edit: Following @Tavish's comments, I used the residue theorem:
The function has poles at $w=\pm 0.866 +0.5i$ and $w=i$. Now the integral is equal to $$2\pi i [Res(f,0.866 +0.5i)+Res(f,-0.866 +0.5i)]=\frac{2\pi}3.$$
However, I'm more interested in understanding the steps here than finding the answer. For example, how does one know which contour to take? Moreover, is there an alternate way to find this integral?

Consider the integral $$\int_{-\infty}^\infty \frac{dw}{p(w)},$$ where $p(w)$ is a polynomial of degree $\ge 2$. If $p(w)$ has no poles on the real axis (this can be dealt with later), then consider the function $\displaystyle f(z) = \frac{1}{p(z)}$ integrated along the contour consisting of a segment on the real axis from $-R$ to $R$ and closed in the upper half plane by a semicircle of radius $R$. As $R\to \infty$, $\int_{\Gamma_R} f(z)\,dz$ can easily be shown to go to zero, and thus
$$\int_{-\infty}^\infty \frac{dw}{p(w)} = 2\pi i\sum_{z_j \in \text{zeros of }{p(z)}\text{ in upper half plane}} \text{res}_{z=z_j} f(z).$$
If you like, you could just as easily complete the contour in the lower half plane.
On the semicircle, eventually, for large enough $R$,
$$\left| \int_{\Gamma_R} f(z) \, dz \right| \le \int_0^\pi \left|\frac{R i e^{i\theta}}{a_n R^n-a_{n-1}R^{n-1}- \cdots- a_0}\right|\,d\theta \le \int_0^\pi \frac{R }{\frac{a_n}{2} R^n}\,d\theta =\frac{2\pi}{a_n R^{n-1}} \to 0.$$