ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 11 Oct 2017 07:48:46 +0200irreducibility using factor function()https://ask.sagemath.org/question/39069/irreducibility-using-factor-function/ Consider the polynomial p=x^3-3*x+4. Use the factor() function to determine if p is irreducible over:
# a. finite field Z_5
# b. the rationals
# c. the complex numbers
Sun, 08 Oct 2017 00:27:24 +0200https://ask.sagemath.org/question/39069/irreducibility-using-factor-function/Comment by dan_fulea for <p>Consider the polynomial p=x^3-3*x+4. Use the factor() function to determine if p is irreducible over:</p>
<h1>a. finite field Z_5</h1>
<h1>b. the rationals</h1>
<h1>c. the complex numbers</h1>
https://ask.sagemath.org/question/39069/irreducibility-using-factor-function/?comment=39071#post-id-39071This looks like homework. Please always mention the own effort to make sage compute something on the way. Here, a possibility to proceed - for each field - would be to construct the corresponding field, the ring of polynomials over it, then define $p$ over this field, finally ask for the factorization. For instance:
sage: F = GF(5)
sage: F.<x> = PolynomialRing( F ) # or F[] for short, but criptic.
sage: factor( x^3 - 3*x + 4 )
x^3 + 2*x + 4
Which is the code for the other two fields? (Of course, we can already decide...)Sun, 08 Oct 2017 09:53:51 +0200https://ask.sagemath.org/question/39069/irreducibility-using-factor-function/?comment=39071#post-id-39071Answer by humfrey305 for <p>Consider the polynomial p=x^3-3*x+4. Use the factor() function to determine if p is irreducible over:</p>
<h1>a. finite field Z_5</h1>
<h1>b. the rationals</h1>
<h1>c. the complex numbers</h1>
https://ask.sagemath.org/question/39069/irreducibility-using-factor-function/?answer=39113#post-id-39113sage: R.<x> = IntegerModRing(5)[]
sage: k = x^3 -3*x + 4
sage: K = k.factor(); K
sage: k.is_irreducible()
# b. the rationals
sage: R.<x> = CC[]
sage: p = x^3 -3*x + 4
sage: P = p.factor(); P
sage: p.is_irreducible()
# c. the complex numbers
sage: R.<x> = CC[]
sage: p = x^3 -3*x + 4
sage: P = p.factor(); P
sage: p.is_irreducible()
Wed, 11 Oct 2017 07:48:46 +0200https://ask.sagemath.org/question/39069/irreducibility-using-factor-function/?answer=39113#post-id-39113