Below is from a book,
When 0 $\le$ x < 1, F(x) = $\int_0^x$ t dt = $x^2 \over 2 $;
When 1 $\le$ x < 2, F(x) = $\int_0^1$ t dt + $\int_1^x$(2-t) dt = -$x^2 \over 2$ + $2x$ $\color{blue}{-1}$;
However, I think the last part of above in blue, the -1 should be $1 \over 2 $, because
$\int_0^1$ t dt = F(1) - F(0) = $1^2 \over 2$ - 0 = $1 \over 2$,
$\int_1^x$(2-t) dt = $\int_1^x2$ dt - $\int_1^x$ t dt = $2x$ - $x^2 \over 2$
Please help me on this.