# How do you solve the quadratic equation by completing the square: x^2-4x+2=0?

Jul 19, 2015

Complete the square to find ${\left(x - 2\right)}^{2} = {x}^{2} - 4 x + 4 = 2$

Hence $x = 2 \pm \sqrt{2}$

#### Explanation:

Add $2$ to both sides to get:

$2 = {x}^{2} - 4 x + 4 = {\left(x - 2\right)}^{2}$

So $x - 2 = \pm \sqrt{2}$

Add $2$ to both sides to get:

$x = 2 \pm \sqrt{2}$

In the general case:

$a {x}^{2} + b x + c = a {\left(x + \frac{b}{2 a}\right)}^{2} + \left(c - {b}^{2} / \left(4 a\right)\right)$

from which we can derive the quadratic formula for solutions of $a {x}^{2} + b x + c = 0$:

$x = \frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}$

Notice the $\frac{b}{2 a}$ term that gives us:

$a {\left(x + \frac{b}{2 a}\right)}^{2} = a {x}^{2} + b x + {b}^{2} / \left(4 a\right)$