This Demonstration shows how to integrate a rational function whose denominator is a polynomial of degree 2 or 3 with real roots. The function is decomposed into partial fractions, which are then integrated. Two methods are used to determine the coefficients in the decomposition. The first consists of equating coefficients of powers of on the left and right sides of the corresponding equation. In the second method, the roots of the denominator are substituted for . In the case of multiple roots, some other value should be substituted.