login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #12 radicalSolve fails to find all roots ? revision 2 of 2

1 2
Editor: kratt6
Time: 2007/12/28 14:40:15 GMT-8
Note:

added:

From kratt6 Fri Dec 28 14:40:15 -0800 2007
From: kratt6
Date: Fri, 28 Dec 2007 14:40:15 -0800
Subject: 
Message-ID: <20071228144015-0800@axiom-wiki.newsynthesis.org>

Category: Axiom Mathematics => Axiom Library 


Submitted by : (unknown) at: 2007-11-17T21:55:37-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

From
William Sit
Subject
Re: [Axiom-developer]? [Q]? radicalSolve fails to find all roots ?
Date
Mon, 17 Jan 2005 16:31:52 -0500

These are NOT bugs! But the following may be! Consider the equation z^n=1 for n=7

axiom
radicalSolve(z^7=2)

\label{eq1}\begin{array}{@{}l}
\displaystyle
\left[{z ={\root{7}\of{2}}}, \:{z ={{{\sqrt{- 1}}\ {\root{7}\of{2}}\ {\sin \left({{2 \  \pi}\over 7}\right)}}+{{\root{7}\of{2}}\ {\cos \left({{2 \  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{2}}\ {\sin \left({{4 \  \pi}\over 7}\right)}}+{{\root{7}\of{2}}\ {\cos \left({{4 \  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{2}}\ {\sin \left({{6 \  \pi}\over 7}\right)}}+{{\root{7}\of{2}}\ {\cos \left({{6 \  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{2}}\ {\sin \left({{8 \  \pi}\over 7}\right)}}+{{\root{7}\of{2}}\ {\cos \left({{8 \  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{2}}\ {\sin \left({{{10}\  \pi}\over 7}\right)}}+{{\root{7}\of{2}}\ {\cos \left({{{10}\  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{2}}\ {\sin \left({{{12}\  \pi}\over 7}\right)}}+{{\root{7}\of{2}}\ {\cos \left({{{12}\  \pi}\over 7}\right)}}}}\right] 
(1)
Type: List(Equation(Expression(Integer)))

comments

Of course, these are correct solutions by Euler's Formula. A bit surprising that radicalSolve invokes these for z^7=2 and not for z^7=1; when n is 7, these trignometric values are not embeddable in a tower of "solvable" extensions. That is, these are not solutions expressible in terms of radicals (of real numbers) and arithmetic alone. Put another way, the regular 7-gon is not constructible by compass and ruler alone. From:

A necessary and sufficient condition that a regular n-gon be constructible is that phi(n) be a power of 2, where phi(n) is the totient function (KrĂ­zek 2001, p. 34):

  n =  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17 18 19 20
  phi= 1  1  2  2  4  2  6  4  6   4  10   4  12   6   8   8  16  6 18  8
  bad=                   x     x       x       x   x              x  x
  Vladimir's "not good" values are 
  n =                    7            11      13  14  15      17    19

So if you compare the constructible regular n-gons, you can see why Axiom's results are reasonable: radicalSolve only finds solutions that are expressible in terms of radicals and arithmetic operations. It did not find those for n = 15 and 17 probably (I am guessing) because at the time of implementation, these constructions were not known (at least to the programmer). On the other hand, for n = 9, 18, the solutions are expressible in radicals only if radicals of complex numbers are allowed and Axiom found those (perhaps it shouldn't?). The expansion for (-1)^{1/7} that Vladimir gave involves radicals of complex numbers, as theory predicts.

When Axiom cannot find solutions, it is (presumably) a PROOF that the other solutions are NOT solvable by radicals (using real numbers), or at least, there is no known proof that it is solvable at the time of implementation. (That is why I am surprised at the above result for z^7=2).

In other words, rather than viewing the answer for z^7=1 as a bug, we should view the answers for z^7=2, z^7=3 (and may be even z^9=1, z^{18}=1) as bugs!

Still, the package should be upgraded.

-------------------

axiom
radicalSolve(z^9=1,z)

\label{eq2}\begin{array}{@{}l}
\displaystyle
\left[{z ={{\root{3}\of{-{\sqrt{- 3}}- 1}}\over{\root{3}\of{2}}}}, \:{z ={{{\left({{\sqrt{- 1}}\ {\sqrt{3}}}- 1 \right)}\ {\root{3}\of{-{\sqrt{- 3}}- 1}}}\over{2 \ {\root{3}\of{2}}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\left(-{{\sqrt{- 1}}\ {\sqrt{3}}}- 1 \right)}\ {\root{3}\of{-{\sqrt{- 3}}- 1}}}\over{2 \ {\root{3}\of{2}}}}}, \:{z ={{\root{3}\of{{\sqrt{- 3}}- 1}}\over{\root{3}\of{2}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\left({{\sqrt{- 1}}\ {\sqrt{3}}}- 1 \right)}\ {\root{3}\of{{\sqrt{- 3}}- 1}}}\over{2 \ {\root{3}\of{2}}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\left(-{{\sqrt{- 1}}\ {\sqrt{3}}}- 1 \right)}\ {\root{3}\of{{\sqrt{- 3}}- 1}}}\over{2 \ {\root{3}\of{2}}}}}, \:{z ={{-{\sqrt{- 3}}- 1}\over 2}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 3}}- 1}\over 2}}, \:{z = 1}\right] 
(2)
Type: List(Equation(Expression(Integer)))
axiom
radicalSolve(z^7=3)

\label{eq3}\begin{array}{@{}l}
\displaystyle
\left[{z ={\root{7}\of{3}}}, \:{z ={{{\sqrt{- 1}}\ {\root{7}\of{3}}\ {\sin \left({{2 \  \pi}\over 7}\right)}}+{{\root{7}\of{3}}\ {\cos \left({{2 \  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{3}}\ {\sin \left({{4 \  \pi}\over 7}\right)}}+{{\root{7}\of{3}}\ {\cos \left({{4 \  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{3}}\ {\sin \left({{6 \  \pi}\over 7}\right)}}+{{\root{7}\of{3}}\ {\cos \left({{6 \  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{3}}\ {\sin \left({{8 \  \pi}\over 7}\right)}}+{{\root{7}\of{3}}\ {\cos \left({{8 \  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{3}}\ {\sin \left({{{10}\  \pi}\over 7}\right)}}+{{\root{7}\of{3}}\ {\cos \left({{{10}\  \pi}\over 7}\right)}}}}, \: \right.
\
\
\displaystyle
\left.{z ={{{\sqrt{- 1}}\ {\root{7}\of{3}}\ {\sin \left({{{12}\  \pi}\over 7}\right)}}+{{\root{7}\of{3}}\ {\cos \left({{{12}\  \pi}\over 7}\right)}}}}\right] 
(3)
Type: List(Equation(Expression(Integer)))
axiom
radicalSolve(z^7=1.)
7 WARNING (genufact): No known algorithm to factor ? - 1.0 , trying square-free.

\label{eq4}\begin{array}{@{}l}
\displaystyle
\left[{z ={1.0}}, \: \right.
\
\
\displaystyle
\left.{z ={{{0.78183148246802980871}\ {\sqrt{-{1.0}}}}+{0.623
48980185873353053}}}, \right.
\
\
\displaystyle
\left.\: \right.
\
\
\displaystyle
\left.{z ={{{0.97492791218182360702}\ {\sqrt{-{1.0}}}}-{0.222
52093395631440428}}}, \right.
\
\
\displaystyle
\left.\: \right.
\
\
\displaystyle
\left.{z ={{{0.43388373911755812048}\ {\sqrt{-{1.0}}}}-{0.900
96886790241912624}}}, \right.
\
\
\displaystyle
\left.\: \right.
\
\
\displaystyle
\left.{
\begin{array}{@{}l}
\displaystyle
z ={
\begin{array}{@{}l}
\displaystyle
-{{0.43388373911755812046}\ {\sqrt{-{1.0}}}}- 
\
\
\displaystyle
{0.90096886790241912624}
(4)
Type: List(Equation(Expression(Float)))
axiom
radicalSolve(z^6+z^5+z^4+z^3+z^2+z+1=0)

\label{eq5}\left[ \right](5)
Type: List(Equation(Expression(Integer)))

William

anonymous [mathaction@axiom-developer.org]? wrote:
When Axiom cannot find solutions, it is (presumably) a PROOF that the other solutions are NOT solvable by radicals (using real numbers), or at least, there is no known proof that it is solvable at the time of implementation. (That is why I am surprised at the above result for z^7=2).

Given Axiom's assumptions about input in this problem, why cannot I do this:

axiom
z:Complex(Float)
    radicalSolve(z^7=1)
    z:Integer
    radicalSolve(z^7=1)
    z:Variable(Complex(Float))
    radicalSolve(z^7=1)
    z:Symbol(Complex(Float))
    radicalSolve(z^7=1)
z is declared as being in Integer but has not been given a value.

...and get the appropriate answers?

Also this behind-the-scenes behavior where the answer depends on the input type or assumptions is undesirable, and surprising to casual users. When algorithms must make assumptions about the type of a Variable or Symbol, at the very least a message should be printed indicating that the assumption was made.

An even better algorithm would print a message, then keep that assumption for the remainder of the calculation...

Original question
Mon, 17 Jan 2005 22:19:23 -0600 reply
....................................................................

Obviously, all the roots of the equation z^7 = 1 can be expressed in radicals, and Mathematica can easily produce the explicit expressions in terms of radicals:

  Solve[z^7 == 1, z]

  {{z -> 1}, {z -> -(-1)^(1/7)}, {z -> (-1)^(2/7)}, {z -> -(-1)^(3/7)},
  {{z -> {z -> (-1)^(4/7)}, {z -> -(-1)^(5/7)}, {z -> (-1)^(6/7)}}

To save the space, below the only example is given:

  FunctionExpand[ComplexExpand[-(-1)^(1/7)]]

  (1/2)*((1/3)*((1/2)*(-1 + I*Sqrt[7]) + ((-1 + I*Sqrt[3])*((1/2)*(-1 +
  I*Sqrt[7]) + (1/2)*(-1 - I*Sqrt[7])*((1/2)*(-1 + I*Sqrt[3]) +
  (1/4)*(-1 + I*Sqrt[3])^2)))/(2*(6 + (3/4)*(-1 + I*Sqrt[3])*(-1 +
  I*Sqrt[7]) + (1/2)*(-1 - I*Sqrt[7])*(1 + (3/4)*(-1 +
  I*Sqrt[3])^2))^(1/3)) + (1/4)*(-1 + I*Sqrt[3])^2*(6 + (3/4)*(-1 +
  I*Sqrt[3])*(-1 + I*Sqrt[7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-1 + I*Sqrt[7])*(1
  + (3/4)*(-1 + I*Sqrt[3])^2))^(1/3)) +(1/2)*(-1 + I*Sqrt[3])*(6 +
  (3/4)*(-1 + I*Sqrt[3])*(-1 - I*Sqrt[7]) + (1/2)*(-1 + I*Sqrt[7])*(1 +
  (3/4)*(-1 + I*Sqrt[3])^2))^(1/3)))

According to the AXIOM Book--

Use radicalSolve if you want your solutions expressed in terms of radicals.

However, already for z^7 = 1 this is not so,

axiom
radicalSolve(z^7=1, z)
z is declared as being in Integer but has not been given a value.

and the problem exists for 11, 13, 14, 15, 17, 19 etc

axiom
for i in 1..20 repeat print([i,#radicalSolve(z^i=1,z)])
There are 4 exposed and 0 unexposed library operations named radicalSolve having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op radicalSolve to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named radicalSolve with argument type(s) Equation(Integer) Integer
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. FriCAS will attempt to step through and interpret the code.
z is declared as being in Integer but has not been given a value.

    [1,1]
    [2,2]
    [3,3]
    [4,4]
    [5,5]
    [6,6]
    [7,1]   <-- not good
    [8,8]
    [9,9]
    [10,10]
    [11,1]  <-- not good
    [12,12]
    [13,1]  <-- not good
    [14,2]  <-- not good
    [15,7]  <-- not good
    [16,16]
    [17,1]  <-- not good
    [18,18]
    [19,1]  <-- not good
    [20,20]

Best,

Vladimir

Category: Axiom Mathematics => Axiom Library