A complicated rational expression can be a sum of simpler fractions.
Writing A/x+B/(x+1) over a common denominator gives [(A+B)x+A]/[x(x+1)]. Matching the numerator 1 yields A=1 and B=−1. Integrating gives log|x|−log|x+1|+C on intervals avoiding the poles.
Splitting fractions does not remove the poles at x=0 and x=−1.