|
[Date Index]
[Thread Index]
[Author Index]
Integration of rational functions (reprise!)
- To: mathgroup at smc.vnet.net
- Subject: [mg75226] Integration of rational functions (reprise!)
- From: dimitris <dimmechan at yahoo.com>
- Date: Sat, 21 Apr 2007 23:07:10 -0400 (EDT)
Although Integrate has become undoubtfully (even) more powerful in
versions 5.X,
I think there are still some things of special attention.
Integration of rational functions is one such issue.
In particular during cases that the RootSum function is generated,
strange behavior can often be encountered. Although many threads
were based on it (i.e. RootSum) I still find intresting to point out
some of my findings.
For example
In[115]:=
g[x_] := (2*x)/((x + 1)*(x^3 + 3*x^2 + 2*x + 1))
The definite integral stays unevaluated
In[116]:=
Timing[Integrate[g[x], {x, 0, Infinity}]]
Out[116]=
{142.078*Second, Integrate[(2*x)/((1 + x)*(1 + 2*x + 3*x^2 + x^3)),
{x, 0, Infinity}]}
even though an antiderivative continuous in the integration range can
be obtained
by Integrate
In[117]:=
G[x_] = Integrate[g[x], x]
Out[117]=
2*(-Log[1 + x] + RootSum[1 + 2*#1 + 3*#1^2 + #1^3 & , (Log[x - #1] +
2*Log[x - #1]*#1 + Log[x - #1]*#1^2)/
(2 + 6*#1 + 3*#1^2) & ])
In[118]:=
Timing[(Limit[G[x], x -> #1] & ) /@ {0, Infinity}]
Out[118]=
{191.422*Second, {2*RootSum[1 + 2*#1 + 3*#1^2 + #1^3 & , (Log[-#1] +
2*Log[-#1]*#1 + Log[-#1]*#1^2)/(2 + 6*#1 + 3*#1^2) & ], 0}}
In[119]:=
(Plus[#2 - #1] & ) @@ %[[2]]
N[%]
Out[119]=
-2*RootSum[1 + 2*#1 + 3*#1^2 + #1^3 & , (Log[-#1] + 2*Log[-#1]*#1 +
Log[-#1]*#1^2)/(2 + 6*#1 + 3*#1^2) & ]
Out[120]=
0.37121697526024766 + 0.*I
In[121]:=
(Plus[#2 - #1] & ) @@ %[[2]]
N[%]
Out[121]=
-2*RootSum[1 + 2*#1 + 3*#1^2 + #1^3 & , (Log[-#1] + 2*Log[-#1]*#1 +
Log[-#1]*#1^2)/(2 + 6*#1 + 3*#1^2) & ]
Out[122]=
0.37121697526024766 + 0.*I
In[122]:=
NIntegrate[g[x], {x, 0, Infinity}]
Out[122]=
0.3712169752602472
A somehow "opposite" behavior is also possible
E g
In[15]:=
f2[x_] := (2*x - 5)/(x^3 + 2*x^2 + 11*x + 6)
In[19]:=
F2[x_] = Integrate[f2[x], x]
Out[19]=
RootSum[6 + 11*#1 + 2*#1^2 + #1^3 & , (-5*Log[x - #1] + 2*Log[x -
#1]*#1)/(11 + 4*#1 + 3*#1^2) & ]
The definite integral can be evaluated
In[44]:=
Timing[Integrate[f2[x], {x, 0, Infinity}]]
Out[44]=
{43.687*Second, (1/3628)*(2*Log[-Root[6 + 11*#1 + 2*#1^2 + #1^3 & ,
3]]*(1556 + 771*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 3] + (189 -
6*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 1]*Root[6 + 11*#1 + 2*#1^2 + #1^3
& , 2])*
Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 3]^2 + (33 - 9*Root[6 +
11*#1 + 2*#1^2 + #1^3 & , 1]*
Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 2])*Root[6 + 11*#1 +
2*#1^2 + #1^3 & , 3]^3) +
Log[-Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 1]]*(313 + 462*Root[6 +
11*#1 + 2*#1^2 + #1^3 & , 3] -
33*(-5 + 2*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 1])*Root[6 + 11*#1
+ 2*#1^2 + #1^3 & , 3]^2 -
3*(-5 + 2*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 1])*Root[6 + 11*#1
+ 2*#1^2 + #1^3 & , 2]^2*
(11 + 4*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 3] + 3*Root[6 +
11*#1 + 2*#1^2 + #1^3 & , 3]^2) +
6*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 2]*(77 + 28*Root[6 + 11*#1
+ 2*#1^2 + #1^3 & , 3] +
(10 - 4*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 1])*Root[6 + 11*#1
+ 2*#1^2 + #1^3 & , 3]^2)) +
Log[-Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 2]]*(-3605 + 42*Root[6 +
11*#1 + 2*#1^2 + #1^3 & , 1]*
Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 3]*(4 + 3*Root[6 + 11*#1 +
2*#1^2 + #1^3 & , 3]) +
9*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 1]^2*Root[6 + 11*#1 +
2*#1^2 + #1^3 & , 3]*
(14 + 5*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 3]) - 6*Root[6 +
11*#1 + 2*#1^2 + #1^3 & , 2]*
(77 + 3*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 1]^2*Root[6 + 11*#1
+ 2*#1^2 + #1^3 & , 3]^2) +
3*Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 2]^2*(-55 + 22*Root[6 +
11*#1 + 2*#1^2 + #1^3 & , 3] +
Root[6 + 11*#1 + 2*#1^2 + #1^3 & , 1]*(22 + 8*Root[6 + 11*#1 +
2*#1^2 + #1^3 & , 3]))))}
However application of the Newton-Leibniz formula fails!
In[21]:=
Limit[F2[x], x -> Infinity] - Limit[F2[x], x -> 0]
Out[21]=
Limit[RootSum[6 + 11*#1 + 2*#1^2 + #1^3 & , (-5*Log[x - #1] + 2*Log[x
- #1]*#1)/(11 + 4*#1 + 3*#1^2) & ], x -> Infinity] - RootSum[6 + 11*#1
+ 2*#1^2 + #1^3 & , (-5*Log[-#1] + 2*Log[-#1]*#1)/(11 + 4*#1 + 3*#1^2)
& ]
Prev by Date:
Re: LegendreP Evaluation Mystery
Next by Date:
Interpreting the solutions... better this time
Previous by thread:
Re: set versus set-delay
Next by thread:
Interpreting the solutions... better this time
|