# How do you evaluate the integral int (x^5+3x^2+1)/(x^4-1)dx?

Jan 10, 2018

The answer is $= {x}^{2} / 2 - \frac{3}{4} \ln \left(| x + 1 |\right) + \frac{5}{4} \ln \left(| x - 1 |\right) - \frac{1}{4} \ln \left({x}^{2} + 1\right) + \arctan x + C$

#### Explanation:

We need

$\int \frac{\mathrm{dx}}{{x}^{2} + 1} = \arctan \left(x\right)$

As the degree of the numerator is greater than the degree of the denominator, perform a long division first.

$\frac{{x}^{5} + 3 {x}^{2} + 1}{{x}^{4} - 1} = x + \frac{3 {x}^{2} + x + 1}{{x}^{4} - 1}$

Perform a decomposition into partial fractions

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

$= \frac{A x + B}{{x}^{2} + 1} + \frac{C}{x + 1} + \frac{D}{x - 1}$

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

The denominators are the same , compare the numerators

$3 {x}^{2} + x + 1 = \left(A x + B\right) \left(x + 1\right) \left(x - 1\right) + C \left({x}^{2} + 1\right) \left(x - 1\right) + D \left({x}^{2} + 1\right) \left(x + 1\right)$

Let $x = 1$, $\implies$, $5 = 4 D$, $\implies$, $D = \frac{5}{4}$

Let $x = - 1$, $\implies$, $3 = - 4 C$, $\implies$, $C = - \frac{3}{4}$

Let $x = 0$, $\implies$, $1 = - B - C + D$, $\implies$, $B = \frac{5}{4} + \frac{3}{4} - 1 = 1$

Coefficients of ${x}^{3}$

$0 = A + C + D$, $\implies$, $A = - C - D = \frac{3}{4} - \frac{5}{4} = - \frac{1}{2}$

Therefore,

$\frac{{x}^{5} + 3 {x}^{2} + 1}{{x}^{4} - 1} = x + \frac{- \frac{1}{2} x + 1}{{x}^{2} + 1} + \frac{- \frac{3}{4}}{x + 1} + \frac{\frac{5}{4}}{x - 1}$

So,

$\int \frac{\left({x}^{5} + 3 {x}^{2} + 1\right) \mathrm{dx}}{{x}^{4} - 1} = \int x \mathrm{dx} + \int \frac{\left(- \frac{1}{2} x + 1\right) \mathrm{dx}}{{x}^{2} + 1} + \int \frac{- \frac{3}{4} \mathrm{dx}}{x + 1} + \int \frac{\frac{5}{4} \mathrm{dx}}{x - 1}$

$\int x \mathrm{dx} = {x}^{2} / 2$

$\int \frac{- \frac{3}{4} \mathrm{dx}}{x + 1} = - \frac{3}{4} \ln \left(| x + 1 |\right)$

$\int \frac{\frac{5}{4} \mathrm{dx}}{x - 1} = \frac{5}{4} \ln \left(| x - 1 |\right)$

$\int \frac{\left(- \frac{1}{2} x + 1\right) \mathrm{dx}}{{x}^{2} + 1} = - \frac{1}{4} \int \frac{2 x \mathrm{dx}}{{x}^{2} + 1} + \int \frac{\mathrm{dx}}{{x}^{2} + 1} = - \frac{1}{4} \ln \left({x}^{2} + 1\right) + \arctan x$

Finally,

$\int \frac{\left({x}^{5} + 3 {x}^{2} + 1\right) \mathrm{dx}}{{x}^{4} - 1} = {x}^{2} / 2 - \frac{3}{4} \ln \left(| x + 1 |\right) + \frac{5}{4} \ln \left(| x - 1 |\right) - \frac{1}{4} \ln \left({x}^{2} + 1\right) + \arctan x + C$