# Evaluate the following integral:

Question:

Evaluate the following integral:

$\int \frac{5 x^{2}-1}{x(x-1)(x+1)} d x$

Solution:

Denominator is factorized, so let separate the fraction through partial fraction, hence let

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

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

$\Rightarrow 5 x^{2}-1=A(x-1)(x+1)+B x(x+1)+C x(x-1) \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=0$ in the above equation, we get

$\Rightarrow 5(0)^{2}-1=A(0-1)(0+1)+B(0)(0+1)+C(0)(0-1)$

$\Rightarrow A=1$

Now put $x=1$ in equation (ii), we get

$\Rightarrow 5(1)^{2}-1=A(1-1)(1+1)+B(1)(1+1)+C(1)(1-1)$

$\Rightarrow 4=0+2 B+0$

$\Rightarrow B=2$

Now put $x=-1$ in equation (ii), we get

$\Rightarrow 5(-1)^{2}-1=A(-1-1)(-1+1)+B(-1)(-1+1)+C(-1)(-1-1)$

$\Rightarrow 4=0+0+2 C$

$\Rightarrow C=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[\frac{5 x^{2}-1}{x(x-1)(x+1)}\right] d x$

$\Rightarrow \int\left[\frac{A}{x}+\frac{B}{x-1}+\frac{C}{x+1}\right] d x$

$\Rightarrow \int\left[\frac{1}{x}+\frac{2}{x-1}+\frac{2}{x+1}\right] d x$

Split up the integral,

$\Rightarrow \int\left[\frac{1}{x}\right] d x+2 \int\left[\frac{1}{x-1}\right] d x+2 \int\left[\frac{1}{x+1}\right] d x$

Let substitute

$u=x-1 \Rightarrow d u=d x$

$y=x+1 \Rightarrow d y=d x$, so the above equation becomes,

$\Rightarrow \int\left[\frac{1}{x}\right] d x+2 \int\left[\frac{1}{u}\right] d u+2 \int\left[\frac{1}{y}\right] d y$

On integrating we get

$\Rightarrow \log |x|+2 \log |u|+2 \log |y|+C$

Substituting back, we get

$\Rightarrow \log |x|+2 \log |x-1|+2 \log |x+1|+C$

Applying logarithm rule, we get

$\Rightarrow \log |x|+\log \left|(x-1)^{2}\right|+\log \left|(x+1)^{2}\right|+C$

$\Rightarrow \log \left|x\left(x^{2}-1\right)^{2}\right|+C$

Note: the absolute value signs account for the domain of the natural log function $(x>0)$.

Hence,

$\int \frac{5 x^{2}-1}{x(x-1)(x+1)} d x=\log \left|x\left(x^{2}-1\right)^{2}\right|+C$