Evaluate $\int_{2}^{7} \frac{x}{1-\sqrt{2+x}} d x$ We have the following integral:
$$
\int_{2}^{7} \frac{x}{1-\sqrt{2+x}}\, dx
$$
And this is my solution, which seems to be wrong, and I am failing to see where exactly I failed at:
We have $u=1-\sqrt{2+x}, x=u^2-2u-1, dx=-2\sqrt{2+x}\, du$, and we know that $x\geq -2$ and thus $u\leq 1$:
\begin{align}
\int_{2}^{7} \frac{x}{1-\sqrt{2+x}}\, dx
&=-2\int_{-1}^{-2} \frac{(u^2+2u-1)(u-1)}{u}\, du\\
&= -2 \left( \int_{-1}^{-2} u^2 d u + \int_{-1}^{-2} u\, du +\int_{-1}^{-2} -3\, du + \int_{-1}^{-2} \frac{1}{u}\, du \right) \\
&= -2\left[\frac{u^3}{3}+\frac{u^2}{2}-3u+\ln{|u|}\right]_{-1}^{-2}\approx -18
\end{align}
Can someone please help me pinpoint the issue?

I would have calculated it like this:
Let $u=1-\sqrt{2+x} \Leftrightarrow x=(1-u)^2-2$ where $x\ge-2$. We then have
$$ \mathrm dx=2(1-u)(-1)\,\mathrm du$$
so
\begin{align*}
\int_2^7\!\frac{x}{1-\sqrt{2+x}}\,\mathrm dx
&=\int_{-1}^{-2}\!\frac{(1-u)^2-2}{u}\cdot2(1-u)(-1)\,\mathrm du
\\&=2\int_{-2}^{-1}\!\frac{((1-u)^2-2)(1-u)}{u}\,\mathrm du
\\&=2\int_{-2}^{-1}\!\frac{(1-2u+u^2-2)(1-u)}{u}\,\mathrm du
\\&=2\int_{-2}^{-1}\!\frac{(u^2-2u-1)(1-u)}{u}\,\mathrm du
\\&=2\int_{-2}^{-1}\!\frac{-u^3+3 u^2-u-1}{u}\,\mathrm du
\\&=2\int_{-2}^{-1}\!\Bigl(-u^2+3u-1-\frac{1}{u}\Bigr)\,\mathrm du
\\&=2\Bigl[-\frac13u^3+\frac32u^2-u-\ln(|u|)\Bigr]_{-2}^{-1}
\\&=-\frac{47}{3}+2\ln(2).
\end{align*}
