University Calculus: Early Transcendentals (3rd Edition)

$$\int (x+1)^2(1-x)^5dx=-\frac{2}{3}(1-x)^6+\frac{4}{7}(1-x)^7-\frac{1}{8}(1-x)^8+C$$
$$A=\int (x+1)^2(1-x)^5dx$$ We set $u=1-x$, which means $-u=x-1$ and thus, $x+1=-u+2=2-u$ Then $$du=-dx$$ $$dx=-du$$ Therefore, $$A=-\int(2-u)^2u^5du=-\int(4-4u+u^2)u^5du$$ $$A=-\int(4u^5-4u^6+u^7)du=\int(-4u^5+4u^6-u^7)du$$ $$A=-\frac{4u^6}{6}+\frac{4u^7}{7}-\frac{u^8}{8}+C=-\frac{2u^6}{3}+\frac{4u^7}{7}-\frac{u^8}{8}+C$$ $$A=-\frac{2}{3}(1-x)^6+\frac{4}{7}(1-x)^7-\frac{1}{8}(1-x)^8+C$$