I'm trying to calculate the finite part of a divergent integral numerically, but as I bring the regulator down to $0$, Mathematica starts throwing an error.
ν = 1/3;
α = 1/100;
z = 1;
ϵ = 1/200000000000000;
NIntegrate[
BesselK[1, Sqrt[(x^2 + z^2)]]/
Sqrt[(x^2 + z^2)] x (Cosh[(1 - ϵ) x]),
{x, 0, ∞},
MaxRecursion -> 20, WorkingPrecision -> 40
]
NIntegrate::inumri: "The integrand (x\BesselK[1,Sqrt[1+x^2]]\Cosh[(199999999999999 x)/200000000000000])/Sqrt[1+x^2] has evaluated to Overflow, Indeterminate, or Infinity for all sampling points in the region with boundaries {{0.*10^-20,3.6700530551513758066*10^28}}."
I fully expect the answer to get arbitrarily large and I will have to subtract a counterbalancing large number (which I've already calculated) so the precision may be bad, but I don't understand where this error is coming from.
Why am I getting this error for a smooth function?