How do I integrate this? How do I integrate $\displaystyle\int (x^2 + 2)\sqrt{1-x} \; dx$ ?
I have feeling substitution might be used, but I just can't put my finger on it...
Thank you.
 A: The ‘problem child’ in your integrand is $\sqrt{1-x}$; that should immediately suggest substituting either $u=\sqrt{1-x}$ or $u=1-x$. The latter looks simpler, so let’s try it and see what happens. We get $du=-dx$, which is nice and simple, and it’s easy enough to solve for $x$ to find that $x=1-u$. Now substitute $1-u$ for $x$ in the rest of the integrand, and you get
$$\begin{align*}\int (x^2+2)\sqrt{1-x}\,dx&=-\int\left((1-u)^2+2\right)\sqrt u\, du\\
&=-\int(3-2u+u^2)u^{1/2}\,du\;.
\end{align*}$$
Now just multiply out, use the power rule, and reverse the substitution.
You might wonder what would have happened if we’d used the substitution $u=\sqrt{1-x}$ instead. Then we’d have $x=1-u^2$, so $x^2+2=(1-u^2)^2+2=3-2u^2+u^4$, which isn’t bad. We also get $$du=\frac{-1}{\sqrt{1-x}}dx\;,$$ or $dx=-\sqrt{1-x}\,du$ which looks a little ugly until you realize that it’s just $-u\,du$. Thus, with this substitution we get
$$\int (x^2+2)\sqrt{1-x}\,dx=-\int(3-2u^2+u^4)u^2\, du\;,$$
which turns out to be not so bad after all.
A: Note that $$x^2+2=(1-x)^2-2(1-x)+3,$$ which implies that
$$(x^2+2)\sqrt{1-x}=(1-x)^\frac{5}{2}-2(1-x)^{\frac{3}{2}}+3(1-x)^{\frac{1}{2}}.$$
Therefore, let $u=1-x$, we have $dx=-du$, which implies that
$$\int (x^2+2)\sqrt{1-x}dx=-\int u^\frac{5}{2}-2u^{\frac{3}{2}}+3u^{\frac{1}{2}}du$$
$$=-\frac{2}{7}u^{\frac{7}{2}}+\frac{4}{5}u^{\frac{5}{2}}+2u^{\frac{3}{2}}+C$$
$$=-\frac{2}{7}(1-x)^{\frac{7}{2}}+\frac{4}{5}(1-x)^{\frac{5}{2}}+2(1-x)^{\frac{3}{2}}+C.$$
A: Another way is a rationalizing substitution ("rationalizing" $=$ getting rid of the radical):
$$
u=\sqrt{1-x}
$$
$$
u^2=1-x
$$
$$
2u\;du = -dx
$$
$$
x=1-u^2
$$
$$
\int (x^2 + 2)\sqrt{1-x} \; dx = \int((1-u^2)^2+2) u (2u\;du).
$$
Then multiply it out and you're integrating a polynomial.
Finally, but $\sqrt{1-x}$ in place of each "$u$" at the end.
