# Factor not factoring quadratic polynomial [closed]

I'm using version 11.3

Expand[(Sqrt[2] - t)^2]
2 - 2 Sqrt[2] t + t^2,


but

Factor[2 - 2 Sqrt[2] t + t^2]
2 - 2 Sqrt[2] t + t^2.


On the other hand, without the $$\sqrt{2}$$ the expression is factored as expected.

Factor[1 - 2  t + t^2]
(-1 + t)^2

• Please do not use the bugs tag when posting a new question. See the tag description for why. Mar 24 '19 at 21:21

## 2 Answers

If you want irrational coefficients, you need to tell it which numbers to use as an extension of the rationals.

Factor[2 - 2 Sqrt[2] t + t^2, Extension -> {Sqrt[2]}]
(* (Sqrt[2] - t)^2 *)


If you do not know what extension to use with Factor

expr = 2 - 2 Sqrt[2] t + t^2;
expr2 = (a + b*t)^2;

sol = expr2 /. Solve[Thread[CoefficientList[expr, t] ==
CoefficientList[expr2, t]], {a, b}]

(* {(-Sqrt[2] + t)^2, (Sqrt[2] - t)^2} *)

expr == sol // Thread // Simplify

(* {True, True} *)