Ideal Bose gas in a box

μ/Tc as a function of T/Tc

Integrate[((Sqrt[x])/(Exp[x]-1)),{x,0,Infinity}]

N[(1/2) (Sqrt[π]) Zeta[(3/2)]]

Integrate[((Sqrt[x])/((1/z)*Exp[x]-1)),{x,0,Infinity}]

?PolyLog

g[α_,z_]=PolyLog[α,z];

{g[3/2,1],N[g[3/2,1]]}

f[z_]:=((PolyLog[(3/2),z])/(Zeta[(3/2)]))

f1[z_]:=((NIntegrate[((Sqrt[x])/((1/z)*Exp[x]-1)),{x,0,Infinity}])/(NIntegrate[((Sqrt[x])/(Exp[x]-1)),{x,0,Infinity}]))

{N[f[0.8]],N[g[3/2,0.8]/g[3/2,1]],f1[0.8]}

rhs[N_,μ_,t_]=(1/(Exp[-μ/t]-1))+N*t^(3/2)*((g[3/2,Exp[μ/t]])/(g[3/2,1]));

N[rhs[1,-1,1]]

Plot[{-100+rhs[100,μ,1]},{μ,-1,0}]

FindRoot[rhs[100,μ,1]==100,{μ,-0.001}]

FindRoot[rhs[100,μ,1]==100,{μ,-0.001}][[1,2]]

μsol[N_,t_]:=FindRoot[rhs[N,μ,t]==N,{μ,-0.001}][[1,2]]

μsol[100,1]

μsol[100,0.1]

Plot[{μsol[100,t],μsol[1000,t],μsol[4000,t]},{t,0.1,2}]

a=Table[{0.1+(2-0.1)*(i-1)/500,FortranForm[μsol[4000,0.1+(2-0.1)*(i-1)/500]]},{i,500}];

stout=OpenWrite["chempot_N4000.dat",FormatType->OutputForm];
Do[Write[stout,"  "<>ToString[N[a[[i]][[1]]]]<>"  "<>ToString[N[a[[i]][[2]]]]],{i,500}];
Close[stout];

n0[N_,t_]:=(1/N)*(1/(Exp[-μsol[N,t]/t]-1))

n0[100,0.1]

Plot[{n0[100,t],n0[1000,t],n0[4000,t],If[t<1,1-t^(3/2),0]},{t,0.01,2}]

a=Table[{0.01+(2-0.01)*(i-1)/500,FortranForm[1-n0[100,0.01+(2-0.01)*(i-1)/500]]},{i,500}];

stout=OpenWrite["nT_N100.dat",FormatType->OutputForm];
Do[Write[stout,"  "<>ToString[N[a[[i]][[1]]]]<>"  "<>ToString[N[a[[i]][[2]]]]],{i,500}];
Close[stout];

Ideal Bose gas in a harmonic trap

Gamma[3]

PolyLog[3,1]

N[Zeta[3]]

N[1/(Zeta[3])^(1/3)]