$\int_{-1}^{1}(1-|x|)dx$
Integration can be divided into two parts for |X| value.
|X| is negative in range [-1,0] // |-0.8|=-0.8
and positive in range [0,1]. // |0.8|=0.8
It should be
$\int_{-1}^{0}(1-(-x))dx+\int_{0}^{1}(1-x)dx$
$\int_{-1}^{0}(1+x)dx+\int_{0}^{1}(1-x)dx$
$x+\frac{x^{2}}{2}]_{-1}^{0}$ + $x-\frac{x^{2}}{2}]_{0}^{1}$
-(-1+1/2)+(1-1/2)
=1-1/2+1-1/2
=2-1
=1