# Question #99cca

Jan 7, 2018

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

#### Explanation:

$\int {x}^{4} / \left({x}^{3} + 2 {x}^{2} - x - 2\right) \mathrm{dx}$

$= \int \frac{{x}^{4} + 2 {x}^{3} - {x}^{2} - 2 x}{{x}^{3} + 2 {x}^{2} - x - 2} + \frac{- 2 {x}^{3} + {x}^{2} + 2 x}{{x}^{3} + 2 {x}^{2} - x - 2} \mathrm{dx}$ (split fraction so the first fraction will be divisible by the denominator. this reduces the power of the numerator of the resulting fraction from 4 to 3)

$= \int x + \frac{- 2 {x}^{3} - 4 {x}^{2} + 2 x + 4}{{x}^{3} + 2 {x}^{2} - x - 2} + \frac{5 {x}^{2} - 4}{{x}^{3} + 2 {x}^{2} - x - 2} \mathrm{dx}$ (split fraction again)

$= \frac{1}{2} {x}^{2} + \int - 2 + \frac{5 {x}^{2} - 4}{\left({x}^{2} - 1\right) \left(x + 2\right)} \mathrm{dx}$ (power rule integration and factorize denominator)

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

now use partial fraction decomposition for the fraction:

$\frac{5 {x}^{2} - 4}{\left(x + 1\right) \left(x - 1\right) \left(x + 2\right)} = \frac{A}{x + 1} + \frac{B}{x - 1} + \frac{C}{x + 2}$ (A, B, and C are constants)

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

if x=-1:

$5 {\left(- 1\right)}^{2} - 4 = A \left(- 1 - 1\right) \left(- 1 + 2\right) + B \left(- 1 + 1\right) \left(- 1 + 2\right) + C \left(- 1 + 1\right) \left(- 1 - 1\right)$
$1 = A \left(- 2\right) \left(1\right) + B \left(0\right) \left(1\right) + C \left(0\right) \left(- 2\right)$
$1 = A \left(- 2\right)$
$- \frac{1}{2} = A$

if x=1:

$5 {\left(1\right)}^{2} - 4 = A \left(1 - 1\right) \left(1 + 2\right) + B \left(1 + 1\right) \left(1 + 2\right) + C \left(1 + 1\right) \left(1 - 1\right)$
$1 = A \left(0\right) \left(3\right) + B \left(2\right) \left(3\right) + C \left(2\right) \left(0\right)$
$1 = B \left(6\right)$
$\frac{1}{6} = B$

if x=-2:

$5 {\left(- 2\right)}^{2} - 4 = A \left(- 2 - 1\right) \left(- 2 + 2\right) + B \left(- 2 + 1\right) \left(- 2 + 2\right) + C \left(- 2 + 1\right) \left(- 2 - 1\right)$
$16 = A \left(- 3\right) \left(0\right) + B \left(- 1\right) \left(0\right) + C \left(- 1\right) \left(- 3\right)$
$16 = C \left(3\right)$
$\frac{16}{3} = C$

substitute:
$= \frac{1}{2} {x}^{2} - 2 x + \int \frac{- \frac{1}{2}}{x + 1} + \frac{\frac{1}{6}}{x - 1} + \frac{\frac{16}{3}}{x + 2} \mathrm{dx}$
$= \frac{1}{2} {x}^{2} - 2 x - \frac{1}{2} \ln | x + 1 | + \frac{1}{6} \ln | x - 1 | + \frac{16}{3} \ln | x + 2 | + C$ (integration to natural log)

Jan 7, 2018

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

#### Explanation:

The degree of the numerator is greater than the degree of the denominator, perform a polynomial long division.

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

Factorise the denominator,

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

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

Perform a decompostion into partial fractions

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

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

The denominator is the same, compare the numerator

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

Let $x = - 2$, $\implies$, $16 = 3 A$, $\implies$, $A = \frac{16}{3}$

Let $x = - 1$, $\implies$, $1 = - 2 B$, $\implies$, $B = - \frac{1}{2}$

Let $x = 1$, $\implies$, $1 = 6 C$, $\implies$, $C = \frac{1}{6}$

Therefore,

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

Perform the integration

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

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