Variance Of A Tent Density

XX is continuous with density

f(x)={x,0≤x≤12−x,1<x≤20,otherwisef(x) = \begin{cases} x, & 0 \le x \le 1 \ 2 - x, & 1 < x \le 2 \ 0, & \text{otherwise} \end{cases}

The graph is a triangle of base 2 and height 1, so it does integrate to 1. Compute Var(X)\mathrm{Var}(X).

Answer format: round to 3 decimal places.