Integrator: Stage II, Method 1, Elementary function of exponentials



In stage II: Method 1 of the integrator Maxima transforms powers to a
common base and substitutes for the powers. E.g. in the following
integral Maxima substitutes t = %e^z and solves the new integral:

(%i6) integrate(sqrt(b*%e^z+a)/(e*%e^z+d),z);
Is  a  positive or negative?
p;
Is  e*(a*e-b*d)  positive or negative?
p;
(%o6) 2*(sqrt(a)*b
                *log((2*sqrt(b*%e^z+a)-2*sqrt(a))
                      /(2*sqrt(b*%e^z+a)+2*sqrt(a)))
        /(2*d)
        -b*(a*e-b*d)
          *log((2*e*sqrt(b*%e^z+a)-2*sqrt(e*(a*e-b*d)))
                /(2*e*sqrt(b*%e^z+a)+2*sqrt(e*(a*e-b*d))))
         /(2*d*sqrt(e*(a*e-b*d))))
       /b

But the algorithm does not work as general as expected. When we replace
%e^z with %e^(c*z) or %e^(c*z+f) we no longer get a solution. E.g.

(%i7) integrate(sqrt(b*%e^(c*z)+a)/(e*%e^(c*z)+d),z);
(%o7) 'integrate(sqrt(b*%e^(c*z)+a)/(e*%e^(c*z)+d),z)

It is clear that Maxima should recognize the substitution %e^(c*z) too.
A further problem is, that we do not get the most simple results for a
lot of problems. E.g. we get the following:

(%i1) declare(a,complex)$

(%i2) (a^(c*z))^v;
(%o2) (a^(c*z))^v

(%i3) integrate((a^(c*z))^v,z);
(%o3) %e^(log(a^z)*c*v)/(log(a)*c*v)

For this case a better (and correct) solution is
(a^(c*z))^v/(log(a)*c*v).

(%i4) integrate((a^(c*z+d))^v,z);
(%o4) a^(d*v)*%e^(log(a^z)*c*v)/(log(a)*c*v)

And for this case a more simple (and correct) solution is (a^(c*z
+d))^v/(log(a)*c*v).

The problem is in the routines superexpt and elemxpt. These routines
recognize the general type g^(b*z+a). Unfortunately, Maxima does not
substitute the complete expression t=g^(b*z+a). Maxima only substitutes
g^(b*z+a) -> g^a*t^b.

It is possible to improve this and to implement a fully substitution
g^(b*z+a) -> t. With this implementation we get more solutions and for a
lot of problems more correct solutions, when complex values are
involved.

The testsuite has no serious problems. In rtest_integrate.mac we get 42
changes because of new solutions and some changed results.

I am working further on this topic.

Dieter Kaiser