# How do you solve x^2-x-1=0 by completing the square?

We have

${x}^{2} - x - 1 = 0$

${x}^{2} - 2 \cdot \frac{1}{2} \cdot x + {\left(\frac{1}{2}\right)}^{2} - \frac{5}{4} = 0$

${\left(x - \frac{1}{2}\right)}^{2} - \frac{5}{4} = 0$

${\left(x - \frac{1}{2}\right)}^{2} = \frac{5}{4}$

Taking square roots in both sides

$| x - \frac{1}{2} | = \frac{\sqrt{5}}{2}$

and

$\left(x - \frac{1}{2}\right) = \pm \frac{\sqrt{5}}{2}$

Hence the two solutions are

${x}_{1} = \frac{1}{2} + \frac{\sqrt{5}}{2}$ and ${x}_{2} = \frac{1}{2} - \frac{\sqrt{5}}{2}$