Unit 2, chapter 9

Partial fractions for a factorable denominator

How partial fraction decomposition splits a rational function with a factorable denominator into simple fractions, found by comparing coefficients and integrated as logarithms when the poles lie outside the interval.

  • Chapter 9
  • Trigonometric substitution, partial fractions and completing the square

The integral of 1/(x2−1)1/(x^2 - 1) from 22 to 33 does not match a basic antiderivative as it stands, but its denominator factors as (x−1)(x+1)(x - 1)(x + 1). A fraction over a product of distinct linear factors can be written as a sum of simpler fractions, one over each factor, and each of those integrates to a logarithm. This page shows how to find the coefficients exactly, why the zeros of the denominator have to lie outside the interval of integration, and how the pieces combine to the value 12ln⁡32\tfrac12\ln\tfrac32.

Key terms

Rational function

Definition A rational function is a quotient R(x)=P(x)/Q(x)R(x) = P(x)/Q(x) of polynomials PP and QQ with real coefficients, where QQ is not the zero polynomial. It is defined at every real xx with Q(x)≠0Q(x) \ne 0 and is continuous there. It is proper when deg⁡P<deg⁡Q\deg P < \deg Q. When deg⁡P≥deg⁡Q\deg P \ge \deg Q, polynomial long division gives polynomials SS and TT with P=SQ+TP = SQ + T, where T=0T = 0 or deg⁡T<deg⁡Q\deg T < \deg Q, so that P/Q=S+T/QP/Q = S + T/Q is a polynomial plus a proper rational function.

In plain words A rational function is a fraction of polynomials. Its domain leaves out the zeros of the denominator, and partial fractions apply only once the numerator has smaller degree than the denominator, which long division arranges.

Example The integrand 1/(x2−1)1/(x^2 - 1) is proper, with a numerator of degree 00 and a denominator of degree 22, and it is defined for every real xx except 11 and −1-1. The function x3/(x2−1)x^3/(x^2 - 1) is not proper. Division gives x3=x(x2−1)+xx^3 = x(x^2 - 1) + x, so

x3x2−1=x+xx2−1,\frac{x^3}{x^2 - 1} = x + \frac{x}{x^2 - 1},

and only the remainder x/(x2−1)x/(x^2 - 1) needs to be split into partial fractions.

Partial fraction decomposition

Definition Let P/QP/Q be a proper rational function with real coefficients, and factor QQ over the reals as a constant times powers of distinct linear factors x−rx - r and of distinct irreducible quadratic factors x2+bx+cx^2 + bx + c, those with b2−4c<0b^2 - 4c < 0. Then P/QP/Q is a sum of the following terms, with real constants that are uniquely determined. A factor (x−r)m(x - r)^m contributes

A1x−r+A2(x−r)2+⋯+Am(x−r)m,\begin{aligned} &\frac{A_1}{x - r} + \frac{A_2}{(x - r)^2} \\[0.4em] &\quad + \cdots + \frac{A_m}{(x - r)^m}, \end{aligned}

and a factor (x2+bx+c)k(x^2 + bx + c)^k contributes

B1x+C1x2+bx+c+⋯+Bkx+Ck(x2+bx+c)k.\begin{aligned} &\frac{B_1 x + C_1}{x^2 + bx + c} + \cdots \\[0.4em] &\quad + \frac{B_k x + C_k}{(x^2 + bx + c)^k}. \end{aligned}

The identity holds at every xx with Q(x)≠0Q(x) \ne 0. When QQ is a constant times a product of distinct linear factors x−r1,…,x−rnx - r_1, \dots, x - r_n, the decomposition is a sum of nn terms Ai/(x−ri)A_i/(x - r_i).

In plain words The decomposition undoes the addition of fractions. Each factor of the denominator gets its own simple fractions, a repeated factor gets one fraction for every power up to its multiplicity, and an irreducible quadratic gets a linear numerator. By linearity, each simple fraction can then be integrated on its own.

Example The integrand of the integral from 22 to 33 is proper, and x2−1=(x−1)(x+1)x^2 - 1 = (x - 1)(x + 1) has two distinct linear factors. Its zeros 11 and −1-1 lie outside [2,3][2, 3], so the integrand is continuous on the interval. Write

1(x−1)(x+1)=Ax−1+Bx+1.\begin{aligned} &\frac{1}{(x - 1)(x + 1)} \\[0.4em] &\quad = \frac{A}{x - 1} + \frac{B}{x + 1}. \end{aligned}

