0
$\begingroup$

I would like to compute this integral for a =100, ... ,1500

$$ \int_1^\infty \dfrac{\left(x^2-1\right)^{3/2}}{x} \,e^{-ax}\, dx $$

int[a_]:= Assuming[Re[a]>0,NIntegrate[((x^2-1)^(3/2)/x) Exp[SetPrecision[-a x,15]],{x,1,Infinity},WorkingPrecision->3,MaxRecursion->100]]

but from a=930 it gives 0

(*int[100]=1.26*10^-48 
... 
... 
... 
int[920]=1.18*10^-422
int[930]=0
... 
...
int[1500]=0*)

I know it's a precision issue but I can't fix it. Any ideas please!!

$\endgroup$
1
  • $\begingroup$ 1.18*10^-422 is not from real world. Art for art's sake. $\endgroup$
    – user64494
    Commented Jun 14, 2022 at 4:50

2 Answers 2

5
$\begingroup$

I am not sure why you limited your working precision to only 3, particularly since you mentioned yourself that the problem you observed is likely due to numerical precision, and your integral value is extremely small.

We can rewrite it as follows:

Clear[int]
int[a_] := NIntegrate[
  (x^2 - 1)^(3/2)/x Exp[-a x], {x, 1, Infinity},
  WorkingPrecision -> $MachinePrecision, AccuracyGoal -> 3
]

int[Range[900, 1500, 100]]

(* Out: 
{4.384839241338059*10^-399, 7.313941910468443*10^-443, 
 1.219970524013625*10^-486, 2.034919196352700*10^-530, 
 3.394259167886645*10^-574, 5.661647558012262*10^-618, 
 9.44366693457413*10^-662}
*)
$\endgroup$
1
  • $\begingroup$ thank you so much. $\endgroup$
    – Gallagher
    Commented Jun 19, 2022 at 9:03
7
$\begingroup$

Looking at the asymptotic form of the integral is instructive:

AsymptoticIntegrate[((x^2 - 1)^(3/2)/x) Exp[-a x], {x, 1, \[Infinity]}, {a, \[Infinity], 3}]

(* - (15 E^-a Sqrt[\[Pi]/2])/(8 a^(7/2)) + (3 E^-a Sqrt[\[Pi]/2])/a^(5/2) *)

The behavior of this integral will be dominated by the $e^{-a}$ behavior at large $a$. So let's define a new integral that is $e^a$ times the original:

newint[a_] := NIntegrate[((x^2 - 1)^(3/2)/x) Exp[a (1 - x)], {x, 1, Infinity}]]
newint[1500]

(* 4.31293*10^-8 *)

The original integral would then be $(4.31293 \times 10^{-8}) \cdot e^{-1500}$.

$\endgroup$
1
  • $\begingroup$ thank you so much. $\endgroup$
    – Gallagher
    Commented Jun 19, 2022 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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