代码如下:
j1 = 1;
j2 = 0.5;
d1 = 0.3;
d2 = 0.4;
sa = 1/2;
sb = 1;
j3 = 1;
j4 = 0.5;
z = 4;
jz = 0;
r1 = 1/2 (Cos[x] + Cos[y]);
r2 = Cos[x]*Cos[y];
a = 2*(j1 - j2 + j2*r2 - j1*r1)*z*sa + d1*(2*sa - 1) + jz*sb;
b = 2*(j3 - j4 + j4*r2 - j3*r1)*z*sb + d2*(2*sb - 1) + jz*sa;
c = jz*Sqrt[sa*sb];
w1 = (a - b - Sqrt[(a + b)^2 - 4*c^2])/2;
w2 = (-a + b - Sqrt[(a + b)^2 - 4*c^2])/2;
q1 = 1/(Exp[w1/t] - 1);
q2 = 1/(Exp[w2/t] - 1);
t = 0.2;
sa - sb + (1/(2*Pi)^2)*NIntegrate[q2 - q1, {x, -Pi, Pi}, {y, -Pi, Pi}]
1,改变jz的值,其他不变的情况下,除了jz=0,外,jz=0.01,0.2,0.5时都能计算出来。
2,我查看了相关帮助和提示,好像是有奇点之类的问题,需要排除奇点再计算,但不知如何排除,尝试用Exclusions,好像不行。
所以请问如何计算jz=0时该函数值?
PS:提示错误:NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small.
NIntegrate::inumri: The integrand -(1/(-1+E^(2.5 (-0.4+Times[<<2>>]+Times[<<2>>]))))+1/(-1+E^(2.5 (0.4 +4 Plus[<<3>>]-Power[<<2>>]))) has evaluated to Overflow, Indeterminate, or Infinity for all sampling points in the region with boundaries {{1.83736*10^-14,1.13446*10^-8},{2.35619,3.14159}}.
NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small.
NIntegrate::inumri: The integrand -(1/(-1+E^(2.5 (-0.4+Times[<<2>>]+Times[<<2>>]))))+1/(-1+E^(2.5 (0.4 +4 Plus[<<3>>]-Power[<<2>>]))) has evaluated to Overflow, Indeterminate, or Infinity for all sampling points in the region with boundaries {{1.83736*10^-14,1.13446*10^-8},{2.35619,3.14159}}.