RuleBasedIntegration / Rubi

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

Integration that MMA can do but Rubi Can't #24

Closed mariuszi28cg closed 4 years ago

mariuszi28cg commented 4 years ago

Rubi is not integrating,

Int[Sqrt[2 + Sqrt[2 + Sqrt[2 + 2*Cos[5*Sqrt[x] + 4]]]]*x^(-1/2), x]

but Mathematica 12.0 does.

MMA solution:

Integrate[Sqrt[2 + Sqrt[2 + Sqrt[2 + 2*Cos[5*Sqrt[x] + 4]]]]*x^(-1/2),
  x]==
-(8/5) Sqrt[2] Sqrt[1 + Cos[4 + 5 Sqrt[x]]] Sqrt[
 2 + Sqrt[2] Sqrt[1 + Cos[4 + 5 Sqrt[x]]]] (-2 + Sqrt[
   2 + Sqrt[2] Sqrt[1 + Cos[4 + 5 Sqrt[x]]]]) Sqrt[
 2 + Sqrt[2 + Sqrt[2] Sqrt[1 + Cos[4 + 5 Sqrt[x]]]]]
  Csc[4 + 5 Sqrt[x]]
AlbertRich commented 4 years ago

Sorry, Sqrt[2 + Sqrt[2 + Sqrt[2 + 2*Cos[5*Sqrt[x] + 4]]]]*x^(-1/2) is outside the domain of expressions Rubi is designed to integrate.

Albert

Anixx commented 4 years ago

But there should be a rule to do it if Mathematica can?

AlbertRich commented 4 years ago

There are infinitely many expressions Mathematica can integrate, but Rubi can't; and vice-versa. In order to keep the Rubi project at least theoretically finite in nature, my contributions to the project are limited to the rules required to produce optimal antiderivatives for members of the general forms of expressions I designed Rubi to integrate.

Unfortunately, the example in question is not a member of any of those forms. However, Rubi is an open source, freely available system. So I invite you to add to your copy of Rubi the rule(s) required to integrate such expressions.

Albert

Anixx commented 4 years ago

There are infinitely many expressions Mathematica can integrate,

Yes. But I doubt they have infinite number of rules. It is likely all their rules are published somewhere.

By the way, don't you want to make an option to fallback to the Mathematica's integrator if Rubi cannot do it?

AlbertRich commented 4 years ago

I think you would be hard-pressed to find where Wolfram Research Inc. published its list of integration rules and algorithms. If you should find them, I'd love to know where...

You can make Rubi "fallback to Mathematica's integrator" by simply redefining in your copy of Rubi the functions CannotIntegrate and Unintegrable to call the Mathematica function Integrate.

Albert