I'm trying to evaluate a bunch of integrals of the form $$\int_0^{\infty } \frac{\sum\limits_{i=0}^k (c_i P^i)}{\left(P^2+1\right)^n}\log \left(2+\lambda _+ P+ 2 \sqrt{\lambda _* P^2+\lambda _+ P+1}\right)\, dP$$ where $n$ and $k$ is are integers ($n\ge 1$, $m<2n$), $\lambda_+>0$, $\lambda_*>0$, and the polynomial $\sum\limits_{i=0}^m(c_i P^i)$ only has even powers of $P$; for example $\frac{3-2P^2 +47P^4+4P^6}{(1+P^2)^5}$.
For each particular term of the form $$\int_0^{\infty } \frac{1}{\left(P^2+1\right)^k}\log \left(2+\lambda _+ P+ 2 \sqrt{\lambda _* P^2+\lambda _+ P+1}\right)\, dP$$ parital integration $\int u \,dv = u v - \int v\,du$ (with $dv=log(\ldots)$) will give me a polynomial of the order $2n-4$ divided by $1/(1+P^2)^{n-1}$ (which can easily be solved) plus $$\int\frac{\arctan(P)}{P}\left(1-\frac{1}{\sqrt{\lambda _* P^2+\lambda _+ P+1}}\right)dP$$ which I don't know how to solve (nor does Mathematica apparently). In certain instances (for particular set of $c_i$ the (indefinite) integral can be solved by partial integration when the $\arctan(x)$ terms cancel out (for example $\frac{1-16P^2 +25P^4-6P^6}{(1+P^2)^5}$).
The queation is how do I solve the integral when $\arctan(x)$ terms don't cancel out? I have tried all the variable substitutions I could think of, and couldn't figure anything out by trying the residue theorem either.
Any help would be greatly appreciated.