<s>[INST] 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$.
 [/INST] First of all:
$$\frac{1}{x(x^2+1)} = \frac{1}{x}-\frac{1}{2}\left(\frac{1}{x+i} -\frac{1}{x-i}\right)$$
Second of all:
You have to evaluate the integral $\int_1 ^ R\frac{1}{x(x^2+1)}dx$ then take the limit as R goes to infinity and note that $\infty -\infty$  is undetermined.
$$\int_1 ^ R\frac{1}{x(x^2+1)} = \int_1 ^ R \left[\frac{1}{x}-\frac{1}{2}\left(\frac{1}{x+i} -\frac{1}{x-i}\right)\right]dx$$
$$=[\log |x| - \frac{1}2{}\log(|x+i|) - \frac{1}{2}\log(|x-i|)]_1^R$$
$$=[\log |R| - \frac{1}2{}\log(|R+i|) - \frac{1}{2}\log(|R-i|)] + \frac{1}2{}\log(|1+i|) + \frac{1}{2}\log(|1-i|)]$$
$$=\log\left|\frac{R}{(R+i)^{\frac{1}{2}}(R-i)^\frac{1}{2}}\right|+\frac{1}{2}\log(1+i)(1-i)$$
$$=\log\left|\frac{R}{(R^2+1)^\frac{1}{2}}\right|+\frac{1}{2}\log(2)$$
Now taking the limit yields $\frac{1}{2}\log(2)$.
</s>