0
$\begingroup$

I am trying to integrate a function numerically and I get an error that I do not understand. The error is : 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.

How can I solve this error??

Clear[k1, mu1, k2, mu2, sop, cth, alpha, ro, lamdap, lamdae]; 
k1 = 1; mu1 = 1;k2 = 1; mu2 = 1;lamdap = 1; lamdae = 10;ro = 10^(5/10);cth = 1; alpha = 2^(2*cth);
sop = ParallelSum[ (((2*(((mu2*(1 + k2))^(mu1 - mu2 + q - w))*
      mu1*(1 + k1)^((mu1 + 1)/2)*
      mu2*(1 + k2)^((mu2 + 1)/
         2)*((2*mu1*Sqrt[k1*(1 + k1)])^(2*q + mu1 - 1))*((2*mu2*
          Sqrt[k2*(1 + k2)])^(2*w + mu2 - 1))))/((k1^((mu1 - 1)/
        2))*(k2^((mu2 - 1)/2))*Exp[k1*mu1]*Exp[k2*mu2]*
    Gamma[q + mu1]*Gamma[w + mu2]*Factorial[q]*
    Factorial[w]*2^(2*q + mu1 - 1)*2^(2*w + mu2 - 1))))*((lamdap*
   lamdae)/((-lamdap*alpha*ro) + (lamdae*(alpha - 1)))) *(1/(2*
   ro))*(1/ro^(mu1 + q - 
    1))*(((lamdap/(alpha - 1))^(-mu1 - q - 1)*
   NIntegrate[ 
    z^(-mu1 - q - 1)*
     MeijerG[{{mu1 - mu2 + q - w + 1, 
        1}, {}}, {{1 + mu1 + q}, {}}, {z*ro*
        lamdap/(mu1*mu2*(1 + k1)*(1 + k2)*(alpha - 1))}], {z, 1, 
     100}, Method -> "GlobalAdaptive", 
    MaxRecursion -> 
     100]) - (  (lamdae/(ro*alpha))^(-mu1 - q - 1)*  
   NIntegrate[ 
    z2^(-mu1 - q - 1)*
     MeijerG[{{mu1 - mu2 + q - w + 1, 
        1}, {}}, {{1 + mu1 + q}, {}}, {z2*ro*
        lamdae/(mu1*mu2*(1 + k1)*(1 + k2)*(alpha)*ro)}], {z2, 1, 
     100}, Method -> "GlobalAdaptive", 
    MaxRecursion -> 100]) ) , {w, 0.0000001, 10}, {q, 0.0000001, 10}]
$\endgroup$
  • $\begingroup$ NIntegrate::slwcon is not an error; it's a warning. Were there other messages indicating the approximation did not converge? $\endgroup$ – Michael E2 Mar 30 at 2:52
  • 2
    $\begingroup$ Also, MaxRecursion -> 100 suggests to me that it might take a long time to evaluate the integral. If it takes more than a few seconds, it would be polite to indicate how long we might have to wait. $\endgroup$ – Michael E2 Mar 30 at 2:53
  • $\begingroup$ The code kept running for more than 6 hours without any result! If it is not an error what can I do to speed the process? $\endgroup$ – deema tash Mar 30 at 17: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.