A rv $X$ has the cumulative distribution function
$$ F(x) = \begin{cases} 0 \; \; \; \; x<1 \\ \frac{x^2-2x+2}{2} \; \; \; \; 1 \leq x < 2 \\ 1 \; \; \; \; x \geq 2 \end{cases} $$
Calculate the variance of $X$
attempt
First since $F'(x) = f(x)$, then
$$ f(x) = x-1 $$
on $[1,2)$ and $0$ otherwise. Now,
$$ Var(X) = E(X^2) - E(X)^2 = \int\limits_1^2 (x^3 - x^2) dx - \left( \int\limits_1^2 (x^2-x )\right)^2 $$
After solving this easy integral I get $0.73$ whereas my answer key says the answer is $\boxed{0.139}$. What is my mistake here? Am I applying the formulas wrong?