On the equation MX ^ 2-2x + 1 = 0 of X, there is only one real number root, find M

On the equation MX ^ 2-2x + 1 = 0 of X, there is only one real number root, find M

Because this problem does not require that the equation must be a quadratic equation of one variable, it should be divided into two cases
Case 1: if the equation is a linear equation of one variable, then
When m = 0, the equation has only one real root: x = 1 / 2;
Case 2: if the equation is quadratic, then
The coefficient of quadratic term m ≠ 0, and the discriminant △ = 0, i.e
△=(-2)^2-4*m*1=0
That is 4-4m = 0, the solution is m = 1
In conclusion, if the equation MX ^ 2-2x + 1 = 0 has only one real root, then the values of M are 0 and 1