MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why is the negative root?


Daniel,
Please notice that the word elitist was in quotation mark.
Nevertheless,  I am solemnly withdrawing it. Thank you for taking the
time to answer.

"I particularly wonder what part of the story I missed. Frankly, I
can't even figure out what part I told: I see nothing to indicate I
replied ..."

In fact Paul Abott had replied to me and had quoted you in great
detail. I was replying to his comments and hence, in that context, you
had had well defined (even numbered) statements. So I took the liberty
to point out that the arguments originally brought up by you do not
tell the whole story.

IN fact your lates remark tells a much more realistic story:
"[the root function] is discontinuous at a root crossing. I tend to
think of parametrized
 roots as an ensemble, rather than as individual root functions, and
thus
regard this as less a problem than, say, dealing with the spurious
imaginary parts of a numericized radical formulation."

This is a very clear statement, unfortunately the syntax in Mathematica
suggests otherwise. If the Root object would provide a list, for
instance with 3 elements for a cubic, I would like her a bit better.

">> Assuming that the coefficients are real and I am interested only in
 real roots, how do I  persuade Reduce to give the formulas 69 - 72 of
  http://mathworld.wolfram.com/CubicFormula.html ? <<
[You] could try the method in:
 http://library.wolfram.com/infocenter/Conferences/337/
 See section: "Radical solutions vs. Root objects. vs. trigs for cubic
 equations". Whether this "works" will depend on what exactly you want
in
 an arctrig formulation, and (I think) on some details of
ComplexExpand."

Thank you for pointing to the conference paper. In fact I was referring
partly to the above section of your paper when I expressed the opinion
that it is not the whole story. The problem is that the Root object
discontinuously depends on any parameter, but the Mathematica syntax and some
additional remarks like  "it can be differentiated w.r.t the parameter"
make a completely different impression in the not-so-educated user's
(like my) head.

