I want to factor(x^5 + x + 1)
into (x^3 - x^2 + 1)(x^2 + x + 1)
. Wolfram can do it, is there a Julia package that can?
AbstractAlgebra.jl has a function called factor
but I can’t figure out how to use it.
Polynomials.jl has a FactoredPolynomial but it doesn’t do what I’m looking for either
julia> convert(FactoredPolynomial, Polynomial([1,0,0,0,1,1]))
FactoredPolynomial((x + 0.5000000000000002 + 0.8660254037844388im) * (x - 0.6623589786223729 - 0.5622795120623012im) * (x + 1.3247179572447456 - 5.605801581444737e-17im) * (x + 0.5000000000000001 - 0.8660254037844386im) * (x - 0.662358978622373 + 0.5622795120623013im))