Skip to main content
5 of 7
deleted 72 characters in body
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375

No crash with versions 12.0 and 11.3 on Windows 7 x64. I've tried evaluating the code both in a fresh and non-fresh Kernel - the result is the same. I can only note that version 12.0 takes 68 seconds, while version 11.3 only 18 seconds for evaluating all the integrals. The result returned by version 12 for the last integral is mush shorter than of version 11.3, but for other integrals it has the same complexity. So the slowdown can't be justified by obtaining a simpler expression. I have reported this as a performance issue ([CASE:4332017]). Look at the timings below.

Timings and LeafCounts in a fresh kernel of version 12.0:

$Version
"12.0.0 for Microsoft Windows (64-bit) (April 6, 2019)"
ClearAll[x, a, b, c, e, d, f];
ReleaseHold[Hold[{Integrate[(1 + x^2)^3/(1 + x^2 + x^4)^(3/2), x],
    Integrate[(1 + x^2)^2/(1 + x^2 + x^4)^(3/2), x],
    Integrate[(1 + x^2)/(1 + x^2 + x^4)^(3/2), x],
    Integrate[(7 + 5*x^2)^3/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(7 + 5*x^2)^2/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(7 + 5*x^2)/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(2 + 3*x^2 + x^4)^(3/2)*(7 + 5*x^2)^3, x],
    Integrate[(2 + 3*x^2 + x^4)^(3/2)*(7 + 5*x^2)^2, x],
    Integrate[(2 + 3*x^2 + x^4)^(3/2)*(7 + 5*x^2), x],
    Integrate[(7 + 5*x^2)^4/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(7 + 5*x^2)^2/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(4 + 3*x^2 + x^4)^(3/2)*(7 + 5*x^2), x],
    Integrate[(d + e*x^2)*(a + b*x^2 + c*x^4)^(3/2)/(f*x)^(1/2), x]}] /. 
  i_Integrate :> Timing[LeafCount[i]]]
{{5.55364, 136}, {5.07003, 158}, {4.97643, 160}, {4.94523, 99}, {5.00763, 99}, {2.93282, 
  97}, {5.00763, 129}, {5.08563, 124}, {5.05443, 119}, {4.99203, 104}, {5.02323, 
  99}, {6.22444, 349}, {8.72046, 487}}
%[[All, 1]] // Total
68.5936

Timings and LeafCounts in a fresh kernel of version 11.3:

$Version
"11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)"
ClearAll[x, a, b, c, e, d, f];
ReleaseHold[Hold[{Integrate[(1 + x^2)^3/(1 + x^2 + x^4)^(3/2), x],
    Integrate[(1 + x^2)^2/(1 + x^2 + x^4)^(3/2), x],
    Integrate[(1 + x^2)/(1 + x^2 + x^4)^(3/2), x],
    Integrate[(7 + 5*x^2)^3/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(7 + 5*x^2)^2/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(7 + 5*x^2)/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(2 + 3*x^2 + x^4)^(3/2)*(7 + 5*x^2)^3, x],
    Integrate[(2 + 3*x^2 + x^4)^(3/2)*(7 + 5*x^2)^2, x],
    Integrate[(2 + 3*x^2 + x^4)^(3/2)*(7 + 5*x^2), x],
    Integrate[(7 + 5*x^2)^4/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(7 + 5*x^2)^2/(2 + 3*x^2 + x^4)^(3/2), x],
    Integrate[(4 + 3*x^2 + x^4)^(3/2)*(7 + 5*x^2), x],
    Integrate[(d + e*x^2)*(a + b*x^2 + c*x^4)^(3/2)/(f*x)^(1/2), x]}] /. 
  i_Integrate :> Timing[LeafCount[i]]]
{{0.811205, 136}, {0.639604, 158}, {0.546004, 160}, {0.265202, 99}, {0.187201, 
  99}, {0.156001, 97}, {0.218401, 129}, {0.187201, 124}, {0.171601, 119}, {0.202801, 
  104}, {0.0780005, 99}, {2.02801, 349}, {12.7765, 3656}}
%[[All, 1]] // Total
18.2677

I suspect that the performance degradation isn't related to the minor improvement in the algorithm if Integrate, but reflects some quite general bug of version 12.0. For example, FindMinimum also has twentyfold performance degradation in version 12.0 (in addition to the Kernel hang-up) as compared to 11.3:

There already was similar (but more subtle) problem with FindMinimum on transition from version 8 to version 9:

Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375