Mathematica was not able to calculate the definite integral of a trigonometric function of mine:
Assuming[r0 > 0,
Assuming[r0 < 1/2,
Integrate[(Cos[θ]^6 Sin[θ]^2)/(a + Cos[θ]^3), {θ, 0, 2 π}]]]
so I made a standard change of variables Tan[θ/2] == z
, transforming the trigonometric function in a rational function in the variable z
. Then I calculate the indefinite integral in z
(I also replace r0
by a
, using the relation a -> (-1 + 1/r0^3)
)
I1 = Integrate[(4 z^2 (1 - z^2)^6)/((1 + z^2)^8 (a + (1 - z^2)^3/(1 + z^2)^3))*2 /(1 + z^2), z]
Mathematica returned me the calculation in terms of RootSum
1/15 ((-15 a z (-1 + z^2) (1 + z^2)^3 + 8 z^3 (5 - 2 z^2 + 5 z^4) -
15 a (1 + z^2)^5 ArcTan[z])/(1 + z^2)^5 +
20 a^2 RootSum[
1 + a - 3 #1^2 + 3 a #1^2 + 3 #1^4 + 3 a #1^4 - #1^6 +
a #1^6 &, (
Log[z - #1] #1)/(-1 + a + 2 #1^2 + 2 a #1^2 - #1^4 + a #1^4) &])
and then I made the way back so I would have the result in terms of the original variable θ
:
I2 = I1 /. ArcTan[z] -> θ/2;
I3 = I2 /. z -> Sin[θ]/(1 + Cos[θ])
1/15 (20 a^2 RootSum[
1 + a - 3 #1^2 + 3 a #1^2 + 3 #1^4 + 3 a #1^4 - #1^6 +
a #1^6 &, (
Log[Sin[θ]/(1 + Cos[θ]) - #1] #1)/(-1 + a +
2 #1^2 + 2 a #1^2 - #1^4 + a #1^4) &] + (-((
15 a Sin[θ] (-1 +
Sin[θ]^2/(1 + Cos[θ])^2) (1 +
Sin[θ]^2/(1 + Cos[θ])^2)^3)/(
1 + Cos[θ])) -
15/2 a θ (1 + Sin[θ]^2/(1 + Cos[θ])^2)^5 + (
8 Sin[θ]^3 (5 - (
2 Sin[θ]^2)/(1 + Cos[θ])^2 + (
5 Sin[θ]^4)/(1 + Cos[θ])^4))/(1 +
Cos[θ])^3)/(1 + Sin[θ]^2/(1 + Cos[θ])^2)^5)
which I simplified using FullSimplify
I33 = FullSimplify[I3]
1/240 (40 a (-3 θ +
8 a RootSum[
1 + a - 3 #1^2 + 3 a #1^2 + 3 #1^4 + 3 a #1^4 - #1^6 +
a #1^6 &, (
Log[-#1 + Tan[θ/2]] #1)/(-1 + a + 2 #1^2 +
2 a #1^2 - #1^4 + a #1^4) &]) + 30 Sin[θ] +
60 a Sin[2 θ] - 5 Sin[3 θ] - 3 Sin[5 θ])
Finally I calculated the integral between 0
and 2 π
II = FullSimplify[
2 (Limit[I33, θ -> π,
Direction -> 1] - (I33 /. θ -> 0))]
-(1/3)
a (3 π +
8 a RootSum[
1 + a - 3 #1^2 + 3 a #1^2 + 3 #1^4 + 3 a #1^4 - #1^6 +
a #1^6 &, (
Log[-#1] #1)/(-1 + a + 2 #1^2 + 2 a #1^2 - #1^4 + a #1^4) &]);
IIFINAL /. a -> (-1 + 1/r0^3)
-(1/
3) (-1 + 1/r0^3) (3 π -
8 (-1 + 1/
r0^3) r0^3 RootSum[-1 - 3 #1^2 + 6 r0^3 #1^2 - 3 #1^4 - #1^6 +
2 r0^3 #1^6 &, (
Log[-#1] #1)/(-1 + 2 r0^3 - 2 #1^2 - #1^4 + 2 r0^3 #1^4) &])
Now I want to calculate the series expansion of this expression, in terms of r0
.
I would like to do something like
Series[IIFINAL, {r0, 0, 5}]
but when I try to do that, Mathematica returns me
Series::nmer: "Root[-1+(-3+6\ r0^3)\ #1-3\ #1^2+(-1+2\ r0^3)\ #1^3&,1] is not a meromorphic function of r0 at 0."
I have already checked the post
Series expression of a Root object
but it does not help me since in my case I have RootSum
, not Root
in the result, and when I try to use
ToRadicals@Roots
as suggested in that post, I get an error
Nonpolynomial root specification .... is not a list with two elements.
So, is there a way to force Mathematica to output a series representation for RootSum
-like results?