N-th roots of complex numbers?



On 10/01/2013 12:46 PM, Aleksas Domarkas wrote:
>  see
>  http://www.math.utexas.edu/pipermail/maxima/2013/034120.html
>
>  The cube root of 110+74i would return 5+i.
>  How compute this?
>
>  (%i1) expand((5+%i)^3);
>  (%o1) 74*%i+110

There was an error in my last email because I was confused
about how the flag was set.

Here rectform does *not* choose the principal root.

(%i1) domain:real;
(%o1) real
(%i2) float(rectform( gcfactor( 74* %i + 110)^(1/3)));
(%o2) 3.830127018922193*%i-3.366025403784438

  But we can rotate it.

(%i3) expand(float(inpart(roots,2,2)*float(rectform(gcfactor( 74* %i + 
110)^(1/3)))));

(%o3) 1.0*%i+4.999999999999999

Here rectform *does* choose the principal root

(%i4) domain:complex;
(%o4) complex
(%i5) float(rectform( gcfactor( 74* %i + 110)^(1/3)));
(%o5) .9999999999999998*%i+5.000000000000001

I also erroneously said that the principal root is
"the root" with positive imaginary part. I should
have said "a root".

>
>  Aleksas D
>
>
>  _______________________________________________
>  Maxima mailing list
>  Maxima at math.utexas.edu
>  http://www.math.utexas.edu/mailman/listinfo/maxima