# How do you use partial fraction decomposition to decompose the fraction to integrate x/(x^2+4x+13)?

Jun 24, 2015

This function should not be integrated with partial fractions, but with a substitution (after completing the square in the denominator). The final answer is $\int \frac{x}{{x}^{2} + 4 x + 13} \setminus \mathrm{dx}$

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

#### Explanation:

The denominator cannot be factored without resorting to complex numbers, so we complete the square in the denominator instead.

Completing the square for the denominator ${x}^{2} + 4 x + 13$ can be done by taking the coefficient 4 of $x$, dividing it by 2 and squaring that to get 4, and then writing the denominator as ${x}^{2} + 4 x + 4 + 13 - 4 = \left({x}^{2} + 4 x + 4\right) + 9 = {\left(x + 2\right)}^{2} + 9$.

The integral can therefore be written as $\setminus \int \frac{x}{{x}^{2} + 4 x + 13} \setminus \mathrm{dx} = \setminus \int \frac{x}{{\left(x + 2\right)}^{2} + 9} \setminus \mathrm{dx}$.

Now let $u = x + 2$ so that $x = u - 2$ and $\mathrm{dx} = \mathrm{du}$ to write

$\setminus \int \frac{x}{{\left(x + 2\right)}^{2} + 9} \setminus \mathrm{dx} = \setminus \int \frac{u}{{u}^{2} + 9} \setminus \mathrm{du} - \setminus \int \frac{2}{{u}^{2} + 9} \setminus \mathrm{du}$

The first of these integrals can be done by inspection to see that $\setminus \int \frac{u}{{u}^{2} + 9} \setminus \mathrm{du} = \frac{1}{2} \ln | {u}^{2} + 9 | + C = \frac{1}{2} \ln \left({x}^{2} + 4 x + 13\right) + C$ (you could also do another substitution $w = {u}^{2} + 9$, $\mathrm{dw} = 2 u \setminus \mathrm{du}$, and $u \setminus \mathrm{du} = \frac{1}{2} \mathrm{dw}$ to help you do this). Note also that ${x}^{2} + 4 x + 13 = {\left(x + 2\right)}^{2} + 9 > 0$ for all $x \setminus \in \mathbb{R}$.

The second integral can be done by a bit of tricky algebra, motivated by the fact that $\setminus \int \frac{1}{1 + {x}^{2}} \setminus \mathrm{dx} = \arctan \left(x\right) + C$. Here's the algebra:

$\setminus \int \frac{2}{{u}^{2} + 9} \setminus \mathrm{du} = \frac{2}{9} \setminus \int \frac{1}{1 + {\left(\frac{u}{3}\right)}^{2}} \setminus \mathrm{du} = \frac{2}{3} \arctan \left(\frac{u}{3}\right) + C$

$= \frac{2}{3} \arctan \left(\frac{x + 2}{3}\right) + C$ (you could also do another substitution $w = \frac{u}{3}$, $\mathrm{du} = 3 \mathrm{dw}$ to help you do this). Note at the end that we have replaced $u$ by $x + 2$.

Hence, after combining the integration constants into just one, the final answer is

$\int \frac{x}{{x}^{2} + 4 x + 13} \setminus \mathrm{dx}$

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