How do you integrate (1x^(2)+4x+12)/((x+2)(x^(2)+4))  using partial fractions?

Aug 23, 2017

Write the partial fraction equation:

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

Multiply both sides by $\left(x + 2\right) \left({x}^{2} + 4\right)$:

${x}^{2} + 4 x + 12 = A \left({x}^{2} + 4\right) + \left(B x\right) \left(x + 2\right) + C \left(x + 2\right) \text{ [1]}$

Make B and C disappear by letting $x = - 2$

${\left(- 2\right)}^{2} + 4 \left(- 2\right) + 12 = A \left({\left(- 2\right)}^{2} + 4\right)$

$8 = A \left(8\right)$

$A = 1$

Substitute the value for A into equation [1]:

${x}^{2} + 4 x + 12 = \left({x}^{2} + 4\right) + \left(B x\right) \left(x + 2\right) + C \left(x + 2\right) \text{ [2]}$

Make B disappear by letting $x = 0$

${0}^{2} + 4 \left(0\right) + 12 = \left({0}^{2} + 4\right) + C \left(0 + 2\right)$

$8 = 2 C$

$C = 4$

Substitute the value for C into equation [2]:

${x}^{2} + 4 x + 12 = \left({x}^{2} + 4\right) + \left(B x\right) \left(x + 2\right) + 4 \left(x + 2\right) \text{ [3]}$

Let (x = 1):

${1}^{2} + 4 \left(1\right) + 12 = \left({1}^{2} + 4\right) + \left(B \left(1\right)\right) \left(\left(1\right) + 2\right) + 4 \left(1 + 2\right)$

$0 = 3 B$

$B = 0$

Remove the term for B from equation [3]

${x}^{2} + 4 x + 12 = \left({x}^{2} + 4\right) + 4 \left(x + 2\right)$

Divide by $\left(x + 2\right) \left({x}^{2} + 4\right)$:

$\frac{{x}^{2} + 4 x + 12}{\left(x + 2\right) \left({x}^{2} + 4\right)} = \frac{1}{x + 2} + \frac{4}{{x}^{2} + 4} \text{ [4]}$

Equation [4] gives us the template for the integrals:

$\int \frac{{x}^{2} + 4 x + 12}{\left(x + 2\right) \left({x}^{2} + 4\right)} \mathrm{dx} = \int \frac{1}{x + 2} \mathrm{dx} + 4 \int \frac{1}{{x}^{2} + 1} \mathrm{dx}$

Both integrals are well known:

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