Evaluate the integral $\int_1^\infty \left(\frac{1+x}{1+x^2}\right)^2\,dx$ I have to prove that this integral is finite so that the series $\sum_1^\infty \left(\frac{1+n}{1+n^2}\right)^2$ converges , but I am not able to integrate the function . Please help
 A: $$
\begin{align}
\int\left(\frac{1+x}{1+x^2}\right)^2\,dx
&=\int\frac{1+2x+x^2}{\left(1+x^2\right)^2}\,dx\\
&=\int\left(\frac{1+x^2}{\left(1+x^2\right)^2}+\frac{2x}{\left(1+x^2\right)^2}\right)\,dx\\
&=\int\frac{1}{1+x^2}\,dx+\int\frac{1}{\left(1+x^2\right)^2}\frac{d}{dx}\left(1+x^2\right)\,dx\\
&=\arctan{x}+\int\left(1+x^2\right)^{-2}\,d\left(1+x^2\right)\\
&=\arctan{x}+\frac{1}{-2+1}\left(1+x^2\right)^{-2+1}+C\\
&=\arctan{x}-\frac{1}{1+x^2}+C.
\end{align}
$$
Wolfram Alpha check. $\int\frac{1}{1+x^2}\,dx=\arctan{x}+C$, by the way, is a well-known table integral.
$$
\begin{align}
\int_1^\infty \left(\frac{1+x}{1+x^2}\right)^2\,dx
&=\lim\limits_{b\rightarrow\infty}\int_1^b \left(\frac{1+x}{1+x^2}\right)^2\,dx\\
&=\lim\limits_{b\rightarrow\infty}\bigg[\arctan{x}-\frac{1}{1+x^2}\bigg]_{1}^{b}\\
&=\lim\limits_{b\rightarrow\infty}\bigg[\arctan{b}-\frac{1}{1+b^2}-\bigg(\arctan{1}-\frac{1}{1+1^2}\bigg)\bigg]\\
&=\frac{\pi}{2}-0-\bigg(\frac{\pi}{4}-\frac{1}{2}\bigg)\\
&=\frac{\pi}{2}-\frac{\pi}{4}+\frac{1}{2}\\
&=\frac{\pi}{4}+\frac{1}{2}\\
&=\frac{\pi+2}{4}.
\end{align}
$$
Wolfram Alpha gives the same answer.
A: $$\int_1^\infty\frac{1+x^2+2x}{\bigg(1+x^2\bigg)^2}dx$$
$$=\int_1^\infty\frac{1}{1+x^2}dx\ +\ \int_1^\infty\frac{2x}{\bigg(1+x^2\bigg)^2}dx$$
$$=\int_{\pi/4}^{\pi/2}dt\ +\ \int_2^\infty\frac{du}{u^2}$$
$$=\frac{\pi}{4}+\frac{1}{2}$$
A: You do not have to integrate. Just observe that, at infinity, your integrand decays as $1/x^2$, which is enough for convergence of the improper integral. The corresponding series is thus convergent.
A: Why apply the integral test while the comparison test is much easier? Note that
$$0\leq \left( \frac{1+n} {1+n^2}\right)^2\leq\left( \frac{n+n} {n^2}\right)^2 \leq \frac 4{n^2} $$
At this stage it should be a well-known fact that the series
$$\sum_{n\geq 1}\frac 4{n^2}$$
converges, so that the conclusion follows from comparison test. 
