Some indefinite integrals evaluate in 11.2 but not in 11.3 - what can be done?
Using Rubi in Mathematica 11.3.0
While the issue clearly is to be resolved eventually by WRI, a solution to the problem of obtaining symbolic solutions to indefinite integrals may be to use Rubi which is short for Rule-based Mathematics - Symbolic Integration Rules by Albert D. Rich. It is written in the Wolfram Language and can be easily used via a Notebook in 11.3.0.
After downloading the zip-file and extracting it into a directory of choice, there is a notebook called Rubi4.14.nb
. Setting the parameter $LoadShowSteps = False;
in the notebook to supress showing intermediate steps (for now), we can do:
Int[ Log[x^2 + Sqrt[1 - x^2]], x ]
-2 x-ArcSin[x]-Sqrt[1/10 (1+Sqrt[5])] ArcTan[Sqrt[2/(1+Sqrt[5])] x]+2 Sqrt[1/5 (2+Sqrt[5])] ArcTan[Sqrt[2/(1+Sqrt[5])] x]-Sqrt[1/10 (1+Sqrt[5])] ArcTan[(Sqrt[1/2 (1+Sqrt[5])] x)/Sqrt[1-x^2]]+2 Sqrt[1/5 (2+Sqrt[5])] ArcTan[(Sqrt[1/2 (1+Sqrt[5])] x)/Sqrt[1-x^2]]+2 Sqrt[1/5 (-2+Sqrt[5])] ArcTanh[Sqrt[2/(-1+Sqrt[5])] x]+Sqrt[1/10 (-1+Sqrt[5])] ArcTanh[Sqrt[2/(-1+Sqrt[5])] x]-2 Sqrt[1/5 (-2+Sqrt[5])] ArcTanh[(Sqrt[1/2 (-1+Sqrt[5])] x)/Sqrt[1-x^2]]-Sqrt[1/10 (-1+Sqrt[5])] ArcTanh[(Sqrt[1/2 (-1+Sqrt[5])] x)/Sqrt[1-x^2]]+x Log[x^2+Sqrt[1-x^2]]
In the same vein one can tackle the other integrals: Using the Rubi-notebook and its Int
command each of Nasser's integrals can be integrated in Mathematica 11.3.0.
Optimal Antiderivatives?
Rather interesting is the comparison of results for the antiderivatives obtained using Mathematica 11.2.0 and Mathematica 11.3.0 using Rubi.
$Version
Integrate[(1 + x^2)/((1 - x^2)*Sqrt[1 + x^2 + x^4]), x] // FullSimplify // TraditionalForm
11.2.0 for Microsoft Windows (64-bit) (September 11, 2017)
$Version
Int[(1 + x^2)/((1 - x^2)*Sqrt[1 + x^2 + x^4]), x] // TraditionalForm
11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)
The third integral will be an even more striking comparison: The output given by Mathematica 11.2.0 is rather too large to print (FullSimplify
will take "forever") while the result obtained using Rubi fits neatly into a single line (appearing almost immediately):
11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)
So let's wait for the Mathematicians about the validity of the results. But if the results obtained fast and neat using Rubi's rules of integration are valid, then we may see some truth in this classical verdict:
"Only the best is good enough." - Voltaire
References
- David Jeffrey and Albert D. Rich (2016). Developments in RUBI: Rule-based integration. Presentation.
- Albert D. Rich and David J. Jeffrey (2015?). A knowledge repository for indefinite integration based on transformation rules. Workingpaper.
- Albert D. Rich and David J. Jeffrey (2010). Reducing expression size using rule-based integration. Workingpaper.
- David J. Jeffrey, Albert D. Rich, and Junrui Hu (2015). RUBI and integration as term re-writing. ACM Communications in Computer Algebra. 49. 34-34. 10.1145/2768577.2768649.
Too long for a comment:
It seems that V11.2 was slightly wrong about the first integral. I think an antiderivative ought to be differentiable, hence continuous, at least over the connected components of the domain of a continuous function. It seems the real part of the integral is a correct real integral, but strictly speaking Re[ad]
is not differentiable. Better branch checking might make the V11.2 answer be rejected in V11.3, but that's just a guess.
Plot[Log[x^2 + Sqrt[1 - x^2]], {x, 0, 1}, PlotLabel -> Row[{"Version ", $Version}]]
ad = Integrate[Log[x^2 + Sqrt[1 - x^2]], x];
Plot[Evaluate@ReIm@ad, {x, 0, 1}, PlotLabel -> Row[{"Version ", $Version}]]
The discontinuity is at x == Sqrt[1/GoldenRatio]
ad /. x -> (Sqrt[1/GoldenRatio] - $MachineEpsilon)
ad /. x -> (Sqrt[1/GoldenRatio] + 0.)
ad /. x -> (Sqrt[1/GoldenRatio] + $MachineEpsilon)
ad /. x -> (Sqrt[1/GoldenRatio]) // FullSimplify
(*
-1.99674 + 1.23488 I
Indeterminate
-1.83736 - 1.23488 I
Indeterminate
*)
There is a branch cut on the real axis for x > 1
, but I do not see how this justifies the discontinuity in the integral far away from x == 1
("far away" = separated by open disks):
Plot3D[ReIm@Log[x^2 + Sqrt[1 - x^2]] /. x -> z + I y // Evaluate,
{z, -0.1, 1.1}, {y, -1/2, 1/2},
PlotLabel -> Row[{"Version ", $Version}], AxesLabel -> Automatic]
I haven't check these integrals myself, but we did fix some bugs related to branch cuts where indeed incorrect answers were produced. My guess is that some of these indeed had subtle issues, and others were probably collateral damage where potentially problematic branch cut issues were avoided.