More work on TMS and TIMESIN



Am Dienstag, den 16.06.2009, 07:58 -0400 schrieb Raymond Toy:
> Dieter Kaiser wrote:
> > I have reported work on the functions TMS und TIMESIN to improve the
> > simplification of the multiplication. I have improved the code further.
> >   
> 
> I haven't looked at the code, but I'm grateful that you've figured out
> how to make these work better.  I think I broke some things a while back
> while trying to make maxima simplify things like 2*3*2^n to 3*2^(n+1).
> 
> >
> > The examples show that the simplification will work commutative, e.g.
> > 12*2^k*3^k gives the same result as 2^k*3^k*12. Therefore a lot of known
> > problems will vanish.
> >
> > Most impressive is the problem 9. The complicated expression will
> > simplify to an very simple expression without any other help.
> >   
> This is pretty surprising.  All of that just because of the changes in
> TMS and TIMESIN?

Yes, the changes I have done to improve tms and timesin do this
simplification. I think some extra calls to expand, factor, and ratsimp
in the testsuite might no longer be necessary.

> > There is one change:
> >
> > Expressions like 3*sqrt(3) simplifies always to 3^(3/2). This behavior
> > is necessary to get consistent simplifications in much more complicated
> > expressions too.
> >   
> This is a bit annoying, but the answer is still correct, so it seems
> fine, especially since your changes fix a bunch of issues.  Your changes
> don't change x*sqrt(x) to x^(3/2), do they?

The simplification of x*sqrt(x) to x^(3/2) is the standard behavior of
Maxima right now. This simplification is necessary for numbers too to
get a commutative simplification.

So, the code up to now does not change anything we already have, but
does it more consistent.

Now, I am working on the problem to simplify sqrt(2)/2+sqrt(2)/2 -->
sqrt(2). Now we get 2/sqrt(2) which will be consistent with sqrt(x)/x
+sqrt(x)/x --> 2/sqrt(x), but can be simplified further. This can be
done in PLUSIN.

The problem at some places of the code is, that we build up
mtimes-expressions in the simplifier like 2*x + 2*x --> 4*x but do not
simplify the mtimes-expressions accordingly.

Dieter Kaiser