[Maxima] Wrong simplification of log(1/z)
Dieter Kaiser
drdieterkaiser at web.de
Wed Jul 30 16:26:39 CDT 2008
I would like to show a sample session with the code for the Exponential
Integrals concerning the transformation of the Exponential Integral Ei to
Gammaincomplete and doing the Laplace transform:
(%i22) logexpand:false;
(%o22) false
/* This flag is used to switch between different representations. */
(%i23) expintrep:gammaincomplete;
(%o23) gammaincomplete
/* The Exponential Integral Ei now simplifies to
a representation in terms of Gammaincomplete */
(%i24) expintegral_ei(t);
(%o24) (log(t)-log(1/t))/2-log(-t)-gammaincomplete(0,-t)
(%i26) assume(s>0);
(%o26) [s > 0]
/* specint can not integrate log(1/t), we get no full result
(I had to correct a bug in specint for the Log function - my error.) */
(%i27) specint(%e^(-s*t)*expintegral_ei(t),t);
(%o27) (specint(-log(1/t)*%e^-(s*t),t)+2*log(1-s/(s-1))/s+(-log(s)-%gamma)/s
-2*(-log(-s)-%gamma)/s)/2
(%i28) logexpand:true;
(%o28) true
/* Because of some simplifications we get a result
which is not fully simplified */
(%i29) ratsimp(specint(%e^(-s*t)*expintegral_ei(t),t));
(%o29) -(log(s)-log(-s)-log(-1/(s-1)))/s
(%i30) logexpand:super;
(%o30) super
/* Now we get a fully simplified result */
(%i31) ratsimp(specint(%e^(-s*t)*expintegral_ei(t),t));
(%o31) -log(s-1)/s
The Laplace transform integrates from 0 to +inf. Therefore all simple rules for
the simplification of the Log function can be used and we get a fully simplified
result for the Laplace transform. In the code of specint the Exponential
Integral is implemented as %ei. The transformation of %ei to Gammaincomplete
don't use the phase factors. This works in the case of the Laplace transform.
We get nice results for the Exponential Integrals Shi and Chi too. The results
for Si and Ci are not so nice. Because for these functions we get Log functions
with complex arguments. Maxima seems to have a lot more problems to simplify
these Log functions.
I have to correct the bug for the Log function in specint. Perhaps we can make
the algorithm of specint a bit smarter. We know that we have to integrate the
Log function only for positive and real values. Therefore we could introduce
some rules for the Log function to get more results.
Another project would be to make the Log function itself smarter to allow more
calculations symbolically. I will look at the problem.
Dieter Kaiser
-----Ursprüngliche Nachricht-----
Von: robert.dodier at gmail.com [mailto:robert.dodier at gmail.com]
Gesendet: Mittwoch, 30. Juli 2008 04:25
An: Dieter Kaiser
Cc: willisb at unk.edu; maxima at math.utexas.edu
Betreff: Re: [Maxima] Wrong simplification of log(1/z)
On 7/29/08, Dieter Kaiser <drdieterkaiser at web.de> wrote:
> So we have a Log function with no check of the parameters. This might be
correct
> for a wide range of parameters including z,a real and positive. For a
complete
> symbolically support of the Log function the most general correct answer
could
> be:
For my part, I hope you will review & revise the code so it yields the
simplest (as you see it) correct result in each case (real negative vs real
positive vs complex non-real, or whatever).
best
Robert Dodier
More information about the Maxima
mailing list