How can I factorize a polynomial such as x^2-5x-8? According to Mathematica, I can do it by using Extension->something, but what if I don't know what irrational number to use. If I first solve the equation, I will then know the type of extension to use but this seems to be irrational in the first place. Help.
yes it does work , I was using mathematica 10 this morning by mistake , but when I used mathematica 11 it certainly gave the answer. thanks
As per the community rules you should specify which version of the software you use. Operating System is also handy. It definitely does work in 11.0.1...
You can also use the other solution I posted, that should work for younger versions I believe...
Factor[Factor[x^2 - 5 x - 8, Extension -> All]]
Factor::nalg: All is not an explicit algebraic number. >> I tried the above this morning and was not successful as you can see from the above. any ideas?
thanks Paul its brilliant and just what I was looking for.
If you factor the factor you get what you are looking for
However, just because it doesn't look like what you are expecting doesn't mean its wrong in the case of Sander's example.
thanks for the reply but Factor[x^2 - 5 x - 8, Extension -> All] does not work !!! It seems incredible that mathematica cannot factor a simple polynomial that requires surds in its solution using the command FACTOR. When I used a T-I CAS calculator there is no problem whatsoever I just type Factor[x^2 - 5 x - 8,x] and the result (((2x+?(57)-5)(2*x-?(57)-5))/(4))
You could do it like this:
pol = x^2 - 5 x - 8; zeros = x /. Solve[pol == 0, x] pol = Product[x - z, {z, zeros}] ExpandAll[%] (*check*)
but Factor can do it by itself by using Extension as you said:
Factor[x^2 - 5 x - 8, Extension -> All]