Multiplying by (x−1)(x+1)(x - 1)(x + 1) gives 1=A(x+1)+B(x−1)=(A+B)x+(A−B)1 = A(x + 1) + B(x - 1) = (A + B)x + (A - B), so A+B=0A + B = 0 and A−B=1A - B = 1, which gives A=1/2A = 1/2 and B=−1/2B = -1/2. Hence

1x2−1=12(x−1)−12(x+1),\begin{aligned} \frac{1}{x^2 - 1} &= \frac{1}{2(x - 1)} \\[0.4em] &\quad - \frac{1}{2(x + 1)}, \end{aligned}

and at x=2x = 2 the right side is 12−16=13\tfrac12 - \tfrac16 = \tfrac13, which matches 1/(22−1)1/(2^2 - 1). On [2,3][2, 3] both x−1x - 1 and x+1x + 1 are positive, so the logarithms need no absolute values, and

∫23dxx2−1=12[ln⁡x−1x+1]23=12(ln⁡12−ln⁡13)=12ln⁡32,\begin{aligned} &\int_2^3 \frac{dx}{x^2 - 1} \\[0.4em] &\quad = \frac12\Bigl[\ln\frac{x - 1}{x + 1}\Bigr]_2^3 \\[0.4em] &\quad = \frac12\Bigl(\ln\frac12 - \ln\frac13\Bigr) \\[0.4em] &\quad = \frac12\ln\frac32, \end{aligned}

which is about 0.20270.2027. As a check, the integrand decreases from 1/31/3 at x=2x = 2 to 1/81/8 at x=3x = 3, so the integral over this interval of length 11 lies between 0.1250.125 and 0.33330.3333.

Comparing coefficients

Definition Two polynomials that take equal values at infinitely many real xx have the same coefficient for every power of xx, because their difference has infinitely many roots and must be the zero polynomial. After a proposed decomposition of P/QP/Q is multiplied by QQ, both sides are polynomials that agree wherever Q(x)≠0Q(x) \ne 0, which is all but finitely many xx. So their coefficients agree, and equating the coefficients of each power of xx gives a linear system for the unknown constants. Because the cleared identity then holds for every real xx, it may also be evaluated at a zero of QQ, which often isolates one constant at a time. The original rational function is still undefined at that zero.

In plain words Clear the denominators, then match the x2x^2 terms, the xx terms and the constants on the two sides. Plugging in a zero of the denominator is a shortcut that works on the cleared polynomial identity, not on the original fraction.

Example To split (x+5)/((x−1)(x+2))(x + 5)/\bigl((x - 1)(x + 2)\bigr), write it as A/(x−1)+B/(x+2)A/(x - 1) + B/(x + 2) and clear the denominators,

x+5=A(x+2)+B(x−1)=(A+B)x+(2A−B).\begin{aligned} &x + 5 \\[0.4em] &= A(x + 2) + B(x - 1) \\[0.4em] &= (A + B)x + (2A - B). \end{aligned}

Matching the coefficients gives A+B=1A + B = 1 and 2A−B=52A - B = 5, so A=2A = 2 and B=−1B = -1. The shortcut agrees. At x=1x = 1 the identity reads 6=3A6 = 3A, and at x=−2x = -2 it reads 3=−3B3 = -3B. Hence

x+5(x−1)(x+2)=2x−1−1x+2,\begin{aligned} &\frac{x + 5}{(x - 1)(x + 2)} \\[0.4em] &\quad = \frac{2}{x - 1} - \frac{1}{x + 2}, \end{aligned}

and at x=0x = 0 both sides equal −5/2-5/2. In the integral from 22 to 33, the same shortcut applied to 1=A(x+1)+B(x−1)1 = A(x + 1) + B(x - 1) gives 1=2A1 = 2A at x=1x = 1 and 1=−2B1 = -2B at x=−1x = -1, the constants found by matching coefficients, although 1/(x2−1)1/(x^2 - 1) itself has no value at either point.

Logarithmic antiderivative

Definition For a constant rr, the function ln⁡∣x−r∣\ln\lvert x - r \rvert is differentiable at every x≠rx \ne r, with derivative 1/(x−r)1/(x - r). So on each interval that does not contain rr,

∫dxx−r=ln⁡∣x−r∣+C,\int \frac{dx}{x - r} = \ln\lvert x - r \rvert + C,

and more generally, for constants p≠0p \ne 0 and qq, an antiderivative of 1/(px+q)1/(px + q) on each interval where px+q≠0px + q \ne 0 is 1pln⁡∣px+q∣\tfrac1p\ln\lvert px + q \rvert. The constant of integration may differ on the two sides of the zero. On an interval where the argument is positive the absolute value may be dropped, and for positive uu and vv the identity ln⁡u−ln⁡v=ln⁡(u/v)\ln u - \ln v = \ln(u/v) holds.

