7.
4 Integration of rational functions by partial fractions
Let’s consider a rational function
                                               P (x)
                                     f (x) =
                                               Q(x)
where P and Q are polynomials.
1st step
If deg(P ) ≥ deg(Q), then divide Q into P until a remainder R(x) is obtained
such that
                              deg(R) < deg(Q)
Then
                                P (x)            R(x)
                        f (x) =       = S(x) +
                                Q(x)             Q(x)
where S and R are also polynomials.
Example
    ˆ
        x3 + x
Find           dx.
        x−1
Solution.
              ˆ 3         ˆ                  
                x +x                       2
                     dx =    x2 + x + 2 +       dx
                 x−1                      x−1
                                 x3   x2
                             =      +    + 2x + 2 ln |x − 1| + C               1
                                 3    2
2nd step
Factor the denominator Q(x) as far as possible.
3rd step
                                                            R(x)
The third step is to express the proper rational function        as a sum of
                                                            Q(x)
partial fractions.
A theorem in algebra guarantees that it is always possible to do this. We
explain the details for the four cases that occur.
                                                                               2
CASE 1: The denominator Q(x) is a product of distinct linear factors.
This means that we can write
                  Q(x) = (a1 x + b1 )(a2 x + b2 ) · · · (ak x + bk )
where no factor is repeated (and no factor is a constant multiple of another). In
this case, the partial fraction theorem states that there exist constants
A1 , A2 , · · · , Ak such that
               R(x)      A1          A2              Ak
                    =           +           +···+           .                (1)
               Q(x)   a1 x + b1   a2 x + b2       ak x + bk
                                                                                    3
Example ˆ
              x2 + 2x − 1
Evaluate                    dx.
             2x3 + 3x2 − 2x
Solution.
             2x3 + 3x2 − 2x = x(2x2 + 3x − 2) = x(2x − 1)(x + 2)
                     x2 + 2x − 1      A     B       C
                                    =   +        +
                   x(2x − 1)(x + 2)   x   2x − 1   x+2
           x2 + 2x − 1 = A(2x − 1)(x + 2) + Bx(x + 2) + Cx(2x − 1)
                      = (2A + B + 2C)x2 + (3A + 2B − C)x − 2A
             2A + B + 2C = 1,       3A + 2B − C = 2,      −2A = −1
Thus
                              1          1            1
                        A=      ,   B=     ,   C=−
                              2          5           10
  ˆ                          ˆ 
        x2 + 2x − 1
                                                                    
                              1 1       1       1        1     1
                      dx =       · + ·              −      ·          dx
       2x3 + 3x2 − 2x         2 x       5 2x − 1        10 x + 2
                          1            1                    1
                         = · ln |x| +     · ln |2x − 1| −     · ln |x + 2| + K
                          2           10                   10
                                                                                 4
Example
    ˆ
          dx
Find            , where a ̸= 0.
        x2 − a2
Solution.
                     1             1           A     B
                          −                 =     +
                  x2 − a2    (x − a)(x + a)   x−a   x+a
                         A(x + a) + B(x − a) = 1
Put x = a.
                                                  1
                         2a · A = 1   ⇒    A=
                                                 2a
Put x = −a.
                                                   1
                        2a · B = 1    ⇒    B=−
                                                  2a
               ˆ                ˆ                   
                     dx       1         1         1
                           =                −           dx
                   x2 − a2   2a       x−a      x+a
                              1
                           =    (ln |x − a| − ln |x + a|) + C
                             2a
                              1      x−a
                           =    ln          +C
                             2a      x+a
                                                                5
CASE 2: Q(x) is a product of linear factors, some of which are repeated.
Suppose the first linear factor (a1 x + b1 ) is repeated r times; that is,
(a1 x + b1 )r occurs in the factorization of Q(x). Then instead of the single term
     A1
              in Equation (1), we would use:
(a1 x + b1 )
                    A1            A2                  Ar
                           +              2 +···+            r                (2)
                 a1 x + b1   (a1 x + b1 )         (a1 + b1 )
                                                     x
For instance,
            x3 − x + 1    A  B      C        D           E
                      3 =   + 2 +       +         2 +
            x (x − 1)
             2            x  x    x − 1   (x − 1)     (x − 1)3
                                                                                     6
Example
    ˆ
        x4 − 2x2 + 4x + 1
Find                      dx.
          x3 − x2 − x + 1
Solution.
1st step
               x4 − 2x2 + 4x + 1           4x
                                 =x+1+ 3
                x3 − x2 − x + 1       x − x2 − x + 1
2nd step
           x3 − x2 − x + 1 = (x − 1)(x2 − 1) = (x − 1)2 (x + 1)
3rd step
                     4x            A       B        C
                                =     +          +
               (x − 1)2 (x + 1)   x−1   (x − 1)2   x+1
              4x = A(x − 1)(x + 1) + B(x + 1) + C(x − 1)2
                 = (A + C)x2 + (B − 2C)x + (−A + B + C)
                       A    +              C   =    0
                                 B   −    2C   =    4
                      −A    +    B   +     C   =    0
