Understanding the derivation of the PDF of a two-point mixed distribution from its CDF 
A random variable $X$ has the cumulative distribution function
$$\begin{cases}
0 & x<1 \\
\dfrac{x^2-2x+2}{2} & 1 \le x<2 \\
1 & x\ge 2
\end{cases}$$
Calculate $E[X]$.

The answer uses the following pdf to get $E[X]$:
$$\begin{cases}
\dfrac{1}{2} & x=1 \\
x-1 & 1 < x<2 \\
0 & \text{otherwise}
\end{cases}$$
The book I am reading doesn't have much (any!) information on two-point mixed distributions and I want to make sure that I understand how this PDF was derived from the CDF. My understanding so far is that firstly, we need to figure out from the CDF that $X$ follows a mixed distribution. Note that $F(1) = 1/2 \ne 0$, which indicates that there is a jump in the CDF of $X$ at $x=1$. Since $X$ is continuous from $1<x<2$, $X$ must follow a two-point mixed distribution. Now, the magnitude of the jump in the graph is $\frac{1}{2}-0 = \frac{1}{2}$ which gives $f(x) = \frac{1}{2}$ if $x=1$. The rest of the pdf can be obtained using routine computations. Finally, we need to compute the probabilistic "weights" to get to the CDF. Clearly, the "weight" for the discrete part is $\frac{1}{2}$, so the "weight" for the continuous part must be $1-\frac{1}{2} = \frac{1}{2}$, and we have
$$E[X] = \int_1^2 (x-1) \cdot x dx + \text{Weight for the discrete part} \cdot 1 = \int_1^2 x(x-1) dx + P[X=1] \cdot 1$$
$$= \int_1^2 x(x-1) dx + \frac{1}{2}$$
which gives the correct answer. However, I am more interested in learning whether my process for obtaining the answer (which was based mostly on deduction and intuition) is correct. Can someone please critique my post? Thanks!

What you wrote there isn't a PDF, since it doesn't have integral $1$. There isn't really a PDF in the usual sense at all, because there is a discrete part.
A PDF for this distribution is $f(x)=\frac{1}{2} \delta(x-1) + (x-1) 1_{(1,2)}(x)$. Here $\delta$ denotes the Dirac delta "function", which is not really a function in the same way you are used to. This funny $1$ notation is defined by
$$1_A(x)=\begin{cases} 1 & x \in A \\
0 & x \not \in A \end{cases}$$
One can evaluate $\int_{-\infty}^\infty x f(x) dx = \int_{-\infty}^\infty x \left ( \frac{1}{2} \delta(x-1) + (x-1) 1_{(1,2)}(x) \right ) dx$ to get the expectation. To do that, the delta function term winds up giving you $\left. \frac{1}{2} x \right |_{x=1}=\frac{1}{2}$, while the other term gives you $\int_1^2 x(x-1) dx$.
Note that the PDF on $(1,2)$ is in fact $x-1$: there is no need for an extra factor of $1/2$ because $\int_1^2 (x-1) dx$ is already $1/2$.
