$$\int \frac{dx}{(x+1)^2(x^2+1)}$$ What I tried "-
Let $$x=tan(\theta)$$
so $$dx= sec^2(\theta) d\theta$$ which gives us
$$ \int \frac{sec^2(\theta)}{(1+tan(\theta))^2 sec^2(\theta)}$$
so we have after simplification , the integral of
$$\int \frac{d\theta}{(1+tan(\theta))^2}$$
which I'm unable to integrate further , any advice would be greatly appreciated .
I have considered the weierstrass substitution but I don't think it would be of any help here
thanks!
edit:- I also considered expressing tan in terms of sin and cos, but after that there's no neat sub that works