\int P(x)dx=\int \frac{x+2}{x(x+1)}dx=ln(x)+ln(x)-ln(x+1)=ln\left ( \frac{x^{2}}{x+1} \right )