Evaluate the following integral:
$\int \frac{x^{3}}{(x-1)(x-2)(x-3)} d x$
First we simplify numerator, we will rewrite denominator as shown below
$\frac{x^{3}}{(x-1)(x-2)(x-3)}=\frac{x^{3}}{x^{3}-6 x^{2}+11 x-6}$
Add and subtract numerator with $\left(-6 x^{2}+11 x-6\right)$, we get
$\frac{x^{3}-6 x^{2}+11 x-6+\left(6 x^{2}-11 x+6\right)}{x^{3}-6 x^{2}+11 x-6}$
$\Rightarrow=1+\frac{6 x^{2}-11 x+6}{x^{3}-6 x^{2}+11 x-6}$
$\Rightarrow=1+\frac{6 x^{2}-11 x+6}{(x-1)(x-2)(x-3)}$
The denominator is factorized, so let separate the fraction through partial fraction, hence let
$\frac{6 x^{2}-11 x+6}{(x-1)(x-2)(x-3)}=\frac{A}{(x-1)}+\frac{B}{x-2}+\frac{C}{x-3}$ ....(i
$\Rightarrow \frac{6 x^{2}-11 x+6}{(x-1)(x-2)(x-3)}$)
$=\frac{A(x-2)(x-3)+B(x-1)(x-3)+C(x-1)(x-2)}{(x-1)(x-2)(x-3)}$
$\Rightarrow 6 x^{2}-11 x+6=A(x-2)(x-3)+B(x-1)(x-3)+C(x-1)(x-2) \ldots \ldots$ (ii)
We need to solve for A, B and C. One way to do this is to pick values for $x$ which will cancel each variable.
Put $x=1$ in the above equation, we get
$\Rightarrow 6(1)^{2}-11(1)+6=A(1-2)(1-3)+B(1-1)(1-3)+C(1-1)(1-2)$
$\Rightarrow 1=2 A+0+0$
$\Rightarrow A=\frac{1}{2}$
Now put $x=2$ in equation (ii), we get
$6(2)^{2}-11(2)+6=A(2-2)(2-3)+B(2-1)(2-3)+C(2-1)(2-2)$
$\Rightarrow 8=0-B+0$
$\Rightarrow B=-8$
Now put $x=3$ in equation (ii), we get
$\Rightarrow 6(3)^{2}-11(3)+6=A(3-2)(3-3)+B(3-1)(3-3)+C(3-1)(3-2)$
$\Rightarrow 27=0+0+2 C$
$\Rightarrow C=\frac{27}{2}$
We put the values of $A, B$, and $C$ values back into our partial fractions in equation (i) and replace this as the integrand. We get
$\int\left[1+\frac{6 x^{2}-11 x+6}{(x-1)(x-2)(x-3)}\right] d x$
$\Rightarrow \int\left[1+\frac{\mathrm{A}}{(\mathrm{x}-1)}+\frac{\mathrm{B}}{\mathrm{x}-2}+\frac{\mathrm{C}}{\mathrm{x}-3}\right] \mathrm{dx}$
$\Rightarrow \int\left[1+\frac{\frac{1}{2}}{(\mathrm{x}-1)}+\frac{-8}{\mathrm{x}-2}+\frac{\frac{27}{2}}{\mathrm{x}-3}\right] \mathrm{dx}$
Split up the integral,
$\Rightarrow \int 1 \mathrm{dx}+\frac{1}{2} \int\left[\frac{1}{\mathrm{x}-1}\right] \mathrm{dx}-8 \int\left[\frac{1}{\mathrm{x}-2}\right] \mathrm{dx}+\frac{27}{2} \int\left[\frac{1}{\mathrm{x}-3}\right] \mathrm{dx}$
Let substitute
$u=x-1 \Rightarrow d u=d x$
$y=x-2 \Rightarrow d y=d x$ and
$z=x-3 \Rightarrow d z=d x$, so the above equation becomes,
$\Rightarrow \int 1 \mathrm{dx}+\frac{1}{2} \int\left[\frac{1}{\mathrm{u}}\right] \mathrm{du}-8 \int\left[\frac{1}{\mathrm{y}}\right] \mathrm{dy}+\frac{27}{2} \int\left[\frac{1}{\mathrm{z}}\right] \mathrm{dz}$
On integrating we get
$\Rightarrow x+\frac{1}{2} \log |u|-8 \log |y|+\frac{27}{2} \log |z|+C$
Substituting back, we get
$\Rightarrow x+\frac{1}{2} \log |x-1|-8 \log |x-2|+\frac{27}{2} \log |x-3|+C$
Note: the absolute value signs account for the domain of the natural log function $(x>0)$.
Hence,
$\int \frac{x^{3}}{(x-1)(x-2)(x-3)} d x$
$=x+\frac{1}{2} \log |x-1|-8 \log |x-2|+\frac{27}{2} \log |x-3|+C$
Note: the absolute value signs account for the domain of the natural log function $(x>0)$.
Hence,
$\int \frac{x^{3}}{(x-1)(x-2)(x-3)} d x$
$=x+\frac{1}{2} \log |x-1|-8 \log |x-2|+\frac{27}{2} \log |x-3|+C$