Subject: factor expression that contains complex %i
From: Rupert Swarbrick
Date: Sun, 08 Sep 2013 10:25:21 +0100
"Burgess, Don" <deburgess at asbury.edu> writes:
> Why does not the factor command work on an expression that contains
> the imaginary %i?
>
> Please refer to the attached image file for example commands and output.
>
> thanks for your work,
> don burgess
For people following along, the transcript is basically:
(%i1) lp: %i*w-b;
(%o1) %i w - b
(%i2) lp*lp;
2
(%o2) (%i w - b)
(%i3) expand(%);
2 2
(%o3) - w - 2 %i b w + b
(%i4) factor(%);
2 2
(%o4) - (w + 2 %i b w - b )
The point is that factor only works over the reals. Indeed, if you
didn't know about complex numbers, you'd say that %o3 can't be factored
further (R isn't algebraically complete...).
To factor over the complex numbers, or at least the Gaussian integers,
use gfactor:
(%i5) gfactor (%);
2
(%o5) - (w + %i b)
If you want to work in more complicated number fields, it's possible to
give minimal polynomials for your extensions to factor. I haven't used
that personally, so I'm not really qualified to give you a good example.
Rupert
PS: Although it's fine to attach an image, the result isn't possible to
quote in replies and so it doesn't work that brilliantly on a help
mailing list. If your problem is with Maxima, rather than the GUI
around it, it's probably better to send text to the mailing list. I
don't use wxMaxima myself though, so I'm not sure what's the easiest
way to do that. Maybe there's a "copy this line" function?
Incidentally, if the expressions are really hideous (they aren't
here), then sometimes the resulting text is much easier to read if
you also switch 2d display off with "display2d: false".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130908/f28c9a94/attachment.pgp>