# How do you integrate f(x)=x/((x^2+2)(x+4)(x-7)) using partial fractions?

Jul 27, 2017

$\int \setminus f \left(x\right) \setminus \mathrm{dx} = - \frac{29}{1700} \ln \left({x}^{2} + 1\right) - \frac{3}{850} \arctan x + \frac{4}{187} \ln | x + 4 | + \frac{7}{550} \ln | x - 7 | + C$

#### Explanation:

We have:

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

We can decompose into partial fractions, which will be of the form:

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

And after putting over a common denominator we end up with:

$x \equiv \left(A x + B\right) \left(x + 4\right) \left(x - 7\right) + C \left({x}^{2} + 1\right) \left(x - 7\right) + D \left({x}^{2} + 1\right) \left(x + 4\right)$

Where the coefficients $A , B , C , D$ are constants to be found.

We can use direct substitution

$x = 7 \implies 7 = 0 + 0 + D \left(49 + 1\right) \left(7 + 4\right) \implies D = \frac{7}{550}$
$x = - 4 \implies - 4 = 0 + C \left(16 + 1\right) \left(- 4 - 7\right) + 0 \implies C = \frac{4}{187}$

And we can compare coefficients:

${x}^{3} : 0 = A + C + D \implies A = - \frac{29}{850}$
${x}^{0} : 0 = - 28 B - 7 C + 4 D \implies B = - \frac{3}{850}$

Thus we have:

$f \left(x\right) = \frac{- \frac{29}{850} x - \frac{3}{850}}{{x}^{2} + 1} + \frac{\frac{4}{187}}{x + 4} + \frac{\frac{7}{550}}{x - 7}$

And so:

$\int f \left(x\right) \mathrm{dx} = - \frac{1}{850} \int \frac{29 x + 3}{{x}^{2} + 1} \mathrm{dx} + \frac{4}{187} \int \frac{1}{x + 4} \mathrm{dx} + \frac{7}{550} \int \frac{1}{x - 7} \mathrm{dx}$
$\text{ } = - \frac{1}{850} \int \frac{29 x + 3}{{x}^{2} + 1} \mathrm{dx} + \frac{4}{187} \ln | x + 4 | + \frac{7}{550} \ln | x - 7 | + C$

We need further work for the first integral:

$\int \setminus \frac{29 x + 3}{{x}^{2} + 1} \mathrm{dx} = \int \setminus \frac{29 x}{{x}^{2} + 1} + \frac{3}{{x}^{2} + 1} \mathrm{dx}$
$\text{ } = \frac{29}{2} \int \setminus \frac{2 x}{{x}^{2} + 1} \mathrm{dx} + 3 \int \frac{1}{{x}^{2} + 1} \mathrm{dx}$
$\text{ } = \frac{29}{2} \ln | {x}^{2} + 1 | + 3 \arctan x$

Combining we get:

$\int \setminus f \left(x\right) \setminus \mathrm{dx} = - \frac{1}{850} \left\{\frac{29}{2} \ln | {x}^{2} + 1 | + 3 \arctan x\right\} + \frac{4}{187} \ln | x + 4 | + \frac{7}{550} \ln | x - 7 | + C$

And, as ${x}^{2} + 1 > 0 \forall x \in \mathbb{R}$ we have:

$\int \setminus f \left(x\right) \setminus \mathrm{dx} = - \frac{29}{1700} \ln \left({x}^{2} + 1\right) - \frac{3}{850} \arctan x + \frac{4}{187} \ln | x + 4 | + \frac{7}{550} \ln | x - 7 | + C$