3
$\begingroup$

Why does Integrate get this wrong?

b = 2;

NIntegrate[E^(-x^2) HypergeometricU[-b/2, 1/2, x^2], {x, -Infinity, Infinity},
           AccuracyGoal -> 4]
(* -7.67473*10^-9 *)

Clear[b];

Integrate[E^(-x^2) HypergeometricU[-b/2, 1/2, x^2], {x, -Infinity, Infinity}]
(* ConditionalExpression[-(((-2 + b) Sqrt[π] Hypergeometric2F1[1, (1 - b)/2, 1/2, 1])/
                           Gamma[1 - b/2]), Re[b] > 0] *)

f[b_] := ConditionalExpression[-(((-2 + b) Sqrt[π]
                                  Hypergeometric2F1[1, (1 - b)/2, 1/2, 1])/
                                 Gamma[1 - b/2]), Re[b] > 0]

f[2]
(* Indeterminate *)
$\endgroup$
1
  • $\begingroup$ Have you submiited a bug report toWRI? $\endgroup$
    – user64494
    Sep 23, 2020 at 18:51

1 Answer 1

1
$\begingroup$

Mathematica is unable to determine the limit f[b] for b->2.

If you don't integrate to Infinity, but only up to a cutoff c you get

c = 10; Table[{NIntegrate[Exp[-x^2] HypergeometricU[-b/2, 1/2, x^2], {x, -c, c}],c MeijerG[{{1/2}, {(1 - b)/2}}, {{0, 1/2}, {-(1/2)}}, c^2]}, {b, 0,
3, 0.2}] // N

with good agreement.

$\endgroup$
6
  • $\begingroup$ Andreas, you are not right: Limit[-(((-2 + b) Sqrt[\[Pi]] Hypergeometric2F1[1, (1 - b)/2, 1/2, 1])/Gamma[1 - b/2]), b -> 2, Direction -> "FromAbove"] performs 0 and Limit[-(((-2 + b) Sqrt[\[Pi]] Hypergeometric2F1[1, (1 - b)/2, 1/2, 1])/Gamma[1 - b/2]), b -> 2, Direction -> "FromBelow"] produces ComplexInfinity. I think the result of Integrate is not correct. $\endgroup$
    – user64494
    Sep 23, 2020 at 18:48
  • $\begingroup$ Because the results from above and below are different the value f[2] is returned as 'indeterminate'. With the cutoff in the integration range one gets an analytic result (MeijerG) with reasonable accuracy. $\endgroup$
    – Andreas
    Sep 23, 2020 at 18:59
  • 1
    $\begingroup$ If you leave c symbolic and integrate, then take the (direction-free) limit as b->2, you get c*Exp[-c^2]. This of course vanishes as c->Infinity. $\endgroup$ Sep 23, 2020 at 23:16
  • $\begingroup$ I found the answer in Gradshteyn and Ryzhik 7th edition, formula 7.621.6. You have to change variables to transform to their integral. The answer to the Integrate[ ..] above is Sqrt[Pi]/Gamma[-b/2 + 1]. I think Mathematica gives an incorrect answer. $\endgroup$ Sep 25, 2020 at 19:54
  • $\begingroup$ If you evaluate the defining Series of the Hypergeometric2F1 function you get 1/(2-b) $\endgroup$
    – Andreas
    Sep 25, 2020 at 21:48

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.