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 ]
clicliclic@freenet.de

Posts: 983
Registered: 4/26/08
Re: Rubi 4.5 released
Posted: Jun 25, 2014 10:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


"Nasser M. Abbasi" schrieb:
>
> On 6/24/2014 1:52 AM, clicliclic@freenet.de wrote:
>
> .....

> > Now c should
> > be replaced by COS(p) and this result be integrated from p=0 to p=2*pi;
> > for symmetry reasons it suffices to integrate from p=0 to p=pi and to
> > double the result, whereby the singularity of SQRT(c^2 - 1) at c^2 = 1
> > is avoided.
> >

>
> The outer integral keeps giving me a recursion error.
>
> Got passed the inner one, and taking the limits from r=0..infinity,
> but when integrating this for `p`, a problem shows up. Here is
> the code, may be someone can try it. Version 9.01, Rubi 4.5:
>
> ----------------------------
> Clear[r, z, a, c, p];
> (*this below copied from Martin's post as is*)
>
> integrand1 = 192*r*z^2*(a^2 - 4*c^2*r^2)*(16*z^4*(a^2 + 4*r^2)
> + (8*z^2 + a^2 + 4*r^2)*(a^4 + 8*a^2*r^2*(1 - 2*c^2) + 16*r^4))/
> ((a^4 + 8*a^2*r^2*(1 - 2*c^2) + 16*r^4)*((4*z^2 + a^2)^2
> + 8*r^2*(4*z^2 + a^2*(1 - 2*c^2)) + 16*r^4)^(5/2));
>
> integrand2 = 48*r*z*(4*c^2*r^2 - a^2)/((a^2 - 4*a*c*r +
> 4*r^2)*(4*z^2 + a^2 + 4*a*c*r + 4*r^2)^(5/2));
>
> integrand3 = 48*r*z*(4*c^2*r^2 - a^2)/((a^2 + 4*a*c*r + 4*r^2)*
> (4*z^2 + a^2 - 4*a*c*r + 4*r^2)^(5/2));
>
> (* now find the inner integral, use the assumptions *)
>
> res = Assuming[Element[{r, p, a, z}, Reals] && {z > 0, -1 < c < 1},
> Int[integrand1, r] + Int[integrand2, r] + Int[integrand3, r]];
>
> (*ok, successes now find the limits to do the outer integral *)
> low = Limit[res, r -> 0];
> up = Limit[res, r -> Infinity];
> integrand4 = up - low;
>
> (*replace c by Cos[p] *)
> integrand5 = integrand4 /. c -> Cos[p]
>
> (* do the outer integral *)
> res2 = Assuming[Element[{r, p, a, z}, Reals] && z > 0,
> Int[integrand5, p]];
>
> (*after one hr or so ...*)
>
> $RecursionLimit::reclim: Recursion depth of 1024 exceeded. >>
> $RecursionLimit::reclim: Recursion depth of 1024 exceeded. >>
>
> I tried the last integration also with Mathematica Integrate, but
> stopped it after 2 hrs to use the computer. Was still busy.
> Will try it again later, but does not look good *)
>


Perhaps Rubi's expression for the inner indefinite integral is too
complicated - it may also be invalidated by discontinuities. Here is a
correct and comparatively simple (though complex, since SQRT(c^2 - 1) is
imaginary) version of the outer indefinite integral (still abbreviating
COS(p) = c):

INT(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*LN(SQRT(4*z^2 + a^2) - SQRT(z^2 +
a^2*c*(SQRT(c^2 - 1) + c)) - z) - 2*LN(SQRT(4*z^2 + a^2) - SQRT(z^2 +
a^2*c*(SQRT(c^2 - 1) + c)) + z) + LN(SQRT(z^2 + a^2*c*(SQRT(c^2 - 1) +
c)) - z - a*(SQRT(c^2 - 1) + c)) + LN(SQRT(z^2 + a^2*c*(SQRT(c^2 - 1) +
c)) - z + a*(SQRT(c^2 - 1) + c)) - LN(SQRT(z^2 + a^2*c*(SQRT(c^2 - 1) +
c)) - z - a*c) - LN(SQRT(z^2 + a^2*c*(SQRT(c^2 - 1) + c)) - z + a*c) +
2*LN(SQRT(z^2 + a^2*c*(SQRT(c^2 - 1) + c)) - z) + LN(2*z - a*SQRT(c^2 -
1)) + LN(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*LN(SQRT(4*z^2 + a^2) - SQRT(z^2 + a^2*c*(c - SQRT(c^2 -
1))) - z) + 2*LN(SQRT(4*z^2 + a^2) - SQRT(z^2 + a^2*c*(c - SQRT(c^2 -
1))) + z) - LN(SQRT(z^2 + a^2*c*(c - SQRT(c^2 - 1))) - z + a*(c -
SQRT(c^2 - 1))) - LN(SQRT(z^2 + a^2*c*(c - SQRT(c^2 - 1))) - z +
a*(SQRT(c^2 - 1) - c)) + LN(SQRT(z^2 + a^2*c*(c - SQRT(c^2 - 1))) - z -
a*c) + LN(SQRT(z^2 + a^2*c*(c - SQRT(c^2 - 1))) - z + a*c) -
2*LN(SQRT(z^2 + a^2*c*(c - SQRT(c^2 - 1))) - z) - LN(2*z - a*SQRT(c^2 -
1)) - LN(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), p)

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:

INT(- 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), p)

Integrating this from p=0 to p=pi should give pi/a^2*(4*z*(2*z^2 +
a^2)/(4*z^2 + a^2)^(3/2) - 1). Rubi might feel better if SQRT(c^2 - 1)
is replaced by #i*SIN(p). For the integral from p=0 to p=2*pi, the
result should be doubled.

The first terms from both groups of logarithmic terms in the outer
integrand read:

INT(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*LN(SQRT(4*z^2 + a^2) - SQRT(z^2 +
a^2*c*(SQRT(c^2 - 1) + c)) - z)) + 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*LN(SQRT(4*z^2 + a^2) - SQRT(z^2 + a^2*c*(c - SQRT(c^2 -
1))) - z)), p)

Integrating this from p=0 to p=pi should give pi*z/(2*a^2)*((4*z^2 +
5*a^2)/(SQRT(2)*(2*z^2 + a^2)^(3/2)) - (z^2 + 2*a^2)/(z^2 + a^2)^(3/2)).
Replacing SQRT(c^2 - 1) by #i*SIN(p) may be a good idea here too. The
integral from p=0 to p=2*pi will be twice this result.

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

Martin.



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.