# Integral of modified Bessel function is wrong

A simple integration of a modified Bessel function gives:

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


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

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


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

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

You can actually solve your integral symbolically:

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


and tt gives an expression with special functions that seem to be problematic numerically However, now you can simply do

tt

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


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