0
$\begingroup$

I have a problem with numerical integration of this function:

function = 
  (Cos[kx] (6/5 + 2 Cos[kz]) +  2 Cos[kz] (6/5 + (I Sin[kx])/Sqrt[2])) / 
    ((496/25 + (48 Cos[kz])/5 +  48/5 Cos[kx] (2 + (6 Cos[kz])/5) - 
      36/25 Cos[2 kz] +  48/5 I Sqrt[2] Sin[kx])^(3/2));

NIntegrate[function, {kx, 0, 2 π}, {kz, 0, 2 π},  
  Exclusions -> (Denominator[function] == 0), 
  MinRecursion -> 2, 
  MaxRecursion -> 100, 
  AccuracyGoal -> 10, 
  PrecisionGoal -> 10, 
  MaxPoints -> 500000, 
  WorkingPrecision -> 30]

it gives me this error:

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 0.53526925420640569943007319700700198085548160409944705790923206744819749466536515-7.2044646992384345994673912539292596550305823592711091867857439782901606888780460*10^-8 I and 0.00010948331191737946009947107702980103692104300298343171246151388284720254573592601`80. for the integral and error estimates.

So is there a more efficient solution to my problem?

$\endgroup$
  • 1
    $\begingroup$ Your code does not evaluate. Please give the missing definitions of m, t, and γ. $\endgroup$ – m_goldberg Aug 29 '18 at 13:32
  • $\begingroup$ Hi, the integration has been revised. Thanks. $\endgroup$ – Steven Aug 30 '18 at 0:20
  • $\begingroup$ Why do you think the integral converges? It seems to have singularities that cause the integral to blow up. $\endgroup$ – Carl Woll Aug 30 '18 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.