Find integral from 1 to infinity of $1/(1+x^2)$ I am practicing for an exam and am having trouble with this problem. Find the integral from 1 to infinity of $\frac{1}{1+x^2}$. I believe the integral's anti-derivative is $\arctan(x)$ which would make this answer $\arctan(\infty)-\arctan(1)$ but from here I'm lost. I did find out that this comes out to $\pi/4$ but I don't know why.
 A: $$\int_1^\infty \frac{dx}{x^2+1} = \arctan x\bigg|_1^\infty = \lim_{x \to \infty}\arctan x - \arctan 1 = \frac{\pi}{2} -\frac{\pi}{4} = \frac{\pi}{4}$$
as you found.
A: Essentially, your question appears to be "Why does $\lim_{x\to\infty}\arctan{x} = \frac{\pi}{2}$?"
Remember that
$$\theta = \arctan\left(\frac{y}{x}\right)$$
When will $\frac{y}{x}\to\infty$?  That's when $x \to 0$.  
Think of a right triangle with height $y$ and base $x$.  $\theta$ is the angle between $x$ and the hypotenuse.  As $x$ gets smaller and smaller, what does $\theta$ get close to?  Well, $\theta$ approaches 90 degrees or $\frac{\pi}{2}$.
EDIT:
As requested, here's a picture to illustrate this idea.  The angle (in degrees) is displayed inside the tangent function, alongside the fraction $\frac{y}{x}$:

A: With contour integration we will calculate $\int_{0}^{\infty}\frac{dx}{1+x^2}$:
First note that by symmetry
\begin{equation}\int_{0}^{+\infty}\frac{1}{1+x^2}\, dx=\frac{1}{2}\int_{-\infty}^{+\infty}\frac{1}{1+x^2}\, dx=\lim_{R\to +\infty}\frac{1}{2}\int_{-R}^{+R}\frac{1}{1+x^2}\, dx\end{equation}
The associated complex function is $f(z)=\frac{1}{1+z^2}$. We shall integrate it over the contour $C=[-R,R]\cup \gamma_{R}$ where $\gamma_{R}$ is an anticlockwise semicircle arc centered at $0$ with radius $R>0$. $f$ has a simple poles at $\pm i$ but only $i$ is in the region bounded by $C$. By the Residue Theorem,
\begin{equation}\oint_{C} f(z)\, dz=2\pi \text{Res}_{i}(f)=2\pi \lim_{z\to i}\frac{z-i}{(z-i)(z+i)}=\pi\end{equation}
Observe that
\begin{equation}\oint_{C}f(z)\, dz=\int_{[-R,R]}f(z)\, dz+\int_{\gamma_{R}}f(z)\, dz\Rightarrow \int_{[-R,R]}f(z)\, dz=\pi -\int_{\gamma_{R}}f(z)\, dz
\end{equation}
We wish to show that the integral in the right hand side converges to $0$ as $R\to +\infty$.
Indeed, 
\begin{equation}\lim_{R\to +\infty}\int_{\gamma_R}f(z)\, dz= \lim_{R\to +\infty}\int_{0}^{\pi}\frac{Re^{it}}{1+R^2e^{2it}}\, dt=\int_{0}^{\pi}\lim_{R\to +\infty}\frac{1}{R}\frac{e^{it}}{\frac{1}{R^2}+e^{2it}}\, dt=0
\end{equation}
which yields that
\begin{equation}\lim_{R\to +\infty}\int_{-R}^{+R}\frac{1}{1+x^2}\, dx=\lim_{R\to +\infty}\int_{[-R,R]}f(z)\, dz=\pi -\lim_{R\to +\infty}\int_{\gamma_{R}}f(z)\, dz=\pi
\end{equation}
Therefore,
\begin{equation}\int_{0}^{+\infty}\frac{1}{1+x^2}\, dx=\frac{1}{2}\int_{-\infty}^{+\infty}\frac{1}{1+x^2}\, dx=\frac{\pi}{2}\end{equation}
We will now calculate $\int_{0}^{1}\frac{1}{1+x^2}\, dx$
\begin{gather}\int\limits_{0}^{1}\frac{dx}{1+x^2}=\int\limits_{0}^{1}\sum\limits_{k=0}^{n}(-1)^k x^{2k}\, dt+\int\limits_{0}^{1}\frac{(-1)^{n+1}x^{2n+2}}{1+x^2}\, dt=\\
\sum\limits_{k=0}^{n}\frac{(-1)^k}{2k+1}+(-1)^{n+1}\int\limits_{0}^{1}\frac{x^{2n+2}}{1+x^2} dt\end{gather}
Since
\begin{equation}\left|\int\limits_{0}^{1}(-1)^{n+1}\frac{x^{2n+2}}{1+x^2}\, dt\right|=
\int\limits_{0}^{1}\frac{x^{2n+2}}{1+x^2}\, dt\le \int\limits_{0}^{1}x^{2n+2}\, dt=\frac{1}{2n+3} \to 0\end{equation}
and 
$$\sum\limits_{k=0}^{+\infty}\frac{(-1)^k}{2k+1}=\frac{\pi}{4}$$
it follows that
$$\int\limits_{0}^{1}\frac{dt}{1+x^2}=\frac{\pi}{4}$$
The required integral is
\begin{equation}\int_{1}^{+\infty}\frac{1}{1+x^2}\, dx=\int_{0}^{+\infty}\frac{1}{1+x^2}\, dx-\int_{0}^{1}\frac{1}{1+x^2}\, dx=\frac{\pi}{2}-\frac{\pi}{4}=\frac{\pi}{4}\end{equation}
A: The key point is that you do not evaluate the antiderivative at $\infty$ since most functions aren't defined for $x=\infty$. You take the limit: $$\int_a^{\infty}f(x)dx=\lim_{m \to \infty}\int_a^{m}f(x)dx=\lim_{m \to \infty}F(m)-F(a).$$
(It's punny because I'm Limitless.)
