Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.symbolic.independent

Topic: Rubi 4.5 released
Replies: 21   Last Post: Jun 29, 2014 4:29 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,690
Registered: 2/7/05
Re: Rubi 4.5 released
Posted: Jun 25, 2014 4:30 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 6/25/2014 9:02 AM, clicliclic@freenet.de wrote:
>
>
> It is probably better to try this term by term. The rational (in c =
> COS(p) and SQRT(c^2 - 1) = #i*|SIN(p)|) part of the integrand reads:

...
>
> And of course, care has to be taken again that Rubi's antiderivatives
> are not invalidated by discontinuities.
>
> Martin.
>


Ok, an update before going more. I did the term-by-term method.

Using the outer integral you gave, converted it to M code, expanded
it, and obtained 94 additive terms. Now added a Loop to integrate term
by term. The problem, Rubi 4.5 is taking too long just on the first
term, so I stopped it after waiting 10 minutes, since when I use
Mathematica Integrate on the same first term, it does it in about
5 seconds. So before I spend more time on this, I will show the first
term, and lets see first why Rubi is not doing this. May be
I did something wrong. There are 94 terms, so if each takes that
long, this whole process will really take too long.

The first term is: (this is after replacing c by Cos[p], in the
outer integral expression)

-((9*a^14*z^2*Cos[p]^2)/(2*(a^2 + 4*z^2)^(3/2)*
(4*z^2 + a^2*(1 - Cos[p]^2))^2*(z^2 + a^2*Cos[p]*
(Cos[p] - Sqrt[-1 + Cos[p]^2]))^2*
(z^2 + a^2*Cos[p]*(Cos[p] + Sqrt[-1 + Cos[p]^2]))^2))

Mathematica Integrate gives (in about 5 seconds)

Assuming[Element[{r, p, a, z}, Reals] && z > 0, Integrate[term, p]]

-((1/(32*(a^2 + 3*z^2)^6*(a^2 + 4*z^2)^(3/2)))*
(9*a^14*z^2*(-((8*(a^10 + 10*a^8*z^2 + 33*a^6*z^4 +
44*a^4*z^6 + 16*a^2*z^8 - 8*z^10)*ArcTan[(1 + a^2/z^2)*Cot[p]])/
(a^2*z^2*(a^2 + z^2)^3)) + ((a^6 + 22*a^4*z^2 + 105*a^2*z^4 +
128*z^6)*ArcTan[(Sqrt[a^2 + 4*z^2]*Tan[p])/(2*z)])/
(a^2*z^3*Sqrt[a^2 + 4*z^2]) + (4*(a^4 + 5*a^2*z^2 + 6*z^4)^2*Sin[p])/
((a^2 + z^2)^3*((a^2 + z^2)*Cos[p] - I*z^2*Sin[p])) +
(4*(a^4 + 5*a^2*z^2 + 6*z^4)^2*Sin[p])/
((a^2 + z^2)^3*((a^2 + z^2)*Cos[p] + I*z^2*Sin[p])) +
(2*(a^2 + 3*z^2)^2*Sin[2*p])/(z^2*(a^2 + 8*z^2 - a^2*Cos[2*p])))))

While Rubi4.5:

Assuming[Element[{r, p, a, z}, Reals] && z > 0, Integrate[term, p]]

No response, busy. MathKernel CPU 100%, I can wait more......
but why so long? Will keep it running to see....

Here is the complete code, if anyone wants to try:
------------------------------------------
ps. any one can now run Mathematica code free on the cloud:
https://programming.wolframcloud.com/app/ and click on
"create a new notebook" and copy paste this there
and hit Enter to evaluate and use the Evaluate button.

(*copied as is from Martin's post, converted to M code*)

integrand = 3*a^2*z*(c*(Sqrt[c^2 - 1*(4*c^2 + 1) + 4*c^4 - c^2 - 1]/
(16*(z^2 + a^2*c*(Sqrt[c^2 - 1] + c))^(5/2)))*
(-2*Log[Sqrt[4*z^2 + a^2] - Sqrt[z^2 + a^2*c*(Sqrt[c^2 - 1] + c)] - z] -
2*Log[Sqrt[4*z^2 + a^2] - Sqrt[z^2 + a^2*c*(Sqrt[c^2 - 1] + c)] + z] +
Log[Sqrt[z^2 + a^2*c*(Sqrt[c^2 - 1] + c)] - z - a*(Sqrt[c^2 - 1] + c)] +
Log[Sqrt[z^2 + a^2*c*(Sqrt[c^2 - 1] + c)] - z + a*(Sqrt[c^2 - 1] + c)] -
Log[Sqrt[z^2 + a^2*c*(Sqrt[c^2 - 1] + c)] - z - a*c] -
Log[Sqrt[z^2 + a^2*c*(Sqrt[c^2 - 1] + c)] - z + a*c] +
2*Log[Sqrt[z^2 + a^2*c*(Sqrt[c^2 - 1] + c)] - z] +
Log[2*z - a*Sqrt*(c^2 - 1)] + Log[2*z + a*Sqrt*(c^2 - 1)]) +
3*a^2*z*((c*Sqrt[c^2 - 1]*(4*c^2 + 1) - 4*c^4 + c^2 + 1)/
(16*(z^2 + a^2*c*(c - Sqrt[c^2 - 1]))^(5/2)))*
(2*Log[Sqrt[4*z^2 + a^2] - Sqrt[z^2 + a^2*c*(c - Sqrt[c^2 - 1])] - z] +
2*Log[Sqrt[4*z^2 + a^2] -
Sqrt[z^2 + a^2*c*(c - Sqrt[c^2 - 1])] + z] -
Log[Sqrt[z^2 + a^2*c*(c - Sqrt[c^2 - 1])] - z + a*(c - Sqrt[c^2 - 1])] -
Log[Sqrt[z^2 + a^2*c*(c - Sqrt[c^2 - 1])] - z + a*(Sqrt[c^2 - 1] - c)] +
Log[Sqrt[z^2 + a^2*c*(c - Sqrt[c^2 - 1])] - z - a*c] +
Log[Sqrt[z^2 + a^2*c*(c - Sqrt[c^2 - 1])] - z + a*c] -
2*Log[Sqrt[z^2 + a^2*c*(c - Sqrt[c^2 - 1])] - z] - Log[2*z - a*Sqrt[c^2 - 1]] -
Log[2*z + a*Sqrt[c^2 - 1]]) -
z*((z*Sqrt[4*z^2 + a^2]*(96*c^2*z^10 - 24*a^2*z^8*(c^4 - 4*c^2 - 3) +
2*a^4*z^6*(108*c^6 - 101*c^4 - 22*c^2 + 15) +
a^6*z^4*(262*c^6 - 249*c^4 - 64*c^2 + 3) +
8*a^8*c^2*z^2*(c^2 - 1)*(14*c^2 + 3) + a^10*c^2*(c^2 - 1)*(13*c^2 + 3)) -
256*c^2*z^12 + 64*a^2*z^10*(5*c^4 - 6*c^2 - 4) -
16*a^4*z^8*(58*c^6 - 71*c^4 - 6*c^2 + 11) -
4*a^6*z^6*(332*c^6 - 303*c^4 - 83*c^2 + 10) -
a^8*z^4*(698*c^6 - 493*c^4 - 176*c^2 + 3) -
2*a^10*c^2*z^2*(71*c^4 - 44*c^2 - 19) -
3*a^12*c^2*(3*c^4 - 2*c^2 - 1))/
(2*(4*z^2 + a^2)^(3/2)*(z^2 + a^2*c*(c - Sqrt[c^2 - 1]))^2*
(z^2 + a^2*c*(Sqrt[c^2 - 1] + c))^2*(4*z^2 + a^2*(1 - c^2))^2)));

integrand2 = Expand[integrand]; (*break into terms*)

Length[integrand2]
(* 94 *)

Do[
term = integrand2[[n]] /. c -> Cos[p];
Print["Integerating [", n, "] term ", term];
Int[term, p], (*replace Int by Integrate to use M's instead of Rubi*)
{n, 1, Length[integrand2]}
]

--Nasser





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.