# How do you solve x^2 - 4x +2 = 0 using completing the square?

Jun 11, 2015

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

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

#### Explanation:

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

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

To solve ${\left(x - 2\right)}^{2} - 2 = 0$, first add $2$ to both sides to get:

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

Then $\left(x - 2\right) = \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 deduce the quadratic formula:

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