Question is to integrate this: $$\int \frac{x+2}{(x^2+3x+3) \sqrt{x+1}} dx$$
Naturally I put $x+1 = t^2$, $dx = 2tdt$
$$2\int\frac{(t^2+1)}{t^4+t^2+1}dt = 2\int \frac{1+t^{-2}}{t^2+1+t^{-2}}= 2\int \frac{1+t^{-2}}{(t-t^{-1})^2 + 3}$$
so answer is $$\dfrac{2}{\sqrt 3} \tan^{-1}\left(\dfrac{t^2-1}{t\sqrt{3}}\right)$$
But answer is not matching with wolfram alfa, choose to oppose. It gives complex thrillers. https://www.wolframalpha.com/input/?i=integrate+(t%2B2)%2F((t%5E2%2B3t%2B3)(sqrt(t%2B1)))+dt
Also I tried a website known as "Online Integral Calculator" which gives the answer as $$\dfrac{2\left(\arctan\left(\frac{2\sqrt{t+1}+1}{\sqrt{3}}\right)+\arctan\left(\frac{2\sqrt{t+1}-1}{\sqrt{3}}\right)\right)}{\sqrt{3}}$$
which I addded the inner terms to get negative of my original answer!