# How do you find int (x+4)/(x^2+2x+5) dx using partial fractions?

Oct 8, 2016

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

#### Explanation:

Since we are requested to use partial fractions to solve this, I guess the hope is that we can simplify the integrand.

However, the quadratic ${x}^{2} + 2 x + 5$ only has Complex zeros, so if we do want to simplify the expression, we end up with Complex coefficients.

They say fools rush in where angels fear to tread, so here I go...

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

$\textcolor{w h i t e}{{x}^{2} + 2 x + 5} = {\left(x + 1\right)}^{2} - {\left(2 i\right)}^{2}$

$\textcolor{w h i t e}{{x}^{2} + 2 x + 5} = \left(\left(x + 1\right) - 2 i\right) \left(\left(x + 1\right) + 2 i\right)$

$\textcolor{w h i t e}{{x}^{2} + 2 x + 5} = \left(x + 1 - 2 i\right) \left(x + 1 + 2 i\right)$

So:

$\frac{x + 4}{{x}^{2} + 2 x + 5} = \frac{A}{x + 1 - 2 i} + \frac{B}{x + 1 + 2 i}$

Using Heaviside's cover up method, we find:

$A = \frac{\textcolor{b l u e}{- 1 + 2 i} + 4}{\textcolor{b l u e}{- 1 + 2 i} + 1 + 2 i} = \frac{3 + 2 i}{4 i} = \frac{1}{2} - \frac{3}{4} i$

$B = \overline{A} = \frac{1}{2} + \frac{3}{4} i$

So:

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

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

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

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

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

Use:

${\tan}^{- 1} \left(z\right) = \frac{1}{2} i \left(\ln \left(1 - i z\right) - \ln \left(1 + i z\right)\right)$

So:

$\frac{3}{4} i \left(\ln \left(x + 1 + 2 i\right) - \ln \left(x + 1 - 2 i\right)\right)$

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

$= - \frac{3}{2} \frac{1}{2} i \left(\ln \left(1 - i \left(\frac{2}{x + 1}\right)\right) - \ln \left(1 + i \left(\frac{2}{x + 1}\right)\right)\right)$

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

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

Hence:

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