Integration techniques III: partial fractions. Reference in Stewart: Section 7.4.