Anyway, reading carefully the constructive answers from you and Paul,
(and also A.K.'s always welcome opinion) now I think I have a grasp of
the problem. In fact I could manage to write a RealCubicRoots function,
that takes the coefficients a2, a1 and a0 and (assuming they are real)
provides the real root(s) as a conditional statement:


RealCubicRoots[a2_,a1_,a0_]:=If[27*a0^2+4*a1^3+4*a0*a2^3>a1*a2*(18*a0+a1*a2),If[-27*a0+9*a1*a2-2*a2^3+3*Sqrt[3]*Sqrt[27*a0^2+4*a1^3-18*a0*a1*a2-a1^2*a2^2+4*a0*a2^3]<0,{(1/12)*(-4*a2+(4*2^(1/3)*(3*a1-a2^2))/(27*a0-9*a1*a2+2*a2^3-3*Sqrt[3]*Sqrt[27*a0^2+4*a1^3-18*a0*a1*a2-a1^2*a2^2+4*a0*a2^3])^(1/3)-2*2^(2/3)*(27*a0-9*a1*a2+2*a2^3-3*Sqrt[3]*Sqrt[27*a0^2+4*a1^3-18*a0*a1*a2-a1^2*a2^2+4*a0*a2^3])^(1/3))},If[-27*a0+9*a1*a2-2*a2^3+3*Sqrt[3]*Sqrt[27*a0^2+4*a1^3-18*a0*a1*a2-a1^2*a2^2+4*a0*a2^3]>0,{-(a2/3)-(2^(1/3)*(3*a1-a2^2))/(3*(-27*a0+9*a1*a2-2*a2^3+3*Sqrt[3]*Sqrt[27*a0^2+4*a1^3-18*a0*a1*a2-a1^2*a2^2+4*a0*a2^3])^(1/3))+(-27*a0+9*a1*a2-2*a2^3+3*Sqrt[3]*Sqrt[27*a0^2+4*a1^3-18*a0*a1*a2-a1^2*a2^2+4*a0*a2^3])^(1/3)/(3*2^(1/3))},{-(a2/3)}]],{(1/3)*(-a2+2*Sqrt[-3*a1+a2^2]*Cos[(1/3)*ArcCos[(-27*a0+9*a1*a2-2*a2^3)/(2*Sqrt[-(3*a1-a2^2)^3])]]),(1/3)*(-a2+2*Sqrt[-3*a1+a2^2]*Cos[(1/3)*(2*Pi+ArcCos[(-27*a0+9*a1*a2-2*a2^3)/(2*Sqrt[-(3*a1-a2^2)^3])])]),(1/3)*(-a2+2*Sqrt[-3*a1+a2^2]*Cos[(1/3)*(4*Pi!
 +ArcCos[(-27*a0+9*a1*a2-2*a2^3)/(2*Sqrt[-(3*a1-a2^2)^3])])])}]

(If anybody finds it ugly, Experimental`OptimizeExpression[] will
convert it into a much "nicer" one.)

The point is, that this function works with symbols, too.

For Paul Abott's first example No 1: z^3 + b z - 1 == 0  it gives

Assuming[27+4 b^3>0,Simplify[RealCubicRoots[0,b,-1]]]//InputForm
 {(-2*3^(1/3)*b + 2^(1/3)*(9 + Sqrt[81 + 12*b^3])^(2/3))/(6^(2/3)*(9 +
Sqrt[81 + 12*b^3])^(1/3))}
 Assuming[27+4 b^3<=0,Simplify[RealCubicRoots[0,b,-1]]]//InputForm
 {(2*Sqrt[-b]*Cos[ArcCos[(3*Sqrt[3])/(2*(-b)^(3/2))]/3])/Sqrt[3],
 (2*Sqrt[-b]*Cos[(2*Pi +
ArcCos[(3*Sqrt[3])/(2*(-b)^(3/2))])/3])/Sqrt[3],
 (2*Sqrt[-b]*Cos[(4*Pi +
ArcCos[(3*Sqrt[3])/(2*(-b)^(3/2))])/3])/Sqrt[3]}

For Paul Abott's second example:  z^3 + b z - 1 == 0  it gives

RealCubicRoots[0,-3 a,2 b]//InputForm
 If[-108*a^3 + 108*b^2 > 0,
 If[-27*(2*b) + 9*(-3*a)*0 - 2*0^3 + 3*Sqrt[3]*Sqrt[27*(2*b)^2 +
4*(-3*a)^3 - 18*(2*b)*(-3*a)*0 - (-3*a)^2*0^2 +
       4*(2*b)*0^3] < 0,
  {(1/12)*(-4*0 + (4*2^(1/3)*(3*(-3*a) - 0^2))/(27*(2*b) - 9*(-3*a)*0 +
2*0^3 -
        3*Sqrt[3]*Sqrt[27*(2*b)^2 + 4*(-3*a)^3 - 18*(2*b)*(-3*a)*0 -
(-3*a)^2*0^2 + 4*(2*b)*0^3])^(1/3) -
     2*2^(2/3)*(27*(2*b) - 9*(-3*a)*0 + 2*0^3 -
3*Sqrt[3]*Sqrt[27*(2*b)^2 + 4*(-3*a)^3 - 18*(2*b)*(-3*a)*0 -
           (-3*a)^2*0^2 + 4*(2*b)*0^3])^(1/3))},
  If[-27*(2*b) + 9*(-3*a)*0 - 2*0^3 + 3*Sqrt[3]*Sqrt[27*(2*b)^2 +
4*(-3*a)^3 - 18*(2*b)*(-3*a)*0 - (-3*a)^2*0^2 +
        4*(2*b)*0^3] > 0, {-(0/3) - (2^(1/3)*(3*(-3*a) - 0^2))/
      (3*(-27*(2*b) + 9*(-3*a)*0 - 2*0^3 + 3*Sqrt[3]*Sqrt[27*(2*b)^2 +
4*(-3*a)^3 - 18*(2*b)*(-3*a)*0 - (-3*a)^2*0^2 +
            4*(2*b)*0^3])^(1/3)) + (-27*(2*b) + 9*(-3*a)*0 - 2*0^3 +
        3*Sqrt[3]*Sqrt[27*(2*b)^2 + 4*(-3*a)^3 - 18*(2*b)*(-3*a)*0 -
(-3*a)^2*0^2 + 4*(2*b)*0^3])^(1/3)/(3*2^(1/3))},
   {-(0/3)}]],
 {(1/3)*(-1*0 + 2*Sqrt[-3*(-3*a) + 0^2]*
     Cos[(1/3)*ArcCos[(-27*(2*b) + 9*(-3*a)*0 -
2*0^3)/(2*Sqrt[-(3*(-3*a) - 0^2)^3])]]),
  (1/3)*(-1*0 + 2*Sqrt[-3*(-3*a) + 0^2]*
     Cos[(1/3)*(2*Pi + ArcCos[(-27*(2*b) + 9*(-3*a)*0 -
2*0^3)/(2*Sqrt[-(3*(-3*a) - 0^2)^3])])]),
  (1/3)*(-1*0 + 2*Sqrt[-3*(-3*a) + 0^2]*
     Cos[(1/3)*(4*Pi + ArcCos[(-27*(2*b) + 9*(-3*a)*0 -
2*0^3)/(2*Sqrt[-(3*(-3*a) - 0^2)^3])])])}]

Now I almost have what I wanted, but I would be more comfortable with a
couple of Mathematica calls, such as

 Reduce[{z^3 + b z - 1 == 0, b>0}, z, Reals]

if it really worked. But it only gives an object, that is not useful
(to me).


Thanks to y'all,
Peter





Daniel Lichtblau wrote:
> p-valko at tamu.edu wrote:
> > I am a bit surprised by the "elitism" of the responses. Paul and Andrej
> > and previously Daniel Lichtbau all defend the Root objects without
> > telling the whole story.
>
> I am hard pressed to figure out what might earn one this bit of name
> calling. It's not exactly new territory (in the States one gets called
> elitist for things as simple as political major party affiliation). But
> it is a bit unusual on MathGroup.
>
> I particularly wonder what part of the story I missed. Frankly, I can't
> even figure out what part I told: I see nothing to indicate I replied in
> MathGroup to this thread, and unless I replied from my home machine via
> webmail interface (possible, but unlikely), there is no evidence in my
> outgoing mailbox that I replied at all.
>
>
> > In my opinion those objects are just
> > pseudo-useful. If you plot
> >     Plot[Root[-1 + b #1 + #1^3 &, 1], {b,-10,10}]
> > you will see that they are defending a monster.
>
> It is discontinuous at a root crossing. I tend to think of parametrized
> roots as an ensemble, rather than as individual root functions, and thus
> regard this as less a problem than, say, dealing with the spurious
> imaginary parts of a numericized radical formulation. All the more so in
> situations where one has roots to a quartic, or where one has no chance
> to obtain a radical form of roots.
>
>
> > But I am not going to start (continue) a debate on faith. Rather I am
> > trying to formulate my question on a language even hard-core Mathematica
> > defenders can accept:
> >
> > "Assuming that the coefficients are real and I am interested only in
> > real roots, how do I  persuade Reduce to give the formulas 69 - 72 of
> >
> >  http://mathworld.wolfram.com/CubicFormula.html ?
> > (I do not mind if Mathematica gives two different result depending on the sign
> > of the determinant.)"
> > Regards
> > Peter
> > [...]
>
> Could try the method in:
>
> http://library.wolfram.com/infocenter/Conferences/337/
>
> See section: "Radical solutions vs. Root objects. vs. trigs for cubic
> equations". Whether this "works" will depend on what exactly you want in
> an arctrig formulation, and (I think) on some details of ComplexExpand.
>
> An aside: if you want to think of this as some sort of battle with
> myself amongst defenders of Root[] functions, you are sort of out on
> your own. If this ever was a battle, it was won many years ago. Though
> as best I can tell it was generally recognized (both in symbolic and
> numeric computation circles), before the appearance of Root[] functions
> (and equivalents in other programs), that these were the needed
> representation for sensible handling of algebraic functions.
> 
> 
> Daniel Lichtblau
> Wolfram Research


  • Prev by Date: Re: CauchyPrincipalValue questions
  • Next by Date: Re: Typesetting on the Mathematica users wiki
  • Previous by thread: Re: Re: Why is the negative root?
  • Next by thread: Re: Why is the negative root?