A random variable \(X\) has a cumulative distribution function \(F_X(x)\) given by
\( F_X(x) = \begin{cases} 0 & \text{if } x < 1 \\ \frac{x^{2} - 2x + 2}{2} & \text{if } 1 \le x < 2 \\ 1 & \text{if } x \ge 2 \end{cases} \)
Then \(E(X)\) is: