<s>[INST] Other ways to evaluate the integral $\int_{-\infty}^{\infty} \frac{1}{1+x^{2}} \, dx$? 
$$\int_{-\infty}^{\infty}\frac{1}{x^2+1}\,dx=\pi $$

I can do it with the substitution $x= \tan u$ or complex analysis. Are there any other ways to evaluate this?
 [/INST] Derivation using series the series $\sum_{n=0}^{\infty} \frac{(-1)^n}{2n+1} = \frac{\pi}{4}$. 
The integrand is an even function & break the interval at $1$ and we have 
\begin{eqnarray*}
\int_{-\infty}^{\infty} \frac{dx}{1+x^2} =2 \int_{0}^{\infty} \frac{dx}{1+x^2} =2 \int_{0}^{1} \frac{dx}{1+x^2}+2 \underbrace{\int_{1}^{\infty} \frac{dx}{1+x^2}}_{x \rightarrow \frac{1}{x}}=4 \int_{0}^{1} \frac{dx}{1+x^2}
\end{eqnarray*}
Now geometrically expand the integrand 
\begin{eqnarray*}
\frac{1}{1+x^2} =\sum_{i=0}^{\infty} (-1)^n x^{2n}
\end{eqnarray*}
interchange the order of the integration & sum ... & then perform the each integration.
</s>