i'm doing something called Sommerfeld expansion i got somehelp online source i will show after code. Sommerfeld expansion to integrate Fermi-Dirac equation to find total number of particles N for energy i define to be x.

The problem is sometimes either of my integral eq1 or eq2 dosn't work! i need them to be evaluated. can someone help please! Thanks in advance.

Here is the code


f[x_] := 1/(Exp[(x - u)/(k*t)] + 1);

h[x] = -D[f[x], x]; 

g1 = Normal[Series[g[x], {x, u, 7}]]; 
g2 = Normal[Series[g[x], {x, u, 10}]]; 
g3 = g2 - g1; 
G1 = Simplify[g1*h[x] /. {x -> u + k*t*y}]; 
G2 = Simplify[g3*h[x] /. {x -> u + k*t*y}]; 

eq1 = Simplify[k*t*Integrate[G1, {y, -Infinity, Infinity}, 
     Assumptions -> {k > 0, t > 0}]]

eq2 = Simplify[k*t*Integrate[G2, {y, -Infinity, Infinity}, 
     Assumptions -> {k > 0, t > 0}]]

f1 = PowerExpand[eq1 + eq2]

I just did the same! but no result!? the result should be given as in last lines here enter image description here

  • $\begingroup$ You're taking the Series expansion of g, which is undefined in your code. Is this intended, or is g actually supposed to be f? $\endgroup$ – march Apr 9 '19 at 20:18
  • $\begingroup$ it's defined both g 1 and g 2 , f is something else in the beginning $\endgroup$ – Medo Apr 9 '19 at 20:19
  • $\begingroup$ i edited and added some source code picture look at it $\endgroup$ – Medo Apr 9 '19 at 20:21
  • $\begingroup$ I'm not sure why Mathematica is able to compute the first integral in one case but not another, but here's one thing you can do to ensure that it computes the integral. In the definition of eq1, do Integrate[#, {y, -Infinity, Infinity}, Assumptions -> {k > 0, t > 0}] & /@ Expand@G1 instead of Integrate[G1, {y, -Infinity, Infinity}, Assumptions -> {k > 0, t > 0}]. $\endgroup$ – march Apr 9 '19 at 20:29
  • $\begingroup$ that's smart solved the problem $\endgroup$ – Medo Apr 9 '19 at 20:34

I'm not sure why the integral isn't computing. Here's a fix:


Integrate[#, {y, -Infinity, Infinity}, Assumptions -> {k > 0, t > 0}] & /@ Expand@G1
(* g[u]/(k t)+1/6 k π^2 t (g^′′)[u]+7/360 k^3 π^4 t^3 (g^(4))[u]+(31 k^5 π^6 t^5 (g^(6))[u])/15120 *)

This expands the function first, then integrates each term separately.

It also doesn't help to Expand the integrand first, which is strange, since I figured that the symbolic pre-processing that Mathematica does would include using the linearity of the integral. (Although, I guess Mathematica can't assume this since there are some integrands for which the integral of each term diverges where the integral of the sum of the integrands does.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.