Evaluating Complex Integral. I am trying to evaluate the following integrals:
$$\int\limits_{-\infty}^\infty \frac{x^2}{1+x^2+x^4}dx $$
$$\int\limits_{0}^\pi \frac{d\theta}{a\cos\theta+ b} \text{ where }0<a<b$$
My very limited text has the following substitution:
$$\int\limits_0^\infty \frac{\sin x}{x}dx = \frac{1}{2i}\int\limits_{\delta}^R \frac{e^{ix}-e^{-ix}}{x}dx \cdots $$
Is the same of substitution available for the polynomial? Thanks for any help. I apologize in advance for slow responses, I have a disability that limits me to an on-screen keyboard.

Here are the complex variables techniques you have asked for. The first one, consider the complex integral
$$ \int\limits_{C} \frac{z^2}{1+z^2+z^4}dz, $$
where $C$ is the upper half of the circle $z=Re^{i\theta}$ centered at the origin. Check Jordan' lemma. The second one, write it in the form
$$ \int\limits_{0}^\pi \frac{d\theta}{a\cos\theta+ b}= \frac{1}{2}\int\limits_{-\pi}^\pi\frac{d\theta}{a\cos\theta+ b}, $$
since the integrand is an even function, then use the change of variables $ \theta=\pi-\theta$, to write the integral in the form
$$ \frac{1}{2} \int\limits_{-\pi}^\pi \frac{d\theta}{a\cos\theta+ b}= \frac{1}{2}\int\limits_{0}^{2\pi} \frac{d\theta}{a\cos\theta+ b}.$$
Now, use complex variables techniques $z=e^{i\theta}$ where the $C:|z|=1$. For techniques to find the residue see here.
