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

Jan 26, 2016

$3 \ln \left\mid x - 1 \right\mid + \ln \left({x}^{2} + 1\right) - 4 \arctan \left(x\right) + C$

#### Explanation:

Split the fraction up. $x + 1$ is linear, so its numerator will just be $A$, whereas ${x}^{2} + 1$ is irreducible (over the real numbers) so it will be in the form $B x + C$.

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

Which becomes

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

$5 {x}^{2} - 2 x - 1 = A {x}^{2} + A + B {x}^{2} + B x + C x + C$

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

Giving the system:

$\left\{\begin{matrix}A + B = 5 \\ B + C = - 2 \\ A + C = - 1\end{matrix}\right.$

Subtract the last from the middle to see that $B - A = - 1$, which can be added to the first equation to see that $2 B = 4 \implies B = 2$.

Substitute this to see that $A = 3$ and $C = - 4$.

This gives the partial fraction decomposition of

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

So, we now want to find

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

The first integral is simple:

$= 3 \ln \left\mid x - 1 \right\mid + \int \frac{2 x - 4}{{x}^{2} + 1} \mathrm{dx}$

In the second, you should realize the $\frac{\mathrm{du}}{u}$ pattern in $\frac{2 x}{{x}^{2} + 1}$, which is indicative of a natural log. However, this doesn't account for the leftover $- 4$.

$= 3 \ln \left\mid x - 1 \right\mid + \int \frac{2 x}{{x}^{2} + 1} \mathrm{dx} - \int \frac{4}{{x}^{2} + 1} \mathrm{dx}$

We can now deal with the $\frac{\mathrm{du}}{u}$ we identified:

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

Recall that the absolute value signs aren't necessary since ${x}^{2} + 1$ is always positive.

To deal with $\frac{4}{{x}^{2} + 1}$, recognize that this is simply $4$ times the derivative of the $\arctan \left(x\right)$ function, giving a final answer of

$= 3 \ln \left\mid x - 1 \right\mid + \ln \left({x}^{2} + 1\right) - 4 \arctan \left(x\right) + C$