Can you find a Polynomial of Degree 7 that has 2 complex roots and 5 real?

Can you find a Polynomial of Degree 7 that has 2 complex roots and 5 real?

The polynomial, call it $f(x)$ must be irreducible over $\mathbb{Q}$ (or over $\mathbb{Z}$ as Gauss' lemma can be used.) and have integer coefficients. I have no idea how to generate such a polynomial.

I've tried things along the lines of $f(x) = x^5(x^2 - 5) + 5$

As these are easily irreducible with Eisenstein Criterion $(p = 5)$

Peter has kindly shown (via brute force) that $$x^7+x^6-3x^5-x^4-2x^3-3x^2+x+1$$

Matches said criterion, yet has yet to show that this is irreducible. Can anyone do this?

Thank you to achille hui who has given me my answer of:

$f(x) = x^7+1000003(x−1)(x−2)(x−3)(x−4)(x−5)$

which is irreducible by Eisenstein's with $p = 1000003$.

• I assume you mean irreducible over $\mathbb{Z}[X]$ – Seth Mar 23 '14 at 15:53
• What about $(x^2+1)x^5$? – kjetil b halvorsen Mar 23 '14 at 15:59
• @kjetilbhalvorsen That's reducible. – Git Gud Mar 23 '14 at 16:00
• Another possibility is taking any monic integer polynomial $m(x)$ with 5 real distinct roots (different from zero) and consider polynomial of the form $x^7 + p m(x)$ for sufficiently large prime $p$. e.g. $x^7 + 1000003 (x-1)(x-2)(x-3)(x-4)(x-5)$ fullfil your requirement. – achille hui Mar 23 '14 at 16:45

Another possibility is taking any monic integer polynomial $m(x)$ with 5 real distinct roots (different from zero) and consider polynomial of the form $x^7+pm(x)$ for sufficiently large prime p. e.g.

$f(x) = x^7+1000003(x−1)(x−2)(x−3)(x−4)(x−5)$

which is irreducible by Eisenstein's with $p = 1000003$.

Credit - achille hui. Posted as anwser rather than comment for clarity.

I searched a polynomial with the desired properties with a simple PARI-program :

? gef=0;while(gef==0,x=vector(8,n,random(5)-3);f=Pol(x);if(poldegree(f)==7,if(po lisirreducible(f)==1,if(polsturm(f)==5,gef=1))));print(x) [1, 1, -3, -1, -2, -3, 1, 1] ? f %9 = x^7 + x^6 - 3*x^5 - x^4 - 2*x^3 - 3*x^2 + x + 1 ? factor(f) %10 = [x^7 + x^6 - 3*x^5 - x^4 - 2*x^3 - 3*x^2 + x + 1 1]

? polroots(f) %11 = [-2.204324318649112296500613456 + 0.E-28*I, -0.826822651324028965973042087 7 + 0.E-28*I, -0.5202407805205017136797052000 + 0.E-28*I, 0.56879782917907405112 96444628 + 0.E-28*I, 1.718030795521740576069959364 + 0.E-28*I, 0.132279562896414 1744768784582 + 1.030409728847455964396114753*I, 0.1322795628964141744768784582 - 1.030409728847455964396114753*I]~

? polsturm(f) %12 = 5 ?

The found polynomial is :

x^7 + x^6 - 3*x^5 - x^4 - 2*x^3 - 3*x^2 + x + 1

Better formatted :

$$x^7+x^6-3x^5-x^4-2x^3-3x^2+x+1$$

• $x^7 + x^6 - 3*x^5 - x^4 - 2*x^3 - 3*x^2 + x + 1$ does indeed satisfy this, but can you show me this is irreducible? I'm assuming you need to shift it as Eisenstien's is not met. – user137406 Mar 23 '14 at 16:05
• I have not claimed that I can prove it. I only searched for such a polynomial. If this is not what you want, I will delete my answer. – Peter Mar 23 '14 at 16:11
• No please keep it, you've answered part of my question, It just remains to be shown that it is indeed irreducible. – user137406 Mar 23 '14 at 16:12
• perhaps you could continue the search? – user137406 Mar 23 '14 at 16:17
• It wasn't me! let your haters be your motivators! – user137406 Mar 23 '14 at 16:27