8
$\begingroup$

Bug introduced in 12.0 or earlier and persisting through 14.0
CASE:4539809


I think there is a bug here:

In[1]:= Integrate[Abs[Cos[x^4]], {x, 0, Infinity}]

Out[1]= Cos[\[Pi]/8] Gamma[5/4]

In[2]:= Integrate[Cos[x^4], {x, 0, Infinity}]

Out[2]= Cos[\[Pi]/8] Gamma[5/4]

Maple finds the same answer (albeit not as simplified) for the latter, and no answer for the former. Obviously, the values can't be equal, so I'm rather confident there is indeed a bug.

It might be worth noting that with RealAbs, Mathematica leaves the integral unevaluated.

Mathematica 12.1.0 on Windows 10

$\endgroup$
15
  • 1
    $\begingroup$ @J.M. The difference of two positive numbers can't equal their sum. (the two positive numbers being here the integral of the positive part and the integral of the negative part of the integrand). $\endgroup$
    – user72309
    Commented Apr 27, 2020 at 10:52
  • 1
    $\begingroup$ Please do report it to Wolfram. $\endgroup$
    – Szabolcs
    Commented Apr 27, 2020 at 11:09
  • 2
    $\begingroup$ @Szabolcs Wolfram support CASE:4539809 $\endgroup$
    – user72309
    Commented Apr 27, 2020 at 11:35
  • 2
    $\begingroup$ I believe the first integral is divergent. Make the substitution $t=x^4$ and you get $\int|\cos t|/ (4t^{3/4}) \,dt$, which integrating up to $t=(N+{1\over2})\pi$, is greater than $\sum_{k=1}^N \pi^{-3/4}(k+{1\over2})^{-3/4}$ which diverges. $\endgroup$
    – Michael E2
    Commented Apr 27, 2020 at 12:31
  • 1
    $\begingroup$ While using RealAbs does not evaluate, using the equivalent Integrate[Sqrt[Cos[x^4]^2], {x, 0, Infinity}] gives the erroneous result. v12.1 $\endgroup$
    – Bob Hanlon
    Commented Apr 27, 2020 at 14:32

0

Your Answer

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