1
$\begingroup$

A simple integration of a modified Bessel function gives:

In[106]:= tt[yIn_]:=(9 Sqrt[3]/8 Pi) Integrate[BesselK[5/3,yi],{yi,yIn,Infinity},Assumptions->{yi>0,yIn>0}]
In[109]:= tt[100.0]
Out[109]= -6.430605433593966*10^27

The result should be small and positive as shown if I use NIntegrate:

In[110]:= (9 Sqrt[3]/8 Pi) NIntegrate[BesselK[5/3, yi], {yi, 100.0, Infinity}]
Out[110]= 2.875666186745843*10^-44

How can I get the Integrate value to behave as I would expect like NIntegrate?

$\endgroup$
  • 1
    $\begingroup$ you use a very rough number 100.0, check 100.0`100. you will get the same result 4.69759*10^-45 $\endgroup$ – Alex Trounev Aug 5 '18 at 5:17
  • $\begingroup$ Multiply by constant (9 Sqrt[3]/8 Pi) of course $\endgroup$ – Alex Trounev Aug 5 '18 at 5:44
  • $\begingroup$ I tried converting your integral to a Meijer $G$ representation, but even that was numerically unstable to evaluate. Interesting... $\endgroup$ – J. M. will be back soon Oct 2 '18 at 12:10
4
$\begingroup$

You can actually solve your integral symbolically:

Block[{yIn},
 (tt[yIn_] := (9 Sqrt[3]/8 Pi)*#) &[
  Integrate[BesselK[5/3, yi], {yi, yIn, Infinity}, 
   Assumptions -> yIn > 0]
  ]
 ]

and tt[100] gives an expression with special functions that seem to be problematic numerically

Mathematica graphics

However, now you can simply do

tt[100`100]

(* 2.875666186580*10^-44 + 0.*10^-73 I *)

So the problem is not Integrate but the numerical evaluation of the result.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.