Integral of product of two inverse polynomials I an currently struggling with the following integral:
$$
\int \frac{1}{r} \frac{1}{a(r+b)} dr
$$
with $a,b>0$. An immediate attempt of integration by parts, by setting $u$ equal the 2nd term and $v'$ the first term doesn't seem to lead to any simplifications as we'll have to integrate something along $1/r^2 \ln(r)$. Any different approaches are highly welcome. 
 A: $\DeclareMathOperator{\argth}{argth}\DeclareMathOperator{\argcoth}{argcoth}$
To come back to the idea of integrating in $\argth$, whenever you have a quadratic you may try to symmetrize it by shifting the variable to the average of the tow roots.
Here $r(r+b)$ has middle point $\frac b2$ so substitute $u=r+\frac b2$
$$\int\dfrac{\mathop{du}}{a(u-\frac b2)(u+\frac b2)}=\int\dfrac{\mathop{du}}{a(u^2-\frac {b^2}4)}$$
And now you substitute $t=\dfrac{2u}b$ to get $(1-t^2)$ group 
For $|t|<1$ or $r\in]-b,0[$ you have $\displaystyle \int \dfrac{-2\mathop{dt}}{ab(1-t^2)}=C-\dfrac{2}{ab}\,\argth(t)$
For $|t|>1$ or $r\in]-\infty,-b[\cup\mathbb R^+$ you have $\displaystyle \int \dfrac{-2\mathop{dt}}{ab(1-t^2)}=C-\dfrac{2}{ab}\,\argcoth(t)$
With $t=1+\dfrac {2r}b$.

Note: $\argth/\argcoth(x)=\dfrac 12\ln\left|\dfrac{1+x}{1-x}\right|$, let's verify it is equal to the logarithmic solution found in the other answers.
$f(x)=-\dfrac {2}{ab}\dfrac 12\ln\left|\dfrac{2+\frac{2r}b}{-\frac{2r}b}\right|=-\dfrac {1}{ab}\ln\left|\dfrac{2b+2r}{2r}\right|=-\dfrac {1}{ab}\ln\left|\dfrac{b+r}{r}\right|=\dfrac{\ln|r|-\ln|b+r|}{ab}$
Remark: in Botond's answers he did not care about the domain of definition but he should have put absolute values, imranfat did and has a similar result if we simplify the inner of the logarithm instead of expanding it.
A: You can use some substitution and manipualtion to get something like this:
$$\frac{C}{1-x^2}$$
And the integral of it will be:
$$\tanh^{-1}(x)+C$$
but this is a bit complicated. But you can use partial fraction decomposition (I'll drop the $\frac{1}{a}$ and multiply by it at the end, because you can factor it out as you've said in your comment):
$$\frac{1}{r^2+br}=\frac{1}{br}-\frac{1}{br+b^2}$$
$$\int \frac{1}{r^2+br}\mathrm{d}r=\int\frac{1}{br}-\frac{1}{br+b^2} \mathrm{d}r=\frac{1}{b} \int \frac{1}{r}\mathrm{d}r-\int \frac{1}{br+b^2} \mathrm{d}r=\frac{\log(r)}{b}-\int \frac{1}{br+b^2} \mathrm{d}r=\frac{\log(r)}{b}-\frac{1}{b}\int \frac{b}{br+b^2} \mathrm{d}r=\frac{1}{b}\left(\log(r)-\log(br+b^2)\right)+C$$
You can make it "nicer" a bit:
$$\log(br+b^2)=\log(b(r+b))=\log(b)+\log(r+b)$$
And the $\log(b)$ and $b$ are just a constants, so $C-\frac{\log(b)}{b}$ is also a constant. So the result can be written as (after multiplying by $\frac{1}{a}$):
$$\frac{\log(r)-\log(r+b)}{ab}+C$$
A: This can be done without integration by parts, without partial fraction decomposition and without trig. All you need to do is a u-sub. Let $\frac{1}{r}=t$ and $dr=\frac{-1}{t^2}dt$ and the integral takes the form $\frac{1}{a}\int{\frac{-dt}{1+bt}}$ which is $\frac{-ln|1+bt|}{ab}+C$. Done!
