Indefinite Integration

Evaluate $\displaystyle \int \dfrac{x^3 - 6 x^2 + 10 x - 2}{x^2 - 5 x + 6} \; dx$


Let $I = \displaystyle \int \dfrac{x^3 - 6 x^2 + 10 x - 2}{x^2 - 5 x + 6} \; dx$ $\;\;\; \cdots \; (1)$

$\begin{array}{rll} x^2 - 5 x + 6 ) & x^3 - 6 x^2 + 10 x - 2 & (x - 1 \\ & \underline{x^3 - 5 x^2 + 6 x} & \\ & \hspace{6mm} - x^2 \; + 4 x \; - 2 & \\ & \hspace{6mm} \underline{- x^2 \; + 5 x \; - 6} & \\ & \hspace{15mm} - x \; + \; 4 & \end{array}$

$\therefore$ $\;$ $\dfrac{x^3 - 6 x^2 + 10 x - 2}{x^2 - 5 x + 6} = x - 1 + \dfrac{4 - x}{x^2 - 5 x + 6}$ $\;\;\; \cdots \; (2)$

In view of equation $(2)$, equation $(1)$ becomes

$I = \displaystyle \int x \; dx - \displaystyle \int dx + \displaystyle \int \dfrac{4 - x}{x^2 - 5 x + 6} \; dx$ $\;\;\; \cdots \; (3)$

Now, $\displaystyle \int x \; dx = \dfrac{x^2}{2} + c_1$ $\;\;\; \cdots \; (4)$

$\displaystyle \int dx = x + c_2$ $\;\;\; \cdots (5)$

$\displaystyle \int \dfrac{4 - x}{x^2 - 5 x + 6} \; dx = \displaystyle \int \dfrac{4 - x}{\left(x - 2\right) \left(x - 3\right)} \; dx$ $\;\;\; \cdots \; (6)$

Let $\dfrac{4 - x}{\left(x - 2\right) \left(x - 3\right)} = \dfrac{A}{x - 2} + \dfrac{B}{x - 3}$ $\;\;\; \cdots \; (6a)$

i.e. $4 - x = A \left(x - 3\right) + B \left(x - 2\right)$

When $x = 2$, $2 = - A$ $\implies$ $A = -2$

When $x = 3$, $B = 1$

Substituting the values of A and B in equation $(6a)$ gives

$\dfrac{4 - x}{\left(x - 2\right) \left(x - 3\right)} = \dfrac{-2}{x - 2} + \dfrac{1}{x - 3}$ $\;\;\; \cdots \; (6b)$

$\therefore$ $\;$ In view of equation $(6b)$ equation $(6)$ becomes

$\begin{aligned} \int \dfrac{4 - x}{x^2 - 5 x + 6} \; dx & = - 2 \int \dfrac{dx}{x - 2} + \int \dfrac{dx}{x - 3} \\\\ & = -2 \log \left|x - 2\right| + \log \left|x - 3\right| + c_3 \;\;\; \cdots \; (6c) \end{aligned}$

$\therefore$ $\;$ In view of equations $(4)$, $(5)$ and $(6c)$, equation $(3)$ becomes

$I = \dfrac{x^2}{2} - x - 2 \log \left|x - 2\right| + \log \left|x - 3\right| + c$

where $c = c_1 - c_2 + c_3$