>>>>> "Raymond" == Raymond Toy <raymond.toy at ericsson.com> writes:
Raymond> I'm going to embarrass myself by asking how to evaluate the integral
Raymond> given above. Currently, if intanalysis is false, maxima converts
Raymond> integral(x^k*log(x)/(x+3),x,0,inf) to the above integral.[1] If k+1>0, k
Raymond> < 0, and k is not an integer, maxima says the above integral is
Raymond> -(log(3)^2+%pi^2)*%e^(log(3)*kk)*(%i*sin(%pi*kk)+cos(%pi*kk))/2
Raymond> But imagpart(%) is
Raymond> -(log(3)^2+%pi^2)*%e^(log(3)*kk)*sin(%pi*kk)/2
Raymond> which is not zero. That's silly since the integrand is always real
Raymond> for real x.
First, there's a typo in the integral. The limits of integration
should be minf to inf, not 0 to inf.
Second, thanks for Dan Stanger for pointing out that Wang's thesis
says the form is p(x)*R(exp(x)) p(x) is a polynomial and where R(z) is
a rational function. This isn't the case for the values of k here.
The bug is apparently in %e-integer-coeff which seems to be checking
to see that we have exp(k*x) for integer k. Fixing that now says the
integral is divergent, which is wrong.
I think, however, that we can apply the transformation the other way.
We have integrate(p(x)*f(exp(x)),x,minf,inf) and can use the
substitution x=log(y) to get integrate(p(log(y))*f(y)/y,y,0,inf).
Maxima has a routine for integrals of this type, so this should work.
Ray