Let's factor by completing the square. Our quadratic is in the form #ax^2+bx+c#. We complete the square by taking half of our #b# value, squaring it, and adding it to both sides of the equation.
We know that #b=-2#, Half of that is #-1#, and squaring that gives us #1#. Let's add that to both sides. We also have to subtract #4# from both sides so we can be able to factor. We get:
#x^2-2x+1=-4+1#
Simplifying, we get:
#x^2-2x+1= -3#
The left side can be factored as #(x-1)^2#. If we add #-1# and #-1#, we get #-2#. When we multiply them, we get positive #1#.
#(x-1)^2=-3#
Finally, we can add #3# to both sides, and we get:
#(x-1)^2+3=0#