(* This Mathematica file is written by Raj Srivastava 
and submitted as a suppliment file for the dissertation

Title "EXTRACTION OF SPIN POLARIZATION OF BULK AND MEASUREMENT OF TRANSPORT
PROPERTIES OF THIN GdXSi1-X NEAR THE METAL-INSULATOR TRANSITION"   *)
(* Constants *)
k=0.0862 
T=0.35 (* Temperature *)
β=1/(k*T)
μ=0.1157
H=2.5 (* Magnetic Field in T *)
Δ=0.29 (* Gap *)
bound=2.04 (* Integration limit *)
$IterationLimit=8192

a=0.86 (* Aplha *)
x=0.5 (* Fraction of electron population undergo Zeeman Shift *)

u=Function[{ζ,α},(1/6) (3 ζ+(Sqrt[3]) √(2-2 (α^2)+(ζ^2)+(((-1+(α^2)+(ζ^2)))^2)/(((-1+(α^6)+3 (ζ^2)-3 (ζ^4)+(ζ^6)+3 (α^4) (-1+(ζ^2))+3 (α^2) (1+16 (ζ^2)+(ζ^4))+6 (Sqrt[3]) √((α^2) (ζ^2) ((α^6)+3 (α^4) (-1+(ζ^2))+(((-1+(ζ^2)))^3)+3 (α^2) (1+7 (ζ^2)+(ζ^4))))))^(1/3))+(((-1+(α^6)+3 (ζ^2)-3 (ζ^4)+(ζ^6)+3 (α^4) (-1+(ζ^2))+3 (α^2) (1+16 (ζ^2)+(ζ^4))+6 (Sqrt[3]) √((α^2) (ζ^2) ((α^6)+3 (α^4) (-1+(ζ^2))+(((-1+(ζ^2)))^3)+3 (α^2) (1+7 (ζ^2)+(ζ^4))))))^(1/3)))-(Sqrt[3]) √(4-4 (α^2)+2 (ζ^2)-(((-1+(α^2)+(ζ^2)))^2)/(((-1+(α^6)+3 (ζ^2)-3 (ζ^4)+(ζ^6)+3 (α^4) (-1+(ζ^2))+3 (α^2) (1+16 (ζ^2)+(ζ^4))+6 (Sqrt[3]) √((α^2) (ζ^2) ((α^6)+3 (α^4) (-1+(ζ^2))+(((-1+(ζ^2)))^3)+3 (α^2) (1+7 (ζ^2)+(ζ^4))))))^(1/3))-(((-1+(α^6)+3 (ζ^2)-3 (ζ^4)+(ζ^6)+3 (α^4) (-1+(ζ^2))+3 (α^2) (1+16 (ζ^2)+(ζ^4))+6 (Sqrt[3]) √((α^2) (ζ^2) ((α^6)+3 (α^4) (-1+(ζ^2))+(((-1+(ζ^2)))^3)+3 (α^2) (1+7 (ζ^2)+(ζ^4))))))^(1/3))-(6 (Sqrt[3]) (1+(α^2)) ζ)/(√(2-2 (α^2)+(ζ^2)+(((-1+(α^2)+(ζ^2)))^2)/(((-1+(α^6)+3 (ζ^2)-3 (ζ^4)+(ζ^6)+3 (α^4) (-1+(ζ^2))+3 (α^2) (1+16 (ζ^2)+(ζ^4))+6 (Sqrt[3]) √((α^2) (ζ^2) ((α^6)+3 (α^4) (-1+(ζ^2))+(((-1+(ζ^2)))^3)+3 (α^2) (1+7 (ζ^2)+(ζ^4))))))^(1/3))+(((-1+(α^6)+3 (ζ^2)-3 (ζ^4)+(ζ^6)+3 (α^4) (-1+(ζ^2))+3 (α^2) (1+16 (ζ^2)+(ζ^4))+6 (Sqrt[3]) √((α^2) (ζ^2) ((α^6)+3 (α^4) (-1+(ζ^2))+(((-1+(ζ^2)))^3)+3 (α^2) (1+7 (ζ^2)+(ζ^4))))))^(1/3))))))](* Analytical Solution *)

v=Function[{ζ,α},Re[u[ζ,α]/(((u[ζ,α]*u[ζ,α]-1))^(1/2))]] (* AG  Density of State*)
c=1/Δ (* Scaling factor for plotting graph *)

p=0.3 (* Polarization *)
lst6=Table[{V,(1-p)*x/2*Re[NIntegrate[(v[Abs[ϵ+μ*H/2]*c,a]*(β *1/(2+2Cosh[β*(ϵ+V)]))),{ϵ,-bound,bound}]]+(1+p)*x/2*Re[NIntegrate[(v[Abs[ϵ-μ*H/2]*c,a]*(β *1/(2+2Cosh[β*(ϵ+V)]))),{ϵ,-bound,bound}]]+(1-x)*Re[NIntegrate[(v[Abs[ϵ]*c,a]*(β *1/(2+2Cosh[β*(ϵ+V)]))),{ϵ,-bound,bound}]]},{V,-1.04,1.04,0.02}]
(* Integration*)