I don't see a clear substitution to calculate that since when
$u = 2x+x^2,\qquad dx = \frac{du}{2+x},$
And so far as I've understand $dx$ shouldn't be in function of $x$ in order to calculate the integral.
I don't see a clear substitution to calculate that since when
$u = 2x+x^2,\qquad dx = \frac{du}{2+x},$
And so far as I've understand $dx$ shouldn't be in function of $x$ in order to calculate the integral.
The question has been fully answered, but I would like to put in an ad for a slightly different substitution, motivated by a desire to avoid square roots.
Let $u^2=2x+x^2$. Then $2u \,du =(2x+x^2)\,dx$, so $(x+1)\,dx=u\,du$. Carry out the substitution. We get $\int (x+1)\sqrt{2x+x^2}\,dx=\int u^2\,du=\frac{u^3}{3}+C=\frac{(2x+x^2)^{3/2}}{3}+C.$
Take $u = x+1,$ then $u^2 - 1 = x^2 + 2 x.$
$ \frac{du}{dx} = 2 + 2x = 2(x+1),\text{ so } (x+1)\;dx = \frac{du}{2}. $