complex number arithmetic



I think I agree.

What about complex exponentiation?  Probably the most user-friendly
rule would be that we would do it whenever the result is correctly
expressed in numbers only.  The easy case is integral powers:

      (1+2*%i)^3 => -2*%i-11
      1/(1+%i) => 1/2 - %i/2   (though arguably (1-%i)/2 is clearer in
some contexts)

The harder case is

      (12*%i-5)^(1/2) => 2+3*%i

and

      (12.0*%i-5)^(1/3) => 1.432702373014988*%i+1.864440592788114

but *not*

      (12*%i-5)^(1/3) =>
13^(1/3)*%i*sin((%pi-atan(12/5))/3)+13^(1/3)*cos((%pi-atan(12/5))/3)

which is probably of no use to anyone....

           -s

On Thu, Apr 16, 2009 at 6:46 AM, Barton Willis <willisb at unk.edu> wrote:
>
> I think it would be good if Maxima automatically returned a
> rectangular form for complex number multiplication and division; to
> get the rectangular form, we need to use expand (products) or rectform
> (quotients or products)
>
> ?(%i1) (1 + %i)*(2/3-%i * 5.70b0);
> ?(%o1) (%i+1)*(2/3-5.7b0*%i)
>
> ?(%i2) expand(%);
> ?(%o2) 6.366666666666667b0-5.033333333333333b0*%i
>
> Another option is rat + keepfloat, but keepfloat converts big floats
> to rationals.
>
> Barton
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>