0
$\begingroup$

I am trying to evaluate the following integral for which the actual result is -4.4(as per information i got) but what i get is -2.15.

ClearAll[t]
{r = 4.087, a = 1.205, b = 0.3812, Z = 0, A = 345.0527, B = 606741.04395, \ [Phi] = Pi/3}; 
KK[n_] := r*NIntegrate[1/((t*Sin[ϕ])^2 + r^2 + (t*Cos[ϕ] + Z - z)^2 - 2*r*t*Sin[ϕ]*Cos[η])^n, 
 {η, 0, 2*Pi}, {z, 0, Infinity}, {t, -1.66, 1.66}, WorkingPrecision -> 50, PrecisionGoal -> 6]; 
a*b*((-A)*KK[3] + B*KK[6])

NIntegrate::precw: The precision of the argument function (1/(16.7036+<<4>>)^3) is less than WorkingPrecision (50.`). >>

NIntegrate::precw: The precision of the argument function (1/(16.7036+<<4>>)^6) is less than WorkingPrecision (50.`). >>

-2.15814

$\endgroup$
  • 1
    $\begingroup$ Why do you think it should be -4.4? You are using imprecise numbers, including in your t integration limits, and then trying to use 50 digits of Precision. If you use {t,-5/3,5/3} in your limits and remove the WorkingPrecision/PrecisionGoal options then you get -2.10005 without errors. $\endgroup$ – KraZug Jun 15 '17 at 15:13
  • $\begingroup$ But the answer should be -4.4 as per the source from which I took this problem. Can i proceed with the answer -2.10005. I have no much experience of numerical integration using MMA. Why such error pop up when trying to increasing precision or accuracy? $\endgroup$ – charlz_bro Jun 15 '17 at 16:06
  • 1
    $\begingroup$ Big difference between -4.4 and -2.1, to the point that if fiddling with working precision and other terms brought the integral from one value to the other, I'd question the result. $\endgroup$ – MikeY Jun 15 '17 at 16:54
  • $\begingroup$ for \phi=0 i am getting the required result. for other \phi's the result obtained are not matching $\endgroup$ – charlz_bro Jun 15 '17 at 17:04
  • 1
    $\begingroup$ To avoid precision conflicts define your constants with {r, a, b, Z, A, B, \[Phi]} = {4.087, 1.205, 0.3812, 0, 345.0527, 606741.04395, Pi/3} // Rationalize[#, 0] &. Also as suggested by @KraZug change your limits of integration to exact numbers or Rationalize them. $\endgroup$ – Bob Hanlon Jun 15 '17 at 17:28

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.