# Factoring certain polynomials with a computer algebra system

Every self-reciprocal polynomial with spectral radius one has a factorisation of the form $(x-1)^{2k} \Pi_{n \geq 2}{ \Phi_n^{e_n}}$ , where $k, e_n$ are natural numbers and $\Phi_n$ are the cyclotomic polynomials. Now given a self-reciprocal polynomial with spectral radius one, is there a program to factor $f$ quickly into this form? I prefer to use GAP, but havent found something like that.

• See here: "At the moment GAP provides only methods to factorize polynomials over finite fields (see Chapter 59), over subfields of cyclotomic fields (see Chapter 60), and over algebraic extensions of these (see Chapter 67)". You could use SAGE. – Dietrich Burde Mar 6 '17 at 10:46
• For example, in GAP 4.8.6 Factors((x-1)^4*CyclotomicPolynomial(Rationals,5)^2*CyclotomicPolynomial(Rationals,4)); takes less than a second. How big are degrees of polynomials you're dealing with? – Alexander Konovalov Mar 6 '17 at 13:20
• It is not clear what you are asking. Would an ordinary factorization command not be good/quick enough? – ahulpke Mar 7 '17 at 15:01
• Knowing that such a decomposition exists, it might be much more faster possible than just using factor in gap. But Factor is ok for my purposes if I wait a little I guess. – Mare Mar 7 '17 at 22:07