integral( x / (exp(x) - 1) , (x,0,oo)).n()
I get
TypeError: cannot evaluate symbolic expression numerically
The answer (according to mathematica) should be pi^2 / 6
Is something wrong with my code?
Thanks!
On Dec 10, 8:19 pm, Renan Birck Pinheiro <renan.ee.u...@gmail.com>
wrote:
> 2011/12/10 andres.ordonez <andres.felipe.ordo...@gmail.com>
>
> > Hi, I'm having trouble evaluating this integral
>
> > integral( x / (exp(x) - 1) , (x,0,oo)).n()
>
> > I get
>
> > TypeError: cannot evaluate symbolic expression numerically
>
> > The answer (according to mathematica) should be pi^2 / 6
>
> > Is something wrong with my code?
>
> > Thanks!
>
> Apparently it stumbles upon a limit which Maxima is incapable of doing.
>
> sage: integrate(x/(exp(x)-1),(x,0,oo))
> -1/6*pi^2 + limit(-1/2*x^2 + x*log(-e^x + 1) + polylog(2, e^x), x,
> +Infinity)
>
> if oo is replaced by a very large number, seems to work...
>
> sage: (real_part(integrate(x/(exp(x)-1),(x,0,1000)).n()) - (pi^2/6)).n()
> -4.41002789841605e-11
>
> --
> Renan Birck Pinheiro - Grupo de Microeletrônica
> <http://www.ufsm.br/gmicro>- Engenharia
> Elétrica <http://www.ufsm.br/cee>/UFSM <http://www.ufsm.br>
>
> http://renanbirck.blogspot.com/ skype: renan.ee.ufsm
On Dec 11, 6:45 pm, "andres.ordonez" <andres.felipe.ordo...@gmail.com>
wrote:
Using the geometric series one can obtain
x/(e^x-1)=xe^(-x)/(1-e^(-x))=\sum_0^\infty x(e^(-(k+1)x)
Integrating term by term
sage: var('k x')
sage: maxima('assume(k>-1)')
[k>-1]
sage: maxima('integrate(x*exp(-(k+1)*x),x,0,inf)')
1/(k+1)^2
one can obtain the exact integral
sage: sum(1/k^2,k,1,oo)
1/6*pi^2
Andrzej Chrzeszczyk
Maxima knows the expansion:
sage: maxima('powerseries(x*exp(-x)/(1-exp(-x)),exp(-x),0)')
x*%e^-x*'sum(%e^-(i1*x),i1,0,inf)
Andrzej Chrzeszczyk
I opened a ticket for this, so it doesn't get forgotten: