Solution (source code)

= Solution

Complete the square in the denominator and split the numerator into a multiple of its <derivative> plus a constant:
$$
x^2+4x+8=(x+2)^2+4,\qquad x+1=\frac12(2x+4)-1.
$$
Thus
$$
\begin{aligned}
\int\frac{x+1}{x^2+4x+8}dx
&=\frac12\int\frac{2x+4}{x^2+4x+8}dx
-\int\frac{dx}{(x+2)^2+4}\\
&=\boxed{\frac12\ln(x^2+4x+8)
-\frac12\arctan\frac{x+2}{2}+C.}
\end{aligned}
$$
The <natural logarithm> needs no absolute-value correction because its quadratic argument is strictly positive for every real $x$. The second term is an <inverse tangent> <antiderivative>.