RuleBasedIntegration / JOSS-Publication

Text-sources for the publication of Rubi in the Journal of Open-Source Software
MIT License
4 stars 0 forks source link

Unusual Result for `Int[Sqrt[1-x]/Sqrt[x], x]` #5

Closed rljacobson closed 5 years ago

rljacobson commented 5 years ago

This is just an observational comment, not an issue that needs fixing.

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.

rljacobson commented 5 years ago

Sorry, I should have posted this to the Rubi repo.