Find the value of C for which the following integral converges $$I=\int_0^\infty \frac {x} {x^2+1} - \frac {C} {3x+1} dx$$
Find the value of C for which the integral converges. 
I've gotten as far as solving the integral 
$\frac 1 2 \ln|x^2+1| - \frac 1 3 c\ln|3x+1|$ but not sure where to go from here as evaluating it gives $\infty - 0 - c \infty + 0$. Any help would be appreciated!

You can do this without finding the actual integral.  The basic question is what is the behaviour of the integrand as $x \to \infty$.  We have $$ \frac{x}{x^2+1} = \frac{1}{x (1+1/x^2)} = \frac{1}{x} \left(1 - \frac{1}{x^2} + \ldots \right) = \frac{1}{x} + O\left(\frac{1}{x^3}\right)\ \text{as}\ x \to \infty$$
while 
$$\frac{C}{3x+1} = \frac{C}{3 x (1 + 1/(3x))} = \frac{C}{3x} + O\left(\frac{1}{x^2}\right) $$
So if $C = 3$, 
$$ \frac{x}{x^2+1} - \frac{3}{3x+1} = O\left(\frac{1}{x^2}\right) $$
which is integrable as $x \to \infty$.  If $C \ne 3$, you have a term in $1/x$ which
is not integrable.
