An extension to solve



We have two bug reports Bug ID: 2976378 - Solver doesn't finish and Bug
ID: 2944431 - 0.0007s^1.874. The problem is that Maxima has an algorithm
to solve (a*b)^x=x, but can not solve a^x*b^x=c. See the following
examples:

(%i1) solve((a*b)^x=c,x);
(%o1) [x = log(c)/log(a*b)]

(%i2) solve(a^x*b^x=c,x);
(%o2) [b^x = c/a^x]

I have written a Lisp routine combine-factors, which does for an
arbitrary nested expression the transformation a^x*b^x*c^-x ... ->
(a*b/c*...)^x, e.g.

(%i4)  ?combine\-factors(a^x*b^x,x);
(%o4) (a*b)^x

(%i5)  ?combine\-factors(a^x*b^x/c^x+sin(a^x/b^x),x);
(%o5) (a*b/c)^x+sin((a/b)^x)

With this routine Maxima gets solutions for the reported problems:

(%i6)  solve(?combine\-factors(a^x*b^x=c,x),x);
(%o6) [x = log(c)/log(a*b)]

Some more work is needed to get it to work for expressions like
2^x/3^x=c, which include numbers. But it works too:

(%i7) solve(2^x/3^x=c,x);
(%o7) [x = log(c)/log(2/3)]

I have got no problems with the testsuite and share_testsuite.

Any comments?

Dieter Kaiser

P.S. For German readers I have put some more informations on a Website
http://crategus.users.sourceforge.net/lisp.html You can find the routine
combins-factors at this place too. This is my first attempt to make a
website and I have started with some informations about Maxima and Lisp.