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

\color{red}{\int\frac{x+4}{x^2+2x+5}\ dx}=\color{blue}{1/2\ln|x^2+2x+5|+\frac{3}{2} \tan^{-1}(\frac{x+1}{2})+C

#### Explanation:

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

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

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

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

$= \frac{1}{2} \setminus \ln | {x}^{2} + 2 x + 5 | + 3 \setminus \int \setminus \frac{d \left(x + 1\right)}{{\left(x + 1\right)}^{2} + {2}^{2}}$

Using standard formula $\setminus \int \setminus \frac{1}{{t}^{2} + {a}^{2}} \mathrm{dt} = \frac{1}{a} \setminus {\tan}^{- 1} \left(\frac{t}{a}\right)$,

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

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