<<"MCAddOns/NewFrame.m"

DROOT=NotebookDirectory[];

tcv=({1,1/8.3144621}*#&)/@Drop[Import[DROOT<>"diamond-cv.csv","Table"],1]

einst[te_,t_]:=(((te^2) ((Csch[(te/(2 t))])^2))/(4 (t^2)))

debye[td_,t_]:=3^2/td^3 NIntegrate[einst[te,t] te^2,{te,0,td}]

pp=Show[ListPlot[tcv,PlotStyle->Black],Plot[3,{t,0,1200},PlotStyle->Directive[Thick,Red]],
Plot[3einst[1300,t],{t,0,1200},PlotStyle->Directive[Thick,Blue]],(*
Plot[debye[1800,t],{t,0,1200}],*)
PlotRange->{-0.02,3.1}]

fp=FramedGraphics[pp,FrameLabel->{"T [K]","(Subscript[c, V])/(Subscript[k, B])"},ImageSize->4*72]

Export[DROOT<>"diamond-einstein.pdf",fp,"PDF"]

lp=Show[ListPlot[Log[10.,tcv],PlotStyle->Black],Plot[Log[10.,3],{t,1,3.2},PlotStyle->Directive[Thick,Red]],
Plot[Log[10.,3einst[1300,10^t]],{t,1,3.2},PlotStyle->Directive[Thick,Blue]],
Plot[Log[10.,debye[1900,10^t]],{t,1,3.2},PlotStyle->Directive[Thick,RGBColor[0,0.5,0]]],
PlotRange->{Log[10.,0.0002],0.6}]

flp=FramedGraphics[lp,FrameLabel->{"T [K]","(Subscript[c, V])/(Subscript[k, B])"},FrameTicks->LogarithmTicks,ImageSize->4*72]

Export[DROOT<>"diamond-ldebye.pdf",flp,"PDF"]

debye[1,1000]

Series[(t1^2) ((Csch[(t1/(2 t))])^2),{t1,0,4}]

Integrate[(((t1^2) ((Csch[(t1/(2 t))])^2))/(4 (t^2))) t1^2,{t1,0,td},Assumptions->{t>0,td>0}]

Plot[(4/15) (π^4) (t^3)+4 (td^3) Log[-1+(E^(td/t))]-((td^4)/(2 t))/.td->1200,{t,0,1200},PlotRange->All]

nn=Integrate[1/(1+Exp[k^2-mu]) k^2 ,{k,0,Infinity}]

FullSimplify[h^2/(10 m Pi^2) kf^5/.kf->(3Pi^2ρ)^(1/3)]

D[1/(1+Exp[x]),x]/.x->βx

Integrate[x((E^(x β))/(((1+(E^(x β))))^2)),{x,0,Infinity},Assumptions->β>0]

Solve[nn==myn,mu]

InverseFunction[PolyLog[3/2,#]&]