I have come across an integral that behaves badly/oddly for specific forms of the limits.

The integral is

int( x/(exp(x)-1) , x=xl..xu);

If the lower limit, xl, is specified as a non-integer value such as 0.1 then this works fine for upper limits of 10, 100 or even infinity.  However if the lower limit is specified as an integer such as 1, 2 or 3 then it produces a result in terms of polylogs, and trying to evalf this result gives a complex result (albeit with a very small imaginary component!).  However if the same integral is attempted with a real decimal number instead of an integer, such as 1.0, 2.0 or 3.0, for the lower limit then the result is produced as a single real value just fine.

Is this a bug in Maple or have I misunderstood something about the way integrals should be done?

Please Wait...