1

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

yohbs
  • 7,046
  • 3
  • 29
  • 60
charlz_bro
  • 11
  • 3
  • 1
    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. – SPPearce Jun 15 '17 at 15:13
  • 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? – charlz_bro Jun 15 '17 at 16:06
  • 1
    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. – MikeY Jun 15 '17 at 16:54
  • for \phi=0 i am getting the required result. for other \phi's the result obtained are not matching – charlz_bro Jun 15 '17 at 17:04
  • 2
    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. – Bob Hanlon Jun 15 '17 at 17:28
  • Now I am not getting the error messages. So I can be confident that the this answer is right. – charlz_bro Jun 15 '17 at 19:36
  • But when I increase precision goal the error comes back again – charlz_bro Jun 16 '17 at 17:36

0 Answers0