Ničle polinomov

Kandidati za ničle polinoma

6(x^3)+3x+4

so ±((1,2,4)/(1,2,3,6)).

(x-3)*(x+1)*(x-1/2)*(x+1/2)*4//Expand

(x-3)*(x+1)*(x-(3+I))*(x-(3-I))//Expand

RandomInteger[{1,10}]

RandomInteger[{1,10},5]

{a,b,c}/{x,y,z}

RandomInteger[{-5,5},4]/RandomInteger[{1,4},4]

x-{1,(1/3),-(3/4),1}

Apply[f,{a,b,c}]

Apply[Times,x-{1,(1/3),-(3/4),1}]

Apply[Times,x-{1,(1/3),-(3/4),1}]//Expand

Denominator[1/3]

Denominator[0]

LCM[2,3,8]

LCM[{2,3,8}]

RandomChoice[{1,1,1,1,2,2,2,3,3,4,5,6},5]

Max[Abs[CoefficientList[-108-108 x+21 (x^2)+24 (x^3)+3 (x^4),x]]]

ClearAll[nakljucniPolinom]
nakljucniPolinom[n_,x_]:=
Module[{stevci,imenovalci,nicle,d,polinom},
imenovalci=RandomChoice[{1,1,1,2,3,5,5,6,7},n];
stevci=RandomChoice[{-5,5,7,-7,6,-6,-3,3,2,-2,1,1,1,-1,-1,0},n];
nicle=stevci/imenovalci;
d=RandomChoice[{1,1,1,1,2,2,3,5}];
polinom=Expand[d*Apply[Times, x-nicle*Apply[LCM,imenovalci]]];
{polinom, nicle}
]

ClearAll[jeDober]
jeDober[{polinom_, nicle_},x_]:=
Max[Abs[CoefficientList[polinom,x]]]<250

ClearAll[kakovost]
kakovost[{polinom_, nicle_},x_]:=
Max[Abs[CoefficientList[polinom,x]]]

nakljucniPolinom[4,x]

Select[Table[nakljucniPolinom[4,x],{100}],jeDober[#,x]&]//MatrixForm

Table[kakovost[nakljucniPolinom[4,x],x],{100}]

p=Table[nakljucniPolinom[4,x],{20}]

Sort[p, kakovost[#1,x]<kakovost[#2,x]&]

kakovost[{882 x-49 (x^2)-18 (x^3)+(x^4),{(3/7),(1/6),0,-(1/6)}},x]

kakovost[{-3780 (x^2)+48 (x^3)+(x^4),{0,-3,0,(7/5)}},x]

Sort[Table[nakljucniPolinom[4,x],{100}],kakovost[#1,x]<kakovost[#2,x]&]//MatrixForm