I am tring to evaluate
$$I=\int_0^2 \frac{\arctan x}{x^2+2x+2}dx$$
The first thing I did was to notice that
$$\frac{1}{x^2+2x+2}=\frac{1}{(x+1)^2+1}=\frac{d}{dx}\arctan(x+1)$$
So I integrated by parts in order to get
$$I=\arctan 2\arctan 3-\int_0^2\frac{\arctan(x+1)}{1+x^2}dx$$
I let $x=u+1$ but when I do that I get
$$I=\arctan 2\arctan 3+\int_{-1}^1\frac{\arctan(u)}{1+(1+u)^2}du =\arctan 2\arctan 3$$
Now this is not close to the approximation given by wolfram. What have I done wrong and how to solve this?
An elementary solution. Let $I$ denote the integral. Apply the substitution $x=\frac{2t}{t+\sqrt{5}}$ to obtain
$$ I = \int_{0}^{\infty} \frac{\arctan\left(\frac{2t}{t+\sqrt{5}}\right)}{\sqrt{5}+4t+\sqrt{5}t^2} \, dt. \tag{1} $$
Substituting $t \mapsto 1/t$, we find that
$$ I = \int_{0}^{\infty} \frac{\arctan\left(\frac{2}{1+\sqrt{5} t}\right)}{\sqrt{5}+4t+\sqrt{5}t^2} \, dt. \tag{2} $$
But it is easy to check that
$$ \arctan\left(\frac{2t}{t+\sqrt{5}}\right) + \arctan\left(\frac{2}{1+\sqrt{5} t}\right) = \arctan(2) $$
holds, either by utilizing the addition formula for arctan or by differentiating the LHS to check that the LHS is constant and then plugging $t=0$ to determine the value of the constant.
Therefore by averaging $(1)$ and $(2)$, we obtain
$$ I = \frac{\arctan(2)}{2} \int_{0}^{\infty} \frac{dt}{\sqrt{5}+4t+\sqrt{5}t^2} = \frac{\arctan(2)\arctan(1/2)}{2}. $$