1

Background

While working in Maxima I got two expressions I knew were equivalent, but Maxima did not think so.

(This started out as a question about floating point accuracy in Maxima, but I got stuck on something slightly more fundamental: how to make sure expressions are "normalized", if that is even possible.)

Problem session

While solving an equation using solve() I got an answer (a) involving rationals and rational exponents. I also had a "reference solution" (b) in another form. It is not obvious from inspection that these numbers are identical:

(%i1) a:(311647*2181529^(1/5))/(63360*17424^(1/5))$
(%i2) b:(7^(7/5)*211^(12/5))/(40*11^(7/5)*12^(12/5))$

I wanted to see if they were, so I tried a few things:

(%i3) a=b,pred;
(%o3)                                false
(%i4) a-b,numer;
(%o4)                         1.4210854715202E-14
(%i5) ratsimp(a-b);
                      2/5   2/5        1/5    7/5    12/5      1/5
             311647 11    12    2181529    - 7    211     17424
(%o5)        -----------------------------------------------------
                                7/5   12/5      1/5
                           40 11    12     17424

Wow, that's a mouthful! Obviously I've done something wrong, but I'm not giving up. I'm trying different things until I find:

(%i6) radcan(a-b);
(%o6)                                  0
(%i7) radcan(a)=radcan(b),pred;
(%o7)                               true

Bingo! radcan() managed to convert it to a canonical form, which could then be further simplified.

Question

radcan() was necessary in this case because the expression involved radicals, but at first I did not know that - when developing something you don't always know in which form the solution is. Is there a standard set of functions that one can apply, to "canonicalize" a generic expression in Maxima, or am I abusing Maxima here?

pipe
  • 657
  • 10
  • 27

0 Answers0