# Unable to evaluate integral of x*x/(exp(x)+1)

I was trying to evaluate the following integral using sage

integrate(x*x/(exp(x)+1),x,0,oo)


and I get the following answer

3/2*zeta(3) + limit(1/3*x^3 - x^2*log(e^x + 1) - 2*x*polylog(2, -e^x) +
2*polylog(3, -e^x), x, +Infinity, minus)


However, mathematica gives just the first term 3/2*zeta(3). Is there a way to get just the zeta function for integrals of the form x^n/(exp(x)+1)? The limit makes it difficult to calculate the numerical values in the end

edit retag close merge delete

Sort by ยป oldest newest most voted

Maxima can not compute the limit but expanding into series and integrating term by term helps:

sage: maxima('powerseries(x^2*exp(-x)/(exp(-x)+1),exp(-x),0)')
x^2*%e^-x*'sum((-1)^i1*%e^-(i1*x),i1,0,inf)
sage: var('k x');
sage: assume(k+1>0);
sage: sum(integrate(x^2*exp(-x)*(-1)^k*exp(-(k*x)),x,0,oo),k,0,oo)
3/2*zeta(3)

more

This method works for higher powers of x Wolfram alpha does not allow for x^n, n>4

( 2013-01-22 00:46:25 -0500 )edit

Thanks a lot! That works, but still don't understand why I have to expand the function in series and then intergrate it term by term. Also, do you know how this affects the speed. Naively I would think that summing would take a long time.

( 2013-01-22 09:13:29 -0500 )edit

Zeta is by definition the sum of a series, so this approach seems to be natural. I suspect that Mathematica uses a similar approach. As far as the speed is concerned: sage: timeit('numerical_integral(x^2/(exp(x)+1),0,oo)') 625 loops, best of 3: 1.36 ms per loop

( 2013-01-22 17:10:56 -0500 )edit