Thus
                        A = 1,   B = 2,    C = −1
                                                                  7
4th step
  ˆ 4                       ˆ 
      x − 2x2 + 4x + 1                                                             
                                         1       2        1
                       dx =     x + 1 +     +          −       dx
       x3 − x2 − x + 1                  x−1   (x − 1)2   x+1
                          x2                     2
                        =    + x + ln |x − 1| −     − ln |x + 1| + K
                          2                     x−1
                          x2          2         x−1
                        =    +x−          + ln      +K
                          2        x−1          x+1
                                                                       8
CASE 3: Q(x) contains irreducible quadratic factors, none of which is
repeated.
If Q(x) has the factor ax2 + bx + c, where b2 − 4ac < 0, then, in addition to
                                                                   R(x)
the partial fractions in Equations (1) and (2), the expression for      will have
                                                                   Q(x)
a term of the form
                                   Ax + B
                                                                             (3)
                                 ax2 + bx + c
where A and B are constants to be determined.
For instance,
                      x               A   Bx + C  Dx + E
                                   =     + 2     + 2
           (x − 2)(x2 + 1)(x2 + 4)   x−2   x +1    x +4
                                                                                    9
Example ˆ
            2x2 − x + 4
Evaluate                dx.
              x3 + 4x
Solution.               2x2 − x + 4   A  Bx + C
                                    =   + 2
                         x(x2 + 4)    x   x +4
                  2x2 − x + 4 = A(x2 + 4) + (Bx + C)x
                              = (A + B)x2 + Cx + 4A
  A + B = 2,      C = −1, 4A = 4             ⇒      A = 1, B = 1, C = −1
                   ˆ                       ˆ 
                      2x2 − x + 4
                                                            
                                               1     x−1
                                    dx  =         +           dx
                        x3 + 4x                x    x2 + 4
                  ˆ                ˆ                ˆ
                     x−1                  x               1
                            dx =              dx −             dx
                     x2 + 4            x2 + 4          x2 + 4
          2
Let u = x + 4. Then du = 2x dx.
       ˆ                ˆ
             x             1 1          1                1
                  dx =       · du = ln |u| + K1 = ln(x2 + 4) + K1
          x2 + 4           2 u          2                2
       ˆ                          
              1         1     −1    1
                  dx =    tan         x + K2
          x2 + 4        2           2
        ˆ                     ˆ            ˆ               ˆ
            2x2 − x + 4           1              x               1
                2
                        dx =         dx +      2
                                                     dx −            dx
             x(x + 4)             x           x +4            x2 + 4
                                        1               1
                            = ln |x| + ln(x2 + 4) − tan−1 (x/2) + K        10
                                        2               2
Example ˆ
             4x2 − 3x + 2
Evaluate                  dx.
             4x2 − 4x + 3
Solution.
            4x2 − 3x + 2         x−1
                         =1+ 2             (b2 − 4ac = −32 < 0)
            4x2 − 4x + 3     4x − 4x + 3
                                 x−1
                         =1+
                             (2x − 1)2 + 2
Let u = 2x − 1. Then du = 2 dx.
 ˆ                    ˆ 
    4x2 − 3x + 2
                                             
                                    x−1
                 dx =     1 +                   dx
    4x2 − 4x + 3               4x2 − 4x + 3
                             ˆ 1                            ˆ
                          1     2
                                  (u + 1) − 1            1      u−1
                    =x+                        du =  x +              du
                          2         u2 + 2               4     u2 + 2
                             ˆ                  ˆ
                          1        u          1       1
                    =x+                 du −               du
                          4     u2 + 2        4    u2 + 2
                                                               
                          1                1 1               u
                    = x + ln(u2 + 2) − · √ tan−1 √                +C
                          8                4     2            2
                                                                      
                          1                         1           2x − 1
                    = x + ln(4x2 − 4x + 3) − √ tan−1              √      +C
                          8                       4 2               2
                                                                              11
Above example illustrates the general procedure for integrating a partial
fraction of the form
                       Ax + B
                                     where b2 − 4ac < 0.
                     ax2 + bx + c
We complete the square in the denominator and then make a substitution that
brings the integral into the form
              ˆ                   ˆ                ˆ
                Cu + D                 u                1
                          du  = C           du + D           du
                 u2 + a2            u2 + a2          u2 + a2
Then the first integral is a logarithm and the second is expressed in terms of
tan−1 .
                                                                                 12
CASE 4: Q(x) contains a repeated irreducible quadratic factor.
Suppose Q(x) has the factor (ax2 + bx + c)r , where b2 − 4ac < 0, then instead
of the single partial fraction (3), the sum
           A1 x + B1        A2 x + B2             Ar x + Br
                       +                 +···+                             (4)
          ax2 + bx + c   (ax2 + bx + c)2       (ax2 + bx + c)r
                                               R(x)
occurs in the partial fraction decomposition of     . Each of the terms in (4)
                                               Q(x)
can be integrated by first completing the square.
For instance,
                 x3 + x2 + 1
        x(x − 1)(x2 + x + 1)(x2 + 1)3
        A     B        Cx + D      Ex + F    Gx + H      Ix + J
       = +         + 2          + 2       +           +
        x    x−1     x +x+1         x +1    (x2 + 1)2   (x2 + 1)3
                                                                                 13
Example ˆ
            1 − x + 2x2 − x3
Evaluate                     dx.
               x(x2 + 1)2
Solution.
1st step
2nd step
3rd step        1 − x + 2x2 − x3   A  Bx + C    Dx + E
                                 =   + 2     +
                   x(x2 + 1)2      x   x +1    (x2 + 1)2
−x3 + 2x2 − x + 1 = A(x2 + 1)2 + (Bx + C)x(x2 + 1) + (Dx + E)x
                   = A(x4 + 2x2 + 1) + B(x4 + x2 ) + C(x3 + x) + Dx2 + Ex
                   = (A + B)x4 + Cx3 + (2A + B + D)x2 + (C + E)x + A
       A + B = 0, C = −1, 2A + B + D = 2, C + E = −1, A = 1
Thus
               A = 1,  B = −1, C = −1, D = 1, E = 0
 ˆ             2    3    ˆ                             
     1 − x + 2x − x            1     x+1          x
                    dx =         −         +              dx
        x(x2 + 1)2             x    x2 + 1    (x2 + 1)2
                         ˆ         ˆ               ˆ           ˆ
                             dx         x               dx          x dx
                       =         −           dx −            +
                              x       x2 + 1         x2 + 1       (x + 1)2
                                                                    2
                                  1                             1
                       = ln |x| − ln(x2 + 1) − tan−1 x −              +K
                                  2                         2(x2 + 1)        14
Example
    ˆ
        x2 + 1
Find             dx.
       x(x2 + 3)
Solution. Let u = x3 + 3x. Then du = (3x2 + 3) dx = 3(x2 + 1) dx.
      ˆ                    ˆ
           x2 + 1       1    1      1              1
                   dx =        dx = ln |u| + C = ln |x3 + 3x| + C
         x(x2 + 3)      3    u      3              3
                                                                    15
Remark
   ˆ
        1         1
(1)          dx = ln |ax + b| + C
      ax + b      a
    ˆ
          1              1
(2)             dx =          (ax + b)1−m + C,   (m > 1)
      (ax + b)m      a(1 − m)
Remark
                                       b
                                          e      b
                dx + e       d    x + 2a  + d − 2a
              2         m
                          =  m
                                                   m
           (ax + bx + c)    a         b 2
                                (x + 2a ) + 4ac−b
                                                  2
                                              4a2
                                  u+ℓ
                           := A
                               (u2 + k2 )m
                             A     2u              1
                           =               + Aℓ 2
                             2 (u2 + k2 )m     (u + k2 )m
                                                            16
Remark
   ˆ
          2u
(1)             du = ln |u2 + k2 | + C
       u2 + k 2
    ˆ
            2u               1
(2)                du =            (u2 + k2 )1−m + C, (m > 1)
       (u2 + k2 )m        (1 − m)
    ˆ
           1          1        u
(3)     2     2
                du = tan−1           +C
       u +k          k          k
(4)
    ˆ
             1
                   du
       (u2 + k2 )m
                                                  ˆ
             1             u            2m − 3             1
     =                              +                              du       (m > 1)
       2(m − 1)k2 (u2 + k2 )m−1       2(m − 1)k2     (u2 + k2 )m−1
Proof.
ˆ
         1
                 du
   (u2 + k2 )m−1
                                 ˆ
       1                                   u2
=u 2           + 2(m − 1)                           du
  (u + k2 )m−1                       (u2   + k 2 )m
                                 ˆ                                 ˆ
            1                          u2 + k 2                             1
=u                  + 2(m − 1)                   du − 2(m − 1)k2                   du
      (u2 + k2 )m−1                  (u2 + k2 )m                       (u2 + k2 )m
                                                                                        17
Rationalizing substitutions
Some nonrational functions can be changed into rational functions by means of
appropriate substitutions.
                        p In particular, when an integrand p
                                                           contains an
expression of the form n g(x), then the substitution u = n g(x) may be
effective.
Example ˆ √
              x+4
Evaluate           dx.
               x
                 √
Solution. Let u = x + 4. Then u2 = x + 4, so x = u2 − 4 and dx = 2u du
              ˆ √           ˆ                      ˆ
                 x+4              u                     u2
                       dx =            2u  du  = 2           du
                  x             u2 − 4                u2 − 4
                              ˆ                
                                           4
                          =2       1+ 2            du
                                       u −4
                              ˆ          ˆ
                                               du
                          = 2 du + 8
                                             u2 − 4
                                       1       u−2
                          = 2u + 8 ·        ln         +C
                                     2·2       u+2
                                               √
                             √                   x+4−2
                          = 2 x + 4 + 2 ln √                 +C
                                                 x+4+2
                                                                                18