In plain words Each simple fraction A/(x−r)A/(x - r) integrates to AA times a logarithm. The absolute value makes the formula correct on either side of rr, and the logarithm of a quotient combines the two logarithms of a decomposition into one.

Example On [2,3][2, 3] an antiderivative of 1/(x2−1)1/(x^2 - 1) is

F(x)=12ln⁡∣x−1∣−12ln⁡∣x+1∣=12ln⁡x−1x+1.\begin{aligned} F(x) &= \tfrac12\ln\lvert x - 1 \rvert \\[0.4em] &\quad - \tfrac12\ln\lvert x + 1 \rvert \\[0.4em] &= \tfrac12\ln\frac{x - 1}{x + 1}. \end{aligned}

Its values F(3)=12ln⁡12≈−0.3466F(3) = \tfrac12\ln\tfrac12 \approx -0.3466 and F(2)=12ln⁡13≈−0.5493F(2) = \tfrac12\ln\tfrac13 \approx -0.5493 are both negative, yet F(3)−F(2)=12ln⁡32F(3) - F(2) = \tfrac12\ln\tfrac32 is positive, so the sign of an antiderivative says nothing about the sign of the integral. The arguments are divided, ln⁡12−ln⁡13=ln⁡32\ln\tfrac12 - \ln\tfrac13 = \ln\tfrac32, never subtracted inside one logarithm, which would give ln⁡16\ln\tfrac16. Differentiating confirms the coefficients, since F′(x)=12(x−1)−12(x+1)=1x2−1F'(x) = \tfrac{1}{2(x - 1)} - \tfrac{1}{2(x + 1)} = \tfrac{1}{x^2 - 1} for x>1x > 1. A linear factor with another slope brings its own coefficient, so the antiderivatives of 1/(2x+1)1/(2x + 1) on each side of −1/2-1/2 are 12ln⁡∣2x+1∣+C\tfrac12\ln\lvert 2x + 1 \rvert + C.

Poles outside the interval

Definition Let P/QP/Q be a rational function in lowest terms, so that PP and QQ have no common factor of positive degree. Its real poles are the real zeros of QQ. If no zero of QQ lies in [a,b][a, b], then P/QP/Q is continuous on [a,b][a, b], and for every antiderivative FF of P/QP/Q on an open interval containing [a,b][a, b],

∫abP(x)Q(x) dx=F(b)−F(a).\begin{aligned} &\int_a^b \frac{P(x)}{Q(x)}\,dx \\[0.4em] &\quad = F(b) - F(a). \end{aligned}

If a pole rr lies in [a,b][a, b], inside or at an endpoint, the integral is improper and diverges. Near rr the function has the form h(x)/(x−r)mh(x)/(x - r)^m with m≥1m \ge 1, hh continuous and h(r)≠0h(r) \ne 0, and comparison with the integral of 1/∣x−r∣m1/\lvert x - r \rvert^m, which diverges over every interval with endpoint rr, shows that the integral of P/QP/Q diverges. In that case F(b)−F(a)F(b) - F(a) is not the value of the integral.

In plain words Factoring shows where the denominator vanishes, but it does not remove those points from the domain. If they stay outside the interval, the integral is an ordinary one and endpoint subtraction is valid. If one lies in the interval, the region next to it has infinite area, and the logarithm formula hides that.

Example For 1/(x2−1)1/(x^2 - 1) the poles are −1-1 and 11, both outside [2,3][2, 3], which is why the integral from 22 to 33 can be evaluated by subtraction. On [0,3][0, 3] the pole 11 lies inside. Subtracting anyway gives F(3)−F(0)=12ln⁡12−0≈−0.3466F(3) - F(0) = \tfrac12\ln\tfrac12 - 0 \approx -0.3466, a number attached to an integral that diverges. For 1<x≤31 < x \le 3 the factor x+1x + 1 is at most 44, so

1x2−1≥14(x−1),\frac{1}{x^2 - 1} \ge \frac{1}{4(x - 1)},

and the integral of 1/(x−1)1/(x - 1) from 11 to 33 diverges. The integral of 1/x1/x across 00 behaves the same way. The difference ln⁡∣1∣−ln⁡∣−1∣=0\ln\lvert 1 \rvert - \ln\lvert -1 \rvert = 0 is not the value of ∫−11dx/x\int_{-1}^{1} dx/x, which diverges.

Check yourself

  1. Evaluate the integral below with partial fractions.
∫35dxx2−4\int_3^5 \frac{dx}{x^2 - 4}
Show the answer

