Integrating $\int_{0}^{2} (1-x)^2 dx$ I solved this  integral
$$\int_{0}^{2} (1-x)^2 dx$$
by operating the squared binomial, first. 
But, I found in some book, that it arrives at the same solution and I don't understand why it appears a negative simbol. This is the author solution:
$$\int_{0}^{2} (1-x)^2 dx = -\frac{1}{3}(-x+1)^3|_{0}^{2}=\frac{2}{3}$$
 A: If $u = 1- x$ then $du = -1 \dot \ dx = -dx$. Thus
$$\int_{1}^{-1} -u^2 \,du =-\int_{1}^{-1} u^2\, du  =\int_{-1}^{1} u^2\, du$$
A: $$\int_{0}^{2} (1-x)^2 dx = F(x) |_{0}^{2}$$
while we should have $\frac{\partial{F(x)}}{\partial x} = (1-x)^2$. It is easy to show that (especially if you set $u=x-1$ and then using chain rule):
$$
F(x) = - \frac{1}{3} (1-x)^3 \Rightarrow \frac{\partial{F(x)}}{\partial x} = (1-x)^2
$$ 
so basically that minus sign is because of negative sign of $x$ inside the parenthesis. 
A: $$\int_0^2(1-x)^2\, dx = \int_{-1}^1x^2\,dx$$
Note the negative appears, but you get rid of this by switching the endpoints.
A: There are two places where you need to be careful about the sign. The first place is when you make the derivative of the substitution (if your substitution is 1-x = t, then after making the derivative you get -dx = dt). The second place is when you change the limits of the integration due to the substitution. The lower limit becomes 1 and the upper limit becomes -1. You can find a complete solution to this problem here
http://www.e-academia.cz/solved-math-problems/definite-integral-with-substitution.php
