\[x^{2} - (a + 1)x + a = 0\]
\[D = (a + 1)^{2} - 4 \cdot 1 \cdot a =\]
\[= a^{2} + 2a + 1 - 4a =\]
\[= a^{2} - 2a + 1 = (a - 1)^{2}\]
\[x_{1,2} = \frac{a + 1 \pm \sqrt{(a - 1)^{2}}}{2} =\]
\[= \frac{a + 1 \pm (a - 1)}{2}.\]
\[1.\ \ При\ D = 0:\]
\[(a - 1)^{2} = 0\ \ \]
\[a - 1 = 0\ \ \]
\[a = 1.\]
\[x = \frac{1 + 1 \pm 0}{2} = \frac{2}{2} = 1.\]
\[2.\ При\ a \neq 1;a \neq 2:\]
\[x_{1} = \frac{a + 1 + a - 1}{2} = \frac{2a}{2} = a;\]
\[x_{2} = \frac{a + 1 - a + 1}{2} = \frac{2}{2} = 1.\]
\[3.\ При\ a = 2 \Longrightarrow x = 1.\]