Find the primitives of a given function Let $ f:(0,\infty )\rightarrow \mathbb{R}$ be a function such that:$$f(x)=\left ( \frac{1}{x^{2}}-\frac{1}{(x+1)^2} \right )\cdot \ln\left ( \frac{1}{x^{2}}+\frac{1}{(x+1)^2} +a\right ), \, a > 0$$
Find the primitives of $f$.
I've noticed that $\frac{1}{x^{2}}-\frac{1}{(x+1)^2} = \left( \frac{1}{x+1} - \frac{1}{x} \right)'$. However, using this to apply integration by parts didn't get me anywhere.
Thank you!

The integral can be rewritten as a finite sum of elementary integrals :

