Am Montag, den 27.07.2009, 12:10 -0700 schrieb Richard Fateman:
> integrate(log(sin(x),x) gives a Lisp error.
The error is no longer present with the current CVS version. Until
Maxima 5.17 we have got a noun form. Maxima 5.18.1 gives the reported
Lisp error. That is the new result:
(%i14) integrate(log(sin(x)),x);
(%o14) x*log(sin(x))-(x*log(sin(x)^2+cos(x)^2+2*cos(x)+1)
+x*log(sin(x)^2+cos(x)^2-2*cos(x)+1)
+2*%i*x*atan2(sin(x),cos(x)+1)
-2*%i*x*atan2(sin(x),1-cos(x))-2*%i*li[2](%e^(%
i*x))
-2*%i*li[2](-%e^(%i*x))-%i*x^2)
/2
But the result is not very well simplified. It contains sin^2+cos^2
terms and I think the atan2 terms should vanish too. More work can be
done.
> Comparing integration results in Mathematica, I get Ei(x) exponential
> integral in Mathematica,
> and incomplete_gamma(0,-%e^x) in maxima. Same result?
Maxima at this time does not simplify the Incomplete Gamma function
automatically. But more simplifications or transformations can be done,
e.g.
(%i15) gamma_incomplete(0,-exp(x)),gamma_expand:true;
(%o15) -expintegral_ei(%e^x)-log(-%e^x)+x
(%i16) %,logexpand:all;
(%o16) -expintegral_ei(%e^x)-log(-1)
(%i21) %,rectform;
(%o21) -expintegral_ei(%e^x)-%i*%pi
If we change the sign of the argument to gamma_incomplete we get:
(%i22) gamma_incomplete(0,exp(x)),gamma_expand:true,logexpand:all;
(%o22) -expintegral_ei(-%e^x)
The question is what simplifications should happen automatically.
Dieter Kaiser