When I try to integrate $(1-x)^2$ I get $\dfrac13(1 - x)^3$. However, when I try this integral on an online integration portal they all give me $\dfrac13(x - 1)^3$ instead. Can someone please explain why my computation is wrong?
What confuses me here is the negation. Creating the first derivative from the result would produce $(x-1)^2$, which is not the same as what I began with.
On integrating $(1-x)^2$ you get,
$$\int{(1-x)^2 dx} = - \frac{1}{3} (1-x)^3 $$
Which is equal to $\frac{1}{3} (x-1)^3$.
You missed the negative sign after integrating your expression!
Hope it helped!