# Evaluate the integral integrate of (dx/(x^2+4x+8))

You should complete the square to denominator using the formula `(a+b)^2 = a^2 + 2ab + b^2`  such that:

`x^2 + 4x = x^2 + 4x + 4 - 4 => x^2 + 4x = (x + 2)^2 - 4`

`x^2 + 4x + 8 = (x + 2)^2 - 4 + 8`

`x^2 + 4x + 8 = (x + 2)^2 + 4`

You need to substitute `(x + 2)^2 + 4`  for `x^2 + 4x + 8`  such that:

`int 1/(x^2 + 4x + 8)dx = int 1/((x + 2)^2 + 4) dx`

You should use the following substitution such that:

`x + 2 = t => dx = dt`

`int 1/((x + 2)^2 + 4) dx = int 1/(t^2 + 2^2) dt`

`int 1/(t^2 + 2^2) dt = 1/2 arctan (t/2) + c`

Substituting back `x + 2`  for t yields:

`int 1/(x^2 + 4x + 8)dx = 1/2 arctan ((x+2)/2) + c`

Hence, evaluating the given integral yields `int 1/(x^2 + 4x + 8)dx = 1/2 arctan ((x+2)/2) + c.`

Approved by eNotes Editorial Team