function F_half=F_D_I(Aplus,t)
fun=@(x) (x.^(-1/2)./(exp(x-Aplus./t)+1))
F_half=integral(fun,0,inf,'ArrayValued',true,'RelTol',1e-4)
end
function FT=wint(Aplus,m,Q,hh,EF,n,KB,T)
t=KB.*T./EF
muu=t.*log(exp(1./t)-1)
Aplus=@(w)APM(muu,hh,w,EF,Q)
fun=@(w)4.*EF.*Q.^2./(pi.^2.*n.*m.*KB.*T.^3).*F_D_I(Aplus(w),t).^2./sinh(hh.*w./(2.*KB.*T)).^2
FT=integral(fun,0,inf,'ArrayValued',true,'RelTol',1e-4)
end
function phi1=potential(KF,Q,L,d,e,ep,qTF)
phi1=4*pi.*e.^2./ep.*G_12(KF,Q,L,d)./((1-2*qTF.*G_11(KF,Q,L)).*(1-2*qTF.*G_11(KF,Q,L))-4*qTF.^2.*G_12(KF,Q,L,d).^2)
end
function output=Main_drag(Aplus,m,Q,hh,EF,n,KB,T,KF,L,d,e,ep,qTF)
f=@(Q) 2.*KF.*Q.*potential(KF,Q,L,d,e,ep,qTF).^2.*wint(Aplus,Aminus,m,Q,hh,EF,n,KB,T)
output=integral(f,0,inf,'ArrayValued',true,'RelTol',1e-4)
end
X=Main_drag(Aplus,m,Q,hh,EF,n,KB,T,KF,L,d,e,ep,qTF)