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

Jun 11, 2017

$\int \frac{3 {x}^{2} - 2 x + 5}{{x}^{2} + 1} ^ 2 \mathrm{dx} = 4 \arctan x + \frac{x + 1}{{x}^{2} + 1} + C$

#### Explanation:

Write the numerator as:

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

so that:

$\int \frac{3 {x}^{2} - 2 x + 5}{{x}^{2} + 1} ^ 2 \mathrm{dx} = 3 \int \frac{\mathrm{dx}}{1 + {x}^{2}} - \int \frac{2 x \mathrm{dx}}{{x}^{2} + 1} ^ 2 + 2 \int \frac{\mathrm{dx}}{{x}^{2} + 1} ^ 2$

Now solve the integral separately:

$\int \frac{\mathrm{dx}}{1 + {x}^{2}} = \arctan x + {C}_{1}$

$\int \frac{2 x \mathrm{dx}}{{x}^{2} + 1} ^ 2 = \int \frac{d \left({x}^{2} + 1\right)}{{x}^{2} + 1} ^ 2 = - \frac{1}{{x}^{2} + 1} + {C}_{2}$

The third integral can be resolved by substituting:

$x = \tan t$

$\mathrm{dx} = \frac{\mathrm{dt}}{\cos} ^ 2 t$

$\int \frac{\mathrm{dx}}{{x}^{2} + 1} ^ 2 = \int \frac{\mathrm{dt}}{{\cos}^{2} t {\left(1 + {\tan}^{2} t\right)}^{2}}$

use now the identity:

$1 + {\tan}^{2} t = \frac{1}{\cos} ^ 2 t$

$\int \frac{\mathrm{dx}}{{x}^{2} + 1} ^ 2 = \int \frac{\mathrm{dt}}{{\cos}^{2} \frac{t}{\cos} ^ 4 t} = \int {\cos}^{2} t \mathrm{dt}$

and as ${\cos}^{2} t = \frac{1 + \cos 2 t}{2}$

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

$\int \frac{\mathrm{dx}}{{x}^{2} + 1} ^ 2 = \frac{t}{2} + \frac{1}{4} \int \cos \left(2 t\right) d \left(2 t\right)$

$\int \frac{\mathrm{dx}}{{x}^{2} + 1} ^ 2 = \frac{t}{2} + \sin \frac{2 t}{4} + {C}_{3}$

Use now the parametric formula:

$\sin \left(2 t\right) = \frac{2 \tan t}{1 + {\tan}^{2} t}$

to undo the substitution:

$\int \frac{\mathrm{dx}}{{x}^{2} + 1} ^ 2 = \arctan \frac{x}{2} + \frac{1}{2} \frac{x}{1 + {x}^{2}} + {C}_{3}$

Putting it together:

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

$\int \frac{3 {x}^{2} - 2 x + 5}{{x}^{2} + 1} ^ 2 \mathrm{dx} = 4 \arctan x + \frac{x + 1}{{x}^{2} + 1} + C$

Jun 12, 2017

This answer will only look at the partial fraction decomposition of the integrand as its integral has already been evaluated in the other answer.

#### Explanation:

$\frac{3 {x}^{2} - 2 x + 5}{{x}^{2} + 1} ^ 2 \equiv \frac{A + B x}{{x}^{2} + 1} + \frac{C + D x}{{x}^{2} + 1} ^ 2$

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

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

Compare coefficients of all $x$-terms

$5 = A + C$ (1)

$- 2 = B + D$ (2)

$3 = A$ (3)

$0 = B$ (4)

Sub (4) into (2) and (3) into (1)

$- 2 = D$

$5 = 3 + C \Rightarrow C = 2$

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

This can be rewritten as:

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

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