Ask Your Question
3

Analytical evaluation of Fermi-Dirac integrals

asked 2019-02-27 14:55:41 +0100

updated 2019-02-27 18:25:47 +0100

It seems that sagemath is unable to calculate Fermic-Dirac type integrals, e. g.

integrate(x^2/(1+ e^x),x,0,oo) =>
limit(1/3*x^3 - x^2*log(e^x + 1) - 2*x*dilog(-e^x) + 2*polylog(3, -e^x), x, +Infinity, minus) + 3/2*zeta(3)

integrate(x^3/(1+ e^x),x,0,oo)==>
-7/120*pi^4 + limit(1/4*x^4 - x^3*log(e^x + 1) - 3*x^2*dilog(-e^x) + 6*x*polylog(3, -e^x) - 6*polylog(4, -e^x), x, 
+Infinity, minus)

Normally, the former evaluates to (3Zeta[3])/2 and the latter to (7Pi^4)/120, using Mathematica.

edit retag flag offensive close merge delete

Comments

1

A salty answer to another question about these integrals contains references for the symbolic evaluation. Sage (by default) uses Maxima for the evaluation of the integral, so maybe it is a good idea to implement those methods in Maxima.

rburing gravatar imagerburing ( 2019-02-27 21:15:21 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-02-28 23:49:04 +0100

Emmanuel Charpentier gravatar image

Maxima (i.e. Sage) is perfectly able to find a primitive of your function,. For your second example, it gives :

sage: f(x)=x^2/(1+e^x)
sage: f(x).integrate(x)
sage: g(x)=f(x).integrate(x)
sage: g
x |--> 1/3*x^3 - x^2*log(e^x + 1) - 2*x*dilog(-e^x) + 2*polylog(3, -e^x)

This can be easily checked:

sage: g(x).diff(x).factor()
x^2/(e^x + 1)

Sage can find the limit at x=0...

sage: g(x).limit(x=0)
-3/2*zeta(3)

... but not at x=$\infty$:

sage: g(x).limit(x=oo)
limit(1/3*x^3 - x^2*log(e^x + 1) - 2*x*dilog(-e^x) + 2*polylog(3, -e^x), x, +Infinity)

Mathematica agrees with Sage for x=0...

sage: mathematica("Limit[x^3/3-x^2*Log[1+Exp[x]]-2*x*PolyLog[2,-Exp[x]]+2*PolyLo
....: g[3,-Exp[x]],x->0]")
(-3*Zeta[3])/2

And gives an answer for x=$\infty$:

sage: mathematica("Limit[x^3/3-x^2*Log[1+Exp[x]]-2*x*PolyLog[2,-Exp[x]]+2*PolyLo
....: g[3,-Exp[x]],x->Infinity]")
0

A quick numeric check (by comparison to numerical integration) lets us think that Mathamatica's answer is reasonable:

sage: numerical_integral(f(x),0,oo):
(1.8030853547394121, 5.780826801595601e-08)
sage: g(x).limit(x=0).n()
-1.80308535473939

Therefore, this is a bug. I'll check if this is already reported...

BTW, Sympy gives a wrong answer here :

sage: g(x).limit(x=oo, algorithm="sympy")
-Infinity

...but fails to find a primitive anyway:

sage: f(x).integrate(x, algorithm="sympy")
integrate(x^2/(e^x + 1), x)
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-02-27 14:55:41 +0100

Seen: 441 times

Last updated: Feb 28 '19