Residue Theorem and Improper Integral 
Let $a$,$b$, $c$ be real numbers such that $a>0$, $c>0$ and $b^2 <4ac$. Use the Residue Theorem to compute the following integral
  $$\int_{-\infty}^\infty\frac{1}{ax^2+bx+c}dx$$

Super lost with this question! I've gotten to the point of getting the poles with the quadratic equation, but I'm not sure whereas to go from there. 
 A: The roots of $az^2+bz+c$ are given by $z=-\frac b{2a}\pm \frac{\sqrt{b^2-4ac}}{2a}=-\frac b{2a}\pm i\frac{\sqrt{4ac-b^2}}{2a}$. 
When $a>0$ and $b^2-4ac<0$, the pole of $f(z)=\frac{1}{az^2+bz+c}$ at $z=-\frac b{2a}+i \frac{\sqrt{4ac-b^2}}{2a}$ is in the upper half plane, while the pole at $z=-\frac b{2a}-i \frac{\sqrt{4ac-b^2}}{2a}$ is in the lower half plane.
Hence, from the residue theorem, we have for $a>0$ and $b^2-4ac<0$
$$\int_{-\infty}^\infty \frac{1}{ax^2+bx+c}\,dx=2\pi i \text{Res}\left(\frac{1}{az^2+bz+c}, z=-\frac b{2a}+i\frac{\sqrt{4ac-b^2}}{2a}\right)$$
Can you finish now?
A: I would say you do not need Complex Analysis or the residue theorem, just the good old completion of the square. $ax^2+bx+c = \frac{1}{4a}\left[(2ax+b)^2+(4ac-b^2)\right]$, hence
$$ \int_{\mathbb{R}}\frac{dx}{ax^2+bx+c}=4a\int_{\mathbb{R}}\frac{dx}{(2ax+b)^2+(4ac-b^2)}\stackrel{x\mapsto\frac{z}{2a}}{=}2\int_{\mathbb{R}}\frac{dz}{(z+b)^2+(4ac-b^2)} $$
and by letting $z=u-b$ the last integral turns into
$$ 2\int_{\mathbb{R}}\frac{du}{u^2+(4ac-b^2)}\stackrel{u\mapsto v\sqrt{4ac-b^2}}{=} \frac{2}{\sqrt{4ac-b^2}}\int_{\mathbb{R}}\frac{dv}{v^2+1} = \color{blue}{\frac{2\pi}{\sqrt{4ac-b^2}}}.$$
This can be seen also as a consequence of a useful lemma: if $Q(x_1,\ldots,x_n)$ is a positive definite quadratic form in $\mathbb{R}^n$, associated to a symmetric matrix $M$, then
$$ \int_{\mathbb{R}^n} e^{-Q(x_1,\ldots,x_n)}\,d\mu = \frac{\pi^{n/2}}{\sqrt{\det M}}.$$
The previous identity follows by considering $n=2$ and $M=\begin{pmatrix}a & b/2 \\ b/2 & c\end{pmatrix}$.
