Ask Your Question
0

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

asked 12 years ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

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)
Preview: (hide)
link

Comments

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

achrzesz gravatar imageachrzesz ( 12 years ago )

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 ( 12 years ago )

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 ( 12 years ago )

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: 12 years ago

Seen: 1,010 times

Last updated: Jan 22 '13