5.10 Integration of rational Functions

5.10.1 Partial fractions

L&T, 2.12.2.1

Before dealing with partial fractions, we need to define a rational function.

A rational function is one with the form f(x) = P(x)∕Q(x) (Q(x)\mathrel{≠}0), where P(x) and Q(x) are polynomials.

Partial fractions is a method of simplifying a rational function. For the present we shall only consider rational functions where the degree of the numerator is less than that of the denominator (not equal). If this is not true then we can convert it into this form–see later (integration section). First factorise the denominator Q(x) into a mixture of linear and quadratic factors. This can always be done without using complex numbers (use linear factors only if possible). E.g.,

\class{boxed}{ {x}^{3} − 2{x}^{2} + x − 12 = (x − 3)({x}^{2} + x + 4). }

We can now simplify the rational function using partial fractions. We do this by means of examples as part of the revision.

Example 5.19: 

Simplify {3x−1\over 2{x}^{2}−x−1} using partial fractions.

Solution: 

{3x − 1\over 2{x}^{2} − x − 1} = {3x − 1\over (x − 1)(2x + 1)}.

We have factorised the denominator). Now put

{3x − 1\over (x − 1)(2x + 1)} = {A\over x − 1} + {B\over 2x + 1}

(A,B constants). Multiply both sides by (x − 1)(2x + 2), the denominator of the left-hand side. We find

3x − 1 = A(2x + 1) + B(x − 1).
(5.3)

Now compare coefficients on both sides. First x: 3 = 2A + B, and for the constant term we find − 1 = A − B. We solve these simultaneous linear equations, and find A = {2\over 3},B = {5\over 3}. So

\class{boxed}{ {3x − 1\over (x − 1)(2x + 1)} = {2\over 3(x − 1)} + {5\over 3(2x + 1)}. }

Alternatively we can find A and B by choosing values for x. If we choose x = 1 then (5.3) becomes 2 = 3A + 0B, and therefore A = (2∕3). If we choose x = −(1∕2) then it becomes − (5∕2) = 0A − (3∕2)B, and therefore B = 5∕3, in agreement with our previous results.

Example 5.20: 

Simplify {x+1\over x({x}^{2}−4)} using partial fractions.

Solution: 

{x + 1\over x({x}^{2} − 4)} = {x + 1\over x(x − 2)(x + 2)} = {A\over x} + {B\over x − 2} + {C\over x + 2},

(left as an exercise, A = −1∕4, B = 3∕8, C = −1∕8).

Example 5.21: 

Simplify {{x}^{2}\over (x−1){(x−2)}^{3}} using partial fractions.

Solution: 

{{x}^{2}\over (x − 1){(x − 2)}^{3}} = {A\over (x − 1)} + {B\over (x − 2)} + {C\over { (x − 2)}^{2}} + {D\over { (x − 2)}^{3}},

where we have one term for each power of the factor up to the maximum. Multiply by (x − 1){(x − 2)}^{3} and equate coefficients.

{x}^{2} = A{(x − 2)}^{3} + B(x − 1){(x − 2)}^{2} + C(x − 1)(x − 2) + D(x − 1).

Substitute x = 2: 4 = 0 + 0 + 0 + D so D = 4. x = 1: 1 = −A + 0 + 0 + 0 so A = −1. Equate the coefficients of {x}^{3}: 0 = A + B + 0 + 0, so B = 1, and the coefficients of constant term: 0 = −8A − 4B + 2C − D, and thus C = 0.

\class{boxed}{ {{x}^{2}\over (x − 1){(x − 2)}^{3}} = − {1\over (x − 1)} + {1\over (x − 2)} − {1\over { (x − 2)}^{3}}. }

Example 5.22: 

Simplify {x+5\over { x}^{3}−1} using partial fractions.

Solution: 

First factorise Q(x), {x}^{3} − 1 = (x − 1)({x}^{2} + x + 1). We cannot factorise {x}^{2} + x + 1 into their factors with real coefficients. Write

{x + 5\over { x}^{3} − 1} = {A\over x − 1} + {B + Cx\over { x}^{2} + x + 1}.

Multiply with {x}^{3} − 1,

x + 5 = A({x}^{2} + x + 1) + B + Cx(x − 1),

substitute x = 1: 3A = 6, or A = 2. Equate coefficients of {x}^{2}: A + C = 0, C = −2. Equate coefficients of the constant part: A − B = 5, B = −3.

\class{boxed}{ {x + 5\over { x}^{3} − 1} = {2\over x − 1} − {3 + 2x\over { x}^{2} + x + 1}. }

A rational function is a function of the form f(x) = P(x)∕Q(x) where P and Q are both polynomials.

Integration of such functions are dealt with according to the following procedure:

Example 5.24: 

Integrate \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits (3{x}^{2} + x + 3)∕({x}^{3} − {x}^{2} + 2)\kern 1.66702pt dx.

Solution: 

This integrand can be rewritten as

\begin{eqnarray*} {3{x}^{2} + x + 3\over {x}^{3} − {x}^{2} + 2}& =& {3{x}^{2} + x + 3\over (x + 1)({x}^{2} − 2x + 2)} = {A\over x + 1} + {Bx + C\over { x}^{2} − 2x + 2}\quad .%& \\ \end{eqnarray*}

To find A, B, C, we need to solve

3{x}^{2} + x − 3 = A({x}^{2} − 2x + 2) + (Bx + C)(x + 1)\quad .

We can get one of the values for almost free, using x = −1: 5A = −1, or A = −1∕5. We solve for the rest by equating the coefficients of identical powers of x,

We have reexpressed the integral as

\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {3{x}^{2} + x + 3\over {x}^{3} − {x}^{2} + 2}\kern 1.66702pt dx = −{1\over 5}\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over x + 1}\kern 1.66702pt dx + {1\over 5}\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {16x − 13\over { x}^{2} − 2x + 2}\kern 1.66702pt dx.

The first term (1∕(x + 1)) is easy to integrate and gives \mathop{ln}\nolimits (x + 1). Let us therefore concentrate on the second term

\begin{eqnarray*} \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {16x − 13\over { x}^{2} − 2x + 2}\kern 1.66702pt dx& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {8(2x − 2) + 5\over {x}^{2} − 2x + 2} \kern 1.66702pt dx %& \\ & =& 8\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {({x}^{2} − 2x + 2)'\over {x}^{2} − 2x + 2} \kern 1.66702pt dx +\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits {5\over { x}^{2} − 2x + 2}\kern 1.66702pt dx%& \\ & =& 8\mathop{ln}\nolimits ({x}^{2} − 2x + 2) +\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits {5\over { x}^{2} − 2x + 2}\kern 1.66702pt dx. %& \\ \end{eqnarray*}

Here we have used the fact that the differential of the denominator is 2x − 2. The remaining integral is treated by completing the square,

{x}^{2} − 2x + 2 = {(x − 1)}^{2} + 1,

which allows us to write

\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {5\over { x}^{2} − 2x + 2}\kern 1.66702pt dx = 5{\mathop{tan}\nolimits }^{−1}(x − 1)

Using the two previous examples we conclude that

\class{boxed}{ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {2{x}^{3} + {x}^{2} + x + 1\over ({x}^{3} − {x}^{2} + 2)} \kern 1.66702pt dx = 2x −{1\over 5}\mathop{ln}\nolimits (x + 1) + {8\over 5}\mathop{ln}\nolimits ({x}^{2} − 2x + 2) −{3\over 5}{\mathop{tan}\nolimits }^{−1}(x − 1)\quad . }