RuleBasedIntegration / Rubi

Rubi for Mathematica
http://rulebasedintegration.org
MIT License
225 stars 22 forks source link

Unexpected Result for `Int[Sqrt[1-x]/Sqrt[x], x]` #13

Closed rljacobson closed 5 years ago

rljacobson commented 5 years ago

The usual way to compute Integrate[Sqrt[1 - x]/Sqrt[x], x] is by substituting u=Sqrt[x], du=1/(xSqrt[x]) dx, reducing the integral to 2 Integrate[Sqrt[1 - u^2], u]. Both Mathematica and Rubi agree on the result of this second integral—it's a standard trig substitution integral and is found in most textbooks.

However, they disagree on the original integral:

In[11]:= Integrate[Sqrt[1-x]/Sqrt[x],x]
Out[11]= Sqrt[-(-1+x) x]+ArcSin[Sqrt[x]]

In[12]:= Int[Sqrt[1-x]/Sqrt[x],x]
Out[12]= Sqrt[1-x] Sqrt[x]-1/2 ArcSin[1-2 x]

Investigating Steps[Int[Sqrt[1 - x]/Sqrt[x], x]], I see that Rubi chooses a strange transformation in its first step which isn't exactly intuitive.

One can show the two results are equivalent, but it takes a bit of work. (Mathematica can show the derivative of the difference is zero but needs FullSimplify.)

It's not exactly a bug, but it's a surprising result given the form of the integral.

AlbertRich commented 5 years ago

I consider Rubi's antiderivative Sqrt[1-x] Sqrt[x]-1/2 ArcSin[1-2 x] superior to Mathematica's since

I don't consider a reduction rule that simply decrements an exponent to be "a strange transformation". It is equivalent to CRC integration formula #59b.