couple of questions about complex expressions



rectform should work for (2); cf. also polarform. For float result, as
usual, do with numer = true.

For (1), I think domain = 'complex, but I'm not sure.

Don't have a running Maxima right now, so I haven't checked these.

         -s
On Sep 25, 2012 2:38 AM, "Robert Dodier" <robert.dodier at gmail.com> wrote:

> Hi, I've run into a couple of things that I'm wondering about.
>
> (1) principal branch for (-x)^(1/n) when n is an odd integer. I know
> we've gone back and forth on this one, and at present it looks like the
> real branch is chosen. Is there a way to choose the principal branch?
> For the record, m1pbranch doesn't seem to have any effect here.
>
> (2) division of complex literals: how can I get (a + b*%i)/(c + d*%i) =>
> e + %i*f when a, b, c, and d are numbers.
>
> I can't seem to cause it to happen. realpart(foo) + %i*imagpart(foo) has
> the expected result but it just seems clumsy.
>
> (%i2) foo : (5 + %i)/(3 - 2*%i);
> (%o2) (%i+5)/(3-2*%i)
> (%i3) expand (foo);
> (%o3) %i/(3-2*%i)+5/(3-2*%i)
> (%i4) ratsimp (foo);
> (%o4) -(%i+5)/(2*%i-3)
> (%i5) radcan (foo);
> (%o5) -(%i+5)/(2*%i-3)
> (%i6) foo, numer;
> (%o6) (%i+5)/(3-2*%i)
> (%i7) float (foo);
> (%o7) (%i+5.0)/(3.0-2.0*%i)
> (%i8) expand (float (foo));
> (%o8) %i/(3.0-2.0*%i)+5.0/(3.0-2.0*%i)
>
> Thanks for your help,
>
> Robert Dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>