# Factorising by completing the square.

And another question I am stuck on in my holiday of study. This one I have some idea how to complete this question, but can't figure out how the calculator got its answer. Here is the question:

Factorise the following over $\mathbb{R}$ $$x^2 – 6x + 7$$

And here is what I put in the calculator to get an idea of where to start.

factor(x^2-6x+7)

This outputs:

(x-1.585786438)(x-4.414213562)

I found this output to be abnormal, so I try to look in the book for more help. And have come back with nothing. I don't know how I would get to the answer the calculator has said. So, essentially I am asking how would I arrive at this answer.

• There is a well known formula for solving a quadratic; it may have used that. It might not be the expected solution but try it and compare it to the calculator's answer. Commented Apr 16, 2017 at 6:32

consider $$x^2-6x+7=0$$

$$x=\frac{6 \pm \sqrt{6^2-4(1)(7)}}{2}$$

Let the two roots be $\alpha$ and $\beta$, we can then write $$x^2-6x+7=(x-\alpha)(x-\beta)$$

$${ x }^{ 2 }-6x+7={ x }^{ 2 }-6x+9-2={ \left( x-3 \right) }^{ 2 }-2=\left( x-3-\sqrt { 2 } \right) \left( x-3+\sqrt { 2 } \right)$$

solving the given equation we obtain $$x_{1,2}=3\pm\sqrt{2}$$ thus we have $$(x-3-\sqrt{2})(x-3+\sqrt{2})$$ the searched factorization

It's abnormal because there $x^2-6x+7$ doesn't factor ove $\mathbb Q$ so those are not rational numbers. They are irrational numbers.

How can we express the irrational numbers so they don't look so "abnormal"?

Notice if you add them together you get $6$. So they are $3+ r$ and $3-r$ where $r=1.4142135624$. Does that number look familiar?

Notice:

$(x-(3+\sqrt {2}))(x-(3-\sqrt {2}))=$

$x^2-[(3+\sqrt {2})+(3-\sqrt {2})]x+(3+\sqrt {2})(3-\sqrt {2})=$

$x^2-6x+(3^2-2)=$

$x^2-6x+7$

If you use quadratic formula or completing the square, you'd get the roots are $3+\sqrt 2$ and $3-\sqrt 2$ so the answer is not so abnormal after all.