Computing integrals (4): Rational functions

 Recall that a rational function is a function of the form \(p(x)/q(x)\) where \(p(x)\) and \(q(x)\) are polynomial functions with real coefficients. We now consider the integration of such functions in general.



A polynomial function

\[f(x) = a_nx^n + a_{n-1}x^{n-1} + \cdots + a_1x + a_0 ~~ (a_0, a_1,\cdots, a_n\in\mathbb{R}),\]

has an anti-derivative

\[\int f(x)dx = \frac{a_n}{n+1}x^{n+1} + \frac{a_{n-1}}{n}x^{n} + \cdots + \frac{a_1}{2}x^2 + a_0x.\]

Thus, the anti-derivative of a polynomial function is a polynomial function. What about rational functions? In general, anti-derivatives of a rational function may not be a rational function, but a sum of rational functions, logarithm, and inverse trigonometric functions. We use the following lemma (proof is omitted) to show this.

Lemma (Partial fraction decomposition)

Any rational function can be decomposed into a finite sum of rational functions of the following three forms:

  1. polynomials,
  2. \[\frac{k}{(x+a)^n}\] where \(a, k\in\mathbb{R}, n\in\mathbb{N}\),
  3. \[\frac{ex + d}{(x^2 + bx + c)^m}\] where \(b, c, d, e\in\mathbb{R}, b^2 - 4c < 0, m\in \mathbb{N}\). 

Example. Let us decompose \(f(x) = \frac{x+5}{x^2 + x - 2}\) into partial fractions. The denominator is factorized as \(x^2 + x - 2 = (x-1)(x+2)\). Therefore, assume
\[\frac{x+5}{x^2 + x - 2} = \frac{a}{x-1} + \frac{b}{x+2},\]
and we find \(a = 2\) and \(b = -1\) (how?). Therefore
\[\frac{x+5}{x^2 + x - 2} = \frac{2}{x-1} - \frac{1}{x+2}.\]

Example. Let us decompose
\[f(x) = \frac{x^5 - x^4 + 3x^3 -3x^2 - x - 2}{x^4 - x^3 - x + 1}\]
into partial fractions. Since the degree of the numerator is greater than that of the denominator, we can perform division to have
\[\frac{x^5 - x^4 + 3x^3 -3x^2 - x - 2}{x^4 - x^3 - x + 1} = x + \frac{3x^3 - 2x^2 - 2x - 2}{x^4 - x^3 - x + 1}.\]
The denominator can be factorized as
\[x^4 - x^3 - x + 1 = (x-1)^2(x^2 + x + 1).\]
So, let us assume
\[\frac{3x^3 - 2x^2 - 2x - 2}{x^4 - x^3 - x + 1} = \frac{ax+b}{x^2 + x + 1} + \frac{c}{x-1} + \frac{d}{(x-1)^2}\]
and we find \(a = b = 1\), \(c = 2\), \(d = -1\) (exercise!). Therefore, the desired decomposition is obtained as
\[\frac{x^5 - x^4 + 3x^3 -3x^2 - x - 2}{x^4 - x^3 - x + 1} = x + \frac{x+1}{x^2 + x + 1} + \frac{2}{x-1} - \frac{1}{(x-1)^2}.\] □

To find an anti-derivative of a rational function, we need to find the anti-derivatives of three types of functions in the Partial Fraction Decomposition Lemma.
  1. As we have seen already, the anti-derivative of a polynomial is a polynomial.
  2. For \(\int\frac{k}{(x+a)^n}dx = k\int\frac{dx}{(x+a)^n}\), we have \[ k\int\frac{dx}{(x+a)^n} = \left\{ \begin{array}{cc} \frac{k}{(1-n)(x+a)^{n-1}} & (n \geq 2),\\ k\log|x + a| & (n = 1). \end{array}\right. \]
  3. Finally, consider \(\frac{ex + d}{(x^2 + bx + c)^m}\) where \(b, c, d, e \in \mathbb{R}\), \(b^2 - 4c < 0\) and \(m \in \mathbb{N}\). With \(h = \frac{\sqrt{4c - b^2}}{2} > 0\), we have \[ \begin{eqnarray*} x^2 + bx + c &=& \left(x + \frac{b}{2}\right)^2 + c - \frac{b^2}{4}\\ &=& \left(x + \frac{b}{2}\right)^2 + h^2\\ &=& h^2\left\{\left(\frac{2x + b}{2h}\right)^2 + 1\right\}\\ &=& h^2(z^2 + 1) \end{eqnarray*}\] where \[z = \frac{2x + b}{2h}.\] Thus, we have \[\int\frac{ex + d}{(x^2 + bx + c)^m}dx = \int\frac{e'z+d'}{(z^2 + 1)^m}dz\] where \[ \begin{eqnarray*} e' &=& \frac{e}{h^{2m-2}},\\ d' &=& \frac{-be + 2d}{2h^{2m-1}}. \end{eqnarray*} \] Therefore, it reduces to computing the following two anti-derivatives:
    • (a) \(\int\frac{z}{(z^2 + 1)^m}dz\),
    • (b) \(\int\frac{dz}{(z^2 + 1)^m}\)
    where \(m\in\mathbb{N}\).
    • (a) By the substitution \(w = z^2 + 1\), we have \[\int\frac{z}{(z^2 + 1)^m}dz = \frac{1}{2}\int\frac{dw}{w^m}\] which can be computed in the same manner as in Part 2.
    • (b) If \(m = 1\), we have \[\int\frac{dz}{z^2 + 1} = \arctan z.\] If \(m \geq 2\), we can use the recurrent equation given in Example (eg:recur) in Integration by parts.
Example. You should verify:
\[ \begin{eqnarray*} \int\frac{x+5}{x^2 + x - 2}dx &=& 2\log|x-1| - \log|x+2| + C.\\ \int\frac{x^5 - x^4 + 3x^3 - 3x^2 - x - 2}{x^4 - x^3 - x + 1}dx &=& \frac{1}{2}x^2 + \frac{1}{2}\log(x^2 + x + 1)\\ && + \frac{1}{\sqrt{3}}\arctan\frac{2x+1}{\sqrt{3}} + 2\log|x - 1|\\ && + \frac{1}{x-1} + C. \end{eqnarray*} \] 

Comments

Popular posts from this blog

Open sets and closed sets in \(\mathbb{R}^n\)

Euclidean spaces

Newton's method