2011/8/13 Bill Gosper <billgosper@gmail.com>
That terse solver sailed right through the examples in Quintic function - Wikipedia, the free encyclopedia<http://en.wikipedia.org/wiki/Quintic_function> until x^5 + x^4 - 4*x^3 - 3*x^2 + 3*x + 1, whose sol'ns are 2*Cos[2*k*π/11], 0<k<11. Watson-Williams's correct solution gives a quartic with four roots all of magnitude (5/Sqrt[11])^5, whereas the terse one finds four *different* roots of that magnitude, and then oviposits when it can't figure out the phase corrections. Fudged manually, the first solution gives
Out[859]= Sin[7 Pi/22] == -1/10 + ( (-1)^( 2/5) (11 (-89 - 25 Sqrt[5] - 5 I Sqrt[2 (205 - 89 Sqrt[5])]))^(1/5) - (-1)^( 3/5) (11 (-89 - 25 Sqrt[5] + 5 I Sqrt[2 (205 - 89 Sqrt[5])]))^(1/5) + (-1)^(2/5) (11 (-89 + 25 Sqrt[5] - 5 I Sqrt[2 (205 + 89 Sqrt[5])]))^(1/5) - (-1)^(3/5) (11 (-89 + 25 Sqrt[5] + 5 I Sqrt[2 (205 + 89 Sqrt[5])]))^(1/5))/ (10 2^(2/5))
In[860]:= N[{%[[1]]], %[[2]], Sin[1]}, 22]
Out[860]= {0.8412535328311811688618, 0.8412535328311811688618 + 0.*10^-23 I, 0.8414709848078965066525} [...]
This is shameless, but seems to work: In[375]:= Squint[q_] := Block[{rts = #[[1, 2]] & /@ NSolve[q == 0, WorkingPrecision -> 69,boa], foos, S3 = Permutations[Range[3]]}, foos = InverseFourier[ rts[[#]]/Sqrt[5]]^5 & /@ (Join[{}, #] & /@ (Permutations[ Range[5]])); foos = (fifth[Together[#[[1, 2]]]] &) /@ Solve[0 == Rationalize[ Expand[Times @@ (# - Rest[foos[[Ordering[ Denominator[Rationalize[Plus @@ #, 9.^-69]] & /@ foos, 1][[1]]]]])]]]; boa = Rationalize[Plus @@ rts/5]; Evaluate[boa + foos.Select[ Exp[2*I*\[Pi]*Join[{}, #] & /@ Permutations[Range[4]]/5], MemberQ[Chop[#.foos + boa - rts], 0] &][[1]]^#] &] In[371]:= fifth[z_] := If[Sign[z] == -1, -(-z)^(1/5), z^(1/5)] In[377]:= Squint[-3 - 5 x^2 + x^5] Out[377]= ((25 - 5 Sqrt[5] + Sqrt[30 (25 - 11 Sqrt[5])])^( 1/5) (E^(-((2 I \[Pi])/5)))^#1)/10^( 2/5) + ((25 - 5 Sqrt[5] - Sqrt[30 (25 - 11 Sqrt[5])])^( 1/5) (E^((2 I \[Pi])/5))^#1)/10^( 2/5) - ((-25 - 5 Sqrt[5] + Sqrt[30 (25 + 11 Sqrt[5])])^( 1/5) (E^(-((4 I \[Pi])/5)))^#1)/10^( 2/5) + ((25 + 5 Sqrt[5] + Sqrt[30 (25 + 11 Sqrt[5])])^( 1/5) (E^((4 I \[Pi])/5))^#1)/10^(2/5) & These triggy cases used to fail: Out[419]= Cos[1/31 2^(11 + 2 n) 3^(5 + n) \[Pi]] + Cos[1/31 2^(21 + 2 n) 3^(10 + n) \[Pi]] + Cos[1/31 2^(31 + 2 n) 3^(15 + n) \[Pi]] == -1/10 + ((31 I (409 I + 125 I Sqrt[5] + 5 Sqrt[10 (925 - 409 Sqrt[5])]))^(1/5) (E^(-((2 I \[Pi])/5)))^ n)/(10 2^( 2/5)) + ((-31 I (-409 I - 125 I Sqrt[5] + 5 Sqrt[10 (925 - 409 Sqrt[5])]))^(1/5) (E^((2 I \[Pi])/5))^n)/( 10 2^(2/5)) + ((31 (-409 + 125 Sqrt[5] - 5 I Sqrt[10 (925 + 409 Sqrt[5])]))^( 1/5) (E^(-((4 I \[Pi])/5)))^n)/(10 2^(2/5)) + ((31 (-409 + 125 Sqrt[5] + 5 I Sqrt[10 (925 + 409 Sqrt[5])]))^(1/5) (E^((4 I \[Pi])/5))^ n)/(10 2^(2/5)) In[420]:= N[Table[%, {n, 6}]] Out[420]= {True, True, True, True, True, True} In[422]:= TableForm@ Table[FindIntegerNullVector[(Cos[1/31 2^(11 + 2 n) 3^(5 + n) \[Pi]] + Cos[1/31 2^(21 + 2 n) 3^(10 + n) \[Pi]] + Cos[1/31 2^(31 + 2 n) 3^(15 + n) \[Pi]])^-Range[0, 5]], {n, 5}] Out[422] -32 -16 96 84 -2 -5 -32 -16 96 84 -2 -5 -32 -16 96 84 -2 -5 32 16 -96 -84 2 5 -32 -16 96 84 -2 -5 I.e., these five trig trinomials all satisfy In[425]:= Expand[FromDigits[%422[[4]], x]] Out[425]= 5 + 2 x - 84 x^2 - 96 x^3 + 16 x^4 + 32 x^5 In[426]:= Squint[%425] Out[426]= -1/10 + ((31 I (409 I + 125 I Sqrt[5] + 5 Sqrt[10 (925 - 409 Sqrt[5])]))^( 1/5) (E^(-((2 I \[Pi])/5)))^#1)/(10 2^(2/5)) + ((-31 I (-409 I - 125 I Sqrt[5] +5 Sqrt[10 (925 - 409 Sqrt[5])]))^( 1/5) (E^((2 I \[Pi])/5))^#1)/(10 2^(2/5)) + ((31 (-409 + 125 Sqrt[5] - 5 I Sqrt[10 (925 + 409 Sqrt[5])]))^( 1/5) (E^(-((4 I \[Pi])/5)))^#1)/(10 2^(2/5)) + ((31 (-409 + 125 Sqrt[5] + 5 I Sqrt[10 (925 + 409 Sqrt[5])]))^( 1/5) (E^((4 I \[Pi])/5))^#1)/(10 2^(2/5)) & Caution: Internal WorkingPrecision still doesn't scale with problem size, so sufficiently large coefficients will likely fail. --rwg (with the usual huge help from Julian) PS, I keep forgetting to mention that APGoucher's electrocuted geometer scenario is the default when using my aluminum laptop in my Gypsy-wired bedroom. And I'm not even completing a circuit-- just capacitance to the waterbed, I guess.