6
$\begingroup$

I want to obtain value of following integral to a high precision (say 30 digits),

NIntegrate[DawsonF[Sqrt[t]]^2/t, {t, 0, Infinity}]

Graph of integrand looks like this: enter image description here. There is no singularity whatsoever. When $t$ is large, integrand is of order $O(1/t^2)$, so the integral converge.


However, Mathematica seems unable to evaluate it to high precision. In version 14.1, it raises error when WorkingPrecision is over 30, even complains the integrand is not numeric. enter image description here

Maple on other hand, can do this smoothly: NIntegrate[DawsonF[Sqrt[t]]^2/t, {t, 0, Infinity},
WorkingPrecision -> 30]


Is this a bug of NIntegrate? Any idea or suggestion is welcomed.

$\endgroup$
2
  • $\begingroup$ There might be some other options needed. But if you evaluate it exactly, then using N[exact,80] now it gives same result as Maple with no problems. i.sstatic.net/K6nIL7Gy.png 0.91596559417721901505460351493238411077414937428167213426649811962176301977625477 $\endgroup$
    – Nasser
    Commented 21 hours ago
  • 1
    $\begingroup$ @Nasser Thank you for the comment. Actually my real problems are more complicated integrals involving DawsonF that Integrate cannot solve exactly (e.g. replace square by cube, 4th power etc). The above is a toy example to illustrate the problem I encountered when using NIntegrate on them. $\endgroup$
    – pisco
    Commented 21 hours ago

1 Answer 1

6
$\begingroup$

Using @CarlWoll's answer to Terrible accuracy of DawsonF (which Q&A makes one suspect at least part of the problem is with DawsonF[]):

(*https://mathematica.stackexchange.com/a/182691*)
dawsonF[x_] := -(I/2) E^-x^2 Sqrt[\[Pi]] + I HermiteH[-1, I x]

NIntegrate[dawsonF[Sqrt[t]]^2/t, {t, 0, Infinity}, 
  WorkingPrecision -> 160, MaxRecursion -> 20] // N[#, 80] &
(*
0.91596559417721901505460351493238411077414937428167213426649811962176301977625477
*)
$\endgroup$

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.