Integration by parts with partial fractions