This question was asked at Monday’s tutorial (10/01/11) but the fire alarm went off mid-solution

Section 6.4, Q. 5

Evaluate the following integral:

$\int\frac{(x-1)\,dx}{x^3-x^2-2x}$

Solution

(Remarks in italics are by me and would not be required in an exam situation)

Simplify the integrand to get it into a usable form:

$I=\int\frac{(x-1)\,dx}{x(x^2-x-2)}=\int\frac{(x-1)\,dx}{x(x-2)(x+1)}$

Rule 1 (Section 6.4)

Given a rational function $P(x)/Q(x)$ with $\text{deg}(P)<\text{deg}(Q)$, such that $Q(x)$ factors into non-repeated linear terms:

$Q(x)=(a_1x+b_1)(a_2x+b_2)\cdots(a_nx+b_n)$

(non-repeated means that no linear term  is equal to a constant multiple of another; e.g. $(a_ix+b_i)=k(a_jx+b_j)$ for $i\neq j$, $k\in \mathbb{C}$)

Then

$\frac{P(x)}{Q(x)}=\frac{A_1}{a_1x+b_1}+\frac{A_2}{a_2x+b_2}+\cdots+\frac{A_n}{a_nx+b_n}$

for some constants $A_1,A_2,\dots,A_n\in\mathbb{C}$.

Now

$\frac{(x-1)}{x(x-2)(x+1)}=\frac{A}{x}+\frac{B}{x-2}+\frac{C}{x+1}$

$=\frac{A(x-2)(x+1)+Bx(x+1)+Cx(x-2)}{x(x-2)(x+1)}$

$\Rightarrow x-1=A(x-2)(x+1)+Bx(x+1)+Cx(x-2)$   (*)

At this point we have two options:

1. Multiply out and rearrange the right-hand side into a quadratic in $x$. Compare and set equal the coefficients of $x^2$, $x$ and the constant terms to generate three simultaneous equations for $A,B,C\in\mathbb{C}$.
2. Choose three values of $x$ (say $x=0,-1,2$ for ease of computation, see the note below) to generate three simultaneous equations for $A,B,C\in\mathbb{C}$. We’ll use this method here:

$\underline{x=0}$,

$0-1=A(-2)(1)+B(0)(1)+C(0)(-2)$

$\Rightarrow A=1/2$

$\underline{x=-1}$,

$-1-1=A(-3)(0)+B(-1)(0)+C(-1)(-3)$

$\Rightarrow C=-2/3$

$\underline{x=2}$,

$2-1=A(0)(3)+B(2)(3)+C(2)(0)$

$\Rightarrow B=1/6$

$\frac{(x-1)}{x(x-2)(x+1)}=\frac{1}{2}.\frac{1}{x}+\frac{1}{6}.\frac{1}{x-2}+\frac{-2}{3}\frac{C}{x+1}$

$\Rightarrow I=\int\left(\frac{1}{2}.\frac{1}{x}+\frac{1}{6}.\frac{1}{x-2}+\frac{-2}{3}\frac{1}{x+1}\right)\,dx$

$=\frac{1}{2}\int\frac{1}{x}\,dx+\frac{1}{6}\int\frac{1}{x-2}\,dx+\frac{-2}{3}\int\frac{1}{x+1}\,dx$

Making the substitutions $u=x-2$ and $v=x+1$ (it’s always a good idea to do this rather than court difficulty with terms of the form $1/(ax+b)$ with $a\neq 1$), and noting $du=dv=dx$:

$=\frac{1}{2}\int\frac{1}{x}\,dx+\frac{1}{6}\int\frac{1}{u}\,du+\frac{-2}{3}\int\frac{1}{v}\,dv$

$=\frac{1}{2}\ln|x|+\frac{1}{6}\ln|u|+\frac{-2}{3}\ln|v|+C$

$=\frac{1}{2}\ln|x|+\frac{1}{6}\ln|x-2|+\frac{-2}{3}\ln|x+1|+C$

Recalling $\ln a+\ln b=\ln ab$, try to write this expression as $k\ln |p|+k\ln |q|+k\ln |r|$ for some $p,q,r$ functions of $x$:

$I =\frac{3}{6}\ln|x|+\frac{1}{6}\ln|x-2|+\frac{-4}{6}\ln|x+1|+C$

$=\frac{1}{6}\ln|x|^3+\frac{1}{6}\ln|x-2|+\frac{1}{6}\ln|x+1|^{-4}+C$

Now using $|x|^n=|x^n|$, $x^{-n}=1/x^n$, and $|a||b|=|ab|$:

$I=\frac{1}{6}\left(\ln|x^3|+\ln|x-2|+\ln\left(\frac{1}{|x+1|^4}\right)\right)+C$

$=\frac{1}{6}\ln\left(|x^3||x-2|\frac{1}{|x+1|^4}\right)+C$

$=\frac{1}{6}\ln\left|\frac{x^3(x-2)}{(x+1)^4}\right|+C$

$\Box$

Note: You may notice that in using technique 2. for finding $A,B,C$ that we use values of $x$ for which both sides of (*) are actually undefined. By means of the following general example let me show you why this is not a problem.

Example: Let $a,b\in\mathbb{R}$ such that $a\neq b$. Find the partial fraction decomposition of

$f(x)=\frac{1}{(x-a)(x-b)}$

Solution: In essence this question asks us to find real numbers $A,B$ such that:

$f(x)=\frac{1}{(x-a)(x-b)}=\frac{A}{x-a}+\frac{B}{x-b}$

These expressions must agree at all points except at $x=a,b$ where $f(x)$ is not defined. Suppose we multiply across by $(x-a)(x-b)$:

$1=A(x-b)+B(x-a)$  (**)

Now look at this equation in isolation, and forgetting about our original problem, we can see that we can find $A,B\in\mathbb{R}$, such that this equation holds for all $x\in\mathbb{R}$. It is an easy exercise to show that (**) is solved by: $A=1/(a-b)$ and $B=1/(b-a)$. That is for all $x\in\mathbb{R}$:

$1=\frac{1}{a-b}(x-b)+\frac{1}{b-a}(x-a)$

Now if we take this expression, and divide across by $(x-a)(x-b)$ we will get a new expression, which is true as long as we didn’t divide by zero, i.e. $(x-a)\neq 0,(x-b)\neq 0\Leftrightarrow x\neq a,b$. This statement is:

$\frac{1}{(x-a)(x-b)}=\frac{1/(a-b)}{x-a}+\frac{1/(b-a)}{x-b}$

These functions agree on $\mathbb{R}\backslash\{a,b\}$, as is our want.