$\int_{-\infty}^{\infty} \frac{1}{x^2 +2} \, dx$ I'd just like to check my work. My professor didn't give us any good examples, so I'm not sure I'm doing this right.
The question is

Evaluate 
  $\displaystyle \int_{-\infty}^\infty \frac 1 {x^2 +2} \, dx$

Here's my work.
First, there exist two singularities at $x=\pm \,i\, \sqrt2 \ \ $. i.e., $x^2+2=(x+i\sqrt2)(x-i\sqrt2)$. Therefore, $C_1 : \ z(t)=Rt, \ -1 \le t \le 1 \ ; \ C_2 : \ z(\theta)=Re^{i\theta}, \  0 \le \theta \le \pi  $
 $$ \int_{-\infty}^\infty \frac 1 {x^2 +2} \, dx \Rightarrow \int_{C_1+C_2} \frac{dz}{(z+i\sqrt2)(z-i\sqrt2)} $$
Using the Cauchy Integral Formula, choose $z_0=i\sqrt2$ and $ g(z)=1(z+i\sqrt2) \ $ s.t. $f(z)=g(z)/(z-i\sqrt2)$
$$ \therefore \int_{C_1+C_2} \frac{dz}{(z+i\sqrt2)(z-i\sqrt2)}=2\pi i \ g(i\sqrt2) = \frac{2\pi \ i}{2i\sqrt2}=\frac{\pi \sqrt2}{2}$$
My main concern is that I didn't set up my contour integral correctly. Any advice would be greatly appreciated, thank you.
===========
Edit: Correctly finishing the problem.
$$ \therefore \int_{-\infty}^{\infty} \frac{dx}{x^2+2} = \lim_{R \rightarrow \infty}\int_{C_1+C_2} \frac{dz}{(z+i\sqrt2)(z-i\sqrt2)} = \frac{\pi \sqrt2}{2} $$
 A: You've got the right number, but you need to explain why $\displaystyle \lim_{R\to\infty} \int_{C_1+C_2} = \int_{-\infty}^\infty.$
Note that $\displaystyle \lim_{R\to\infty} \int_{C_1} = \int_{-\infty}^\infty,$ so you need to show that $\displaystyle \lim_{R\to\infty} \int_{C_2} =0.$
The length of the curve $C_2$ is $\pi R.$ Find the maximum value $M$ of the function $1/(z^2+2)$ on the curve $C_2$ and conclude that the absolute value of the integral is $\le M\pi R$, and try to show that $M\pi R\to0$ as $R\to\infty.$ (The value of $M$ should depend on $R.$)
One thing that can tell you that the bottom line number that you get is correct is that this integral can easily be evaluated by other methods:
\begin{align}
& \int_{-\infty}^\infty \frac{dx}{x^2+2} = \int_{-\infty}^\infty \frac{dx/\sqrt 2}{( x/\sqrt 2\,)^2 + 1} \cdot \frac 1 {\sqrt 2} = \frac 1 {\sqrt2} \int_{-\infty}^\infty \frac{du}{u^2+1} \\[10pt]
= {} &\frac 1 {\sqrt 2} \cdot \left( \lim_{u\to\infty} \arctan u - \lim_{u\to-\infty} \arctan u \right) = \frac 1 {\sqrt2} \cdot\left( \frac \pi 2 - \left( -\frac \pi 2 \right) \right) = \frac \pi {\sqrt2}.  
\end{align}