The denominator factors as (x−2)(x+2)(x - 2)(x + 2), and its zeros 22 and −2-2 lie outside [3,5][3, 5]. From 1=A(x+2)+B(x−2)1 = A(x + 2) + B(x - 2), the value x=2x = 2 gives A=1/4A = 1/4 and the value x=−2x = -2 gives B=−1/4B = -1/4. Both factors are positive on [3,5][3, 5], so

∫35dxx2−4=14[ln⁡x−2x+2]35=14(ln⁡37−ln⁡15)=14ln⁡157≈0.1905.\begin{aligned} &\int_3^5 \frac{dx}{x^2 - 4} \\[0.4em] &\quad = \frac14\Bigl[\ln\frac{x - 2}{x + 2}\Bigr]_3^5 \\[0.4em] &\quad = \frac14\Bigl(\ln\frac37 - \ln\frac15\Bigr) \\[0.4em] &\quad = \frac14\ln\frac{15}{7} \approx 0.1905. \end{aligned}

The integrand decreases from 1/51/5 to 1/211/21 over an interval of length 22, so the value must lie between 2/21≈0.09522/21 \approx 0.0952 and 0.40.4, and it does.

  1. Evaluate the integral below. Why does a decomposition of the form A/x+C/(x+1)A/x + C/(x + 1) not work?
∫12dxx2(x+1)\int_1^2 \frac{dx}{x^2(x + 1)}
Show the answer

The factor xx appears squared, so the decomposition needs a term for each power,

1x2(x+1)=Ax+Bx2+Cx+1.\begin{aligned} &\frac{1}{x^2(x + 1)} \\[0.4em] &\quad = \frac{A}{x} + \frac{B}{x^2} + \frac{C}{x + 1}. \end{aligned}

Clearing denominators gives 1=Ax(x+1)+B(x+1)+Cx21 = Ax(x + 1) + B(x + 1) + Cx^2. The value x=0x = 0 gives B=1B = 1, the value x=−1x = -1 gives C=1C = 1, and the coefficient of x2x^2 gives A+C=0A + C = 0, so A=−1A = -1. The poles 00 and −1-1 lie outside [1,2][1, 2], where xx and x+1x + 1 are positive, so an antiderivative there is −ln⁡x−1/x+ln⁡(x+1)-\ln x - 1/x + \ln(x + 1), and

∫12dxx2(x+1)=[ln⁡x+1x−1x]12=12+ln⁡34≈0.2123.\begin{aligned} &\int_1^2 \frac{dx}{x^2(x + 1)} \\[0.4em] &\quad = \Bigl[\ln\frac{x + 1}{x} - \frac1x\Bigr]_1^2 \\[0.4em] &\quad = \frac12 + \ln\frac34 \approx 0.2123. \end{aligned}

The integrand decreases from 1/21/2 to 1/121/12 on an interval of length 11, and the value lies between those numbers. Without the term B/x2B/x^2, clearing the denominator x2(x+1)x^2(x + 1) would give 1=x(A(x+1)+Cx)1 = x\bigl(A(x + 1) + Cx\bigr). This is a polynomial identity, so it would have to hold at x=0x = 0 as well, where it reads 1=01 = 0. No constants AA and CC can work.

  1. Someone evaluates the integral of 1/(x2−1)1/(x^2 - 1) from 00 to 22 as F(2)−F(0)=12ln⁡13≈−0.5493F(2) - F(0) = \tfrac12\ln\tfrac13 \approx -0.5493, with the antiderivative FF from above. Is this the value of the integral?
Show the answer

No. The pole x=1x = 1 lies inside [0,2][0, 2], so the integral is improper and has to be split at 11. On the right part

∫12dxx2−1=lim⁡t→1+∫t2dxx2−1=lim⁡t→1+12ln⁡t+13(t−1),\begin{aligned} &\int_1^2 \frac{dx}{x^2 - 1} \\[0.4em] &\quad = \lim_{t \to 1^+} \int_t^2 \frac{dx}{x^2 - 1} \\[0.4em] &\quad = \lim_{t \to 1^+} \frac12\ln\frac{t + 1}{3(t - 1)}, \end{aligned}

and this limit is +∞+\infty, because the quotient (t+1)/(3(t−1))(t + 1)/\bigl(3(t - 1)\bigr) grows without bound as tt decreases to 11. So the integral from 00 to 22 diverges, and −0.5493-0.5493 is not its value. The function FF is an antiderivative on (−1,1)(-1, 1) and on (1,∞)(1, \infty) separately, never on an interval that contains 11.

How this lesson connects

It also uses factoring a difference of squares and the derivative of the logarithm of an absolute value.