Evaluating $\int_1^\infty \frac{1}{x(x^2+1)}\ dx$ $$I=\int_1^\infty \frac{1}{x(x^2+1)}\ dx$$  
I tried to use partial fractions, but am unsure why I cann't evaluate it using partial fractions. Would appreciate any explanation about which step is incorrect.  
$$\frac{1}{x(x^2+1)} = \frac{1}{2} \left(\frac{1}{x}-\frac{1}{x+i} -\frac{1}{x-i}\right)$$
So
  $$I = \frac{1}{2}\int_1^\infty\frac{1}{x}-\frac{1}{x+i} -\frac{1}{x-i} \ dx \\ = \frac{1}{2}\left[\log |x| - \log(|x+i|) - \log(|x-i|)\right]_1^\infty  
$$
which evaluates to be $\infty$.

Why complicate it with complex coefficients?
$$\int_1^\infty\frac{1}{x(x^2+1)}dx=\int_1^\infty\left(\frac{1}{x}-\frac{x}{x^2+1}\right)dx=\left(\ln(x)-\frac{1}{2}\ln(x^2+1)\right)\bigg\vert_1^\infty\\=\ln\frac{x}{\sqrt{x^2+1}}\bigg\vert_1^\infty=\ln\frac{1}{\sqrt{1+1/x^2}}\bigg\vert_1^\infty=\ln 1-\ln\frac{1}{\sqrt{2}}=\ln\sqrt 2$$
