# How do you integrate int (x^3 +x^2+2x+1) / [(x^2+1) (x^2+2)] using partial fractions?

Feb 22, 2016

$\frac{1}{2} \ln \left({x}^{2} + 1\right) + \frac{1}{\sqrt{2}} \arctan \left(\frac{x}{\sqrt{2}}\right) + C$

$\frac{1}{2} \ln \left({x}^{2} + 1\right) + \sqrt{2} \arctan \left(\frac{x}{\sqrt{2}}\right) + C$

#### Explanation:

Note: If the denominator of the partial fraction is not factorable, always remember the degree of the numerator is one less. Like the problem

Step 1: Find the equivalent partial fraction

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

Step 2 Solve the partial fraction by multiply by Least common denominator to get

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

Step 3: Multiply/expand/foil the right hand side to get

${x}^{3} + {x}^{2} + 2 x + 1 = A {x}^{3} + 2 A x + B {x}^{2} + 2 B + C {x}^{3} + C x + D {x}^{2} + D$

Step 4: Set up the system of equation, using the corresponding coefficient for the corresponding terms

${x}^{3} \text{ "term" " } 1 = A + C$
${x}^{2} \text{ "term" " } 1 = B + D$
$x \text{ "term" " } 2 = 2 A + C$
${x}^{0} \text{ "term" " } 1 = 2 B + D$

Step 5: Solve the system of equation
$- 2 \left(1 = A + C\right) \implies - 2 = - 2 A + 2 C$

$+ \left(2 = 2 A + C\right)$
$0 = 3 C \implies C = 0$ , $A = 1$

$- 1 \left(2 B + D = 1\right) \implies - 2 B - D = - 1$

$+ \left(B + D = 1\right)$
$- B = 0 \implies B = 0 , D = 1$

Step 6: Write the equivalent partial fraction for the integral like this

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

Step 7 Integrate the integral

the first integral can be done by u substitution like this

let $u = {x}^{2} + 1$
$\mathrm{du} = 2 x \mathrm{dx} \implies \frac{\mathrm{du}}{2} = x \mathrm{dx}$
Note: $\int \frac{\mathrm{dx}}{x} = \ln | x | + C \text{ " "or" " } \log | x | + C$

The second integral is $\arctan$ , remember $\int \frac{1}{{a}^{2} + {u}^{2}} \mathrm{du} = \frac{1}{a} \arctan t \frac{u}{a} + C$

$\frac{1}{2} \ln \left({x}^{2} + 1\right) + \frac{1}{\sqrt{2}} \arctan \left(\frac{x}{\sqrt{2}}\right) + \text{Constant}$
I let my constant value to be $C$
this is another answer: $\frac{1}{2} \ln \left({x}^{2} + 1\right) + \frac{1}{\sqrt{2}} \arctan \left(\frac{x}{\sqrt{2}}\right) + C$ or
$\frac{1}{2} \ln \left({x}^{2} + 1\right) + \sqrt{2} \arctan \left(\frac{x}{\sqrt{2}}\right) + C$