RuleBasedIntegration / Rubi

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

Integration that MMA can do but Rubi Cannot #7

Closed neilcsinger closed 5 years ago

neilcsinger commented 5 years ago

This thread discusses an integral that I tried in Rubi but it failed to find an answer. Regards

halirutan commented 5 years ago

For reference, this is the integral Rubi cannot solve

 Integrate[Sqrt[a + (b*Sin[x] + c Cos[x])^2], x]
halirutan commented 5 years ago

@ackinetics Thank you for your report. We will add this form to the test-suite and next time Albert is working on trigonometric integration, he will try to fix this. For the moment, you can use Mathematica 11.3 as it is able to find an antiderivative for this expression.

neilcsinger commented 5 years ago

No problem! I like the work you are doing. The critical realization is that asin(x) + bcos(x) -> c*sin(x+d)

Regards

AlbertRich commented 5 years ago

@ackinetics Thanks for reminding me of the identity I derived a while back:

a*Sin[z] + b*Cos[z] == Sqrt[a^2 + b^2]*Sin[z + ArcTan[a, b]]

which is valid for all a, b and z throughout the complex plane. The next version of Rubi will use this identity so

Int[Sqrt[a + (b*Sin[x] + c Cos[x])^2], x]

will evaluate to

Sqrt[a]*EllipticE[x + ArcTan[b, c], -(b^2 + c^2)/a]

if a>0, and if not to

(Sqrt[a + (c*Cos[x] + b*Sin[x])^2]/Sqrt[(a + (c*Cos[x] + b*Sin[x])^2)/a])*
   EllipticE[x + ArcTan[b, c], -(b^2 + c^2)/a]

This will make the original definite integral problem in the Wolfram Community thread

Int[Sqrt[a + (b*Sin[x] + c Cos[x])^2], {x, n - Pi, n}]

trivial for the next version of Rubi.

Thanks again, Albert

jaswin90 commented 5 years ago

Rubi is not integrating, Int(cos(y/2 - Subscript[\[Theta], 2]/2) cot(x/2 - y/2) csc^3( x/2 - y/2), y) but Mathematica does.