如何克服数值积分中的奇点(在Matlab或Mathematica中)

时间:2011-08-16 13:20:37

标签: matlab wolfram-mathematica numerical-integration

我想以数字方式整合以下内容:

eq1

,其中

eq2

abβ是常量,为简单起见,这些常量都可以设置为1

使用dblquad的Matlab和使用NIntegrate的Mathematica都不能处理分母创建的奇点。由于它是双积分,我无法指定Mathematica中奇点的位置。

我确信它不是无限的,因为这个积分是基于扰动理论而没有

enter image description here

之前已被发现(只是没有被我发现所以我不知道它是如何完成的。)

有什么想法吗?

4 个答案:

答案 0 :(得分:9)

(1)如果您提供您使用的显式代码,将会很有帮助。这样其他人(读:我)不需要单独编码。

(2)如果积分存在,则必须为零。这是因为当你交换x和y时你否定了n(y)-n(x)因子,但保持其余部分相同。然而,集成范围对称意味着只需重命名变量,因此它必须保持不变。

(3)这里有一些代码表明它将为零,至少如果我们将奇异部分和它周围的一个小带清零。

a = 1;
b = 1;
beta = 1;
eps[x_] := 2*(a-b*Cos[x])
n[x_] := 1/(1+Exp[beta*eps[x]])
delta = .001;
pw[x_,y_] := Piecewise[{{1,Abs[Abs[x]-Abs[y]]>delta}}, 0]

我们在被积函数中加1,以避免结果接近于零的准确性问题。

NIntegrate[1+Cos[(x+y)/2]^2*(n[x]-n[y])/(eps[x]-eps[y])^2*pw[Cos[x],Cos[y]],
  {x,-Pi,Pi}, {y,-Pi,Pi}] / (4*Pi^2)

我得到以下结果。

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::eincr: 
   The global error of the strategy GlobalAdaptive has increased more than 
    2000 times. The global error is expected to decrease monotonically after a
     number of integrand evaluations. Suspect one of the following: the
     working precision is insufficient for the specified precision goal; the
     integrand is highly oscillatory or it is not a (piecewise) smooth
     function; or the true value of the integral is 0. Increasing the value of
     the GlobalAdaptive option MaxErrorIncreases might lead to a convergent
     numerical integration. NIntegrate obtained 39.4791 and 0.459541
     for the integral and error estimates.

Out[24]= 1.00002

这表明纯粹的结果将为零。

(4)用cx代替cos(x)和cy代替cos(y),并去除外来因子以进行收敛评估,给出下面的表达式。

((1 + E^(2*(1 - cx)))^(-1) - (1 + E^(2*(1 - cy)))^(-1))/
 (2*(1 - cx) - 2*(1 - cy))^2

cy中的一系列扩展,以cx为中心,表示1阶的极点。所以它看起来确实是一个奇异的积分。

Daniel Lichtblau

答案 1 :(得分:2)

积分看起来像Cauchy主值类型积分(即它具有强奇点)。这就是为什么你不能应用标准的正交技术。

您是否在Mathematica的集成中尝试过PrincipalValue-> True?

答案 2 :(得分:1)

除了丹尼尔关于在对称范围内积分奇数被积函数的观察(因此对称性表明结果应该为零),你也可以这样做以更好地理解它的收敛(我将使用乳胶,写出来笔和纸应该使它更容易阅读;写作花费的时间比做的要长很多,并不复杂):

首先,epsilon(x)-\epsilon(y)\propto\cos(y)-\cos(x)=2\sin(\xi_+)\sin(\xi_-)我定义了\xi_\pm=(x\pm y)/2(所以我用pi / 4旋转了轴)。然后,在\xi_+之间,\pi/\sqrt{2}-\pi/\sqrt{2}以及\xi_-之间的整合区域为\pm(\pi/\sqrt{2}-\xi_-)。然后,被积函数的形式为\frac{1}{\sin^2(\xi_-)\sin^2(\xi_+)}次,没有任何分歧。所以,显然,存在二阶极点,并且这不是如所呈现的那样收敛。

也许你可以通过电子邮件向那些用cos术语获得答案的人发电子邮件,并询问他们究竟是做了什么。也许正在采用物理正则化程序。或者你可以提供更多关于它的物理起源的信息(某种bosonic系统的某种二阶扰动理论?),如果这不是偏离主题的话......

答案 3 :(得分:1)

可能是我在这里遗漏了一些东西,但是被积函数 f [x,y] = Cos ^ 2 [(x + y)/ 2] *(n [x] -n [y])/(eps [x] -eps [y]),n [x] = 1 /(1 + Exp [Beta * eps [x]])和eps [x] = 2(ab * Cos [x])确实是x和y中的对称函数:f [x,-y] = f [ - 的x,y] = F [X,Y]。 因此,它在任何域[-u,u] x [-v,v]上的积分为零。这里似乎不需要数值积分。结果只是零。