Ask Your Question
0

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

asked 2013-01-21 15:32:45 +0100

Shashank gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-01-22 01:32:41 +0100

achrzesz gravatar image

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)
edit flag offensive delete link more

Comments

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

achrzesz gravatar imageachrzesz ( 2013-01-22 07:46:25 +0100 )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.

Shashank gravatar imageShashank ( 2013-01-22 16:13:29 +0100 )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

achrzesz gravatar imageachrzesz ( 2013-01-23 00:10:56 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-01-21 15:32:45 +0100

Seen: 987 times

Last updated: Jan 22 '13