       Re: Re: Infinity appears as a factor in Integrate result!

• To: mathgroup at smc.vnet.net
• Subject: [mg74917] Re: [mg74885] Re: Infinity appears as a factor in Integrate result!
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Wed, 11 Apr 2007 01:57:22 -0400 (EDT)
• References: <evd3f6\$59u\$1@smc.vnet.net> <200704100913.FAA07254@smc.vnet.net>

```I suspect the reason why Mathematica does not such tricks for
computing limits is that they are too "function specific".
Mathematica generally first tries, whenever possible, to use general
algorithms, such as power series expansions etc., rather than tricks
which work only for specific functions. Of course the latter kind are
also used, but usually only when the general methods fail, and of
course Mathematica has to "know" that the general method did fail
before trying something function specific. For example, the method
that you suggest of "ignoring  the constant inside the log" will only
work for when the expression under the log itself tends to infinity,
so it won't work for example for:

Limit[RootSum[#1^2 + #1 + 1 & , Log[1/x + #1] & ], x -> Infinity]

Limit[RootSum[#1^2 + #1 + 1 & , Log[Sin[x] + #1] & ], x -> Infinity]

etc.  It does not mean that Mathematica could not make use of this
trick, but the order in which various available methods should be
applied is far form obvious.

> But I think we have good reason to hope that this issue will have
> disappeared in the forthcoming version of
> Mathematica.

Andrzej Kozlowski

On 10 Apr 2007, at 18:13, Michael Weyrauch wrote:

> Hello,
>
>   I think this example clearly supports the view I expressed in
> another recent thread on Integrate,
> namely that Mathematica 5.2 has trouble calculating the limit of
> the antiderivative
> for x -> Infinity.
>
> First, I assume that this type of definte integral is evaluated by
> Mathematica by first calculating the
> antiderivative (and not via a Mellin transform as was supposed by
> Dimitris recently). It was really very nice by Buvanesh of WRI
> that he confirmed this explicitely for a similar integral recently.
>
> The antiderivative of the present integral reads
>
> RootSum[1 + b*#1 + a*#1^2 + #1^3 & , Log[x - #1]/(b + 2*a*#1 +
> 3*#1^2) & ]
>
> The limit for x->Infinity vanishes as can be shown by neglecting
> the constant under the Log
>
> RootSum[1 + b*#1 + a*#1^2 + #1^3 & , Log[x]/(b + 2*a*#1 + 3*#1^2) & ]
> which Mathematica simplifies to 0 immediately.
>
> To my opinion, it is the Log[x+constant] which Mathematica puts
> explicitly to Infinity when evaluating this limit x-> Infinity,
> which is incorrect.
>
> Evaluating the limit x->0 of the antiderivative given above e. g.
> for a->1 and b->2 reproduces the numerical values given by
> Dimitris.
>
> Therefore, I am pretty sure that the problems of Integrate we see
> in such examples all have to do with an issue concerning limits
> for x-> Infinity. But I think we have good reason to hope that this
> issue will have disappeared in the forthcoming version of
> Mathematica.
>
> Michael
>
>
>
>
>
> "dimitris" <dimmechan at yahoo.com> schrieb im Newsbeitrag news:evd3f6
> \$59u\$1 at smc.vnet.net...
>> Consider the integral
>>
>> In:=
>> f = HoldForm[Integrate[1/(x^3 + a*x^2 + b*x + 1), {x, 0, Infinity}]]
>>
>> Then
>>
>> In:=
>> Integrate[1/(x^3 + a*x^2 + b*x + 1), {x, 0, Infinity}]
>>
>> Out=
>> If[(Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]] <= 0 || Im[Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 1]] != 0) &&
>>   (Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 2]] <= 0 || Im[Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 2]] != 0) &&
>>   (Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 3]] <= 0 || Im[Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 3]] != 0),
>>  -(Log[-Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]]/(b + 2*a*Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 1] +
>>      3*Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]^2)) - Log[-Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 2]]/
>>    (b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 2] + 3*Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 2]^2) -
>>   Log[-Root[1 + b*#1 + a*#1^2 + #1^3 & , 3]]/(b + 2*a*Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 3] +
>>     3*Root[1 + b*#1 + a*#1^2 + #1^3 & , 3]^2) +
>>   Infinity*(1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 1] +
>> 3*Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]^2) +
>>     1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 2] + 3*Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 2]^2) +
>>     1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 3] + 3*Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 3]^2)),
>>  Integrate[1/(1 + b*x + a*x^2 + x^3), {x, 0, Infinity},
>>   Assumptions ->  !((Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]] <= 0 ||
>> Im[Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]] != 0) &&
>>      (Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 2]] <= 0 || Im[Root[1 +
>> b*#1 + a*#1^2 + #1^3 & , 2]] != 0) &&
>>      (Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 3]] <= 0 || Im[Root[1 +
>> b*#1 + a*#1^2 + #1^3 & , 3]] != 0))]]
>>
>> In the results it appears Infinity!. For anyone who dosn't believe me
>> try:
>>
>> In:=
>> %[]
>>
>> Out=
>> -(Log[-Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]]/(b + 2*a*Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 1] +
>>     3*Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]^2)) - Log[-Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 2]]/
>>   (b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 2] + 3*Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 2]^2) -
>>  Log[-Root[1 + b*#1 + a*#1^2 + #1^3 & , 3]]/(b + 2*a*Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 3] +
>>    3*Root[1 + b*#1 + a*#1^2 + #1^3 & , 3]^2) +
>>  Infinity*(1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 1] + 3*Root[1
>> + b*#1 + a*#1^2 + #1^3 & , 1]^2) +
>>    1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 2] + 3*Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 2]^2) +
>>    1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 3] + 3*Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 3]^2))
>>
>> The following term is multiplied with Infinity and the result of this
>> product
>> appeared in the results!
>>
>> In:=
>> Cases[%, (a_)*Infinity -> a]
>>
>> Out=
>> {1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 1] + 3*Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 1]^2) +
>>   1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 2] + 3*Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 2]^2) +
>>   1/(b + 2*a*Root[1 + b*#1 + a*#1^2 + #1^3 & , 3] + 3*Root[1 + b*#1 +
>> a*#1^2 + #1^3 & , 3]^2)}
>>
>> Obviolusly Integarate algorithm failes for this integral.
>>
>> What is funnier is that
>>
>> In:=
>> Integrate[1/(x^3 + a*x^2 + b*x + 1), {x, 0, Infinity}]
>>
>> Out=
>> If[(Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]] <= 0 || Im[Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 1]] != 0) &&
>>   (Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 2]] <= 0 || Im[Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 2]] != 0) &&
>>   (Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 3]] <= 0 || Im[Root[1 + b*#1
>> + a*#1^2 + #1^3 & , 3]] != 0), ComplexInfinity,
>>  Integrate[1/(1 + x*(b + x*(a + x))), {x, 0, Infinity},
>>   Assumptions -> (Im[Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]] == 0 &&
>> Re[Root[1 + b*#1 + a*#1^2 + #1^3 & , 1]] > 0) ||
>>     (Im[Root[1 + b*#1 + a*#1^2 + #1^3 & , 2]] == 0 && Re[Root[1 +
>> b*#1 + a*#1^2 + #1^3 & , 2]] > 0) ||
>>     (Im[Root[1 + b*#1 + a*#1^2 + #1^3 & , 3]] == 0 && Re[Root[1 +
>> b*#1 + a*#1^2 + #1^3 & , 3]] > 0)]]
>>
>> I.e. if you try again to obtain the integral Mathematica returns
>> ComplexInfinity!
>>
>> Dimitris
>>
>>
>
>

```

• Prev by Date: Re: ColorFunction help?
• Next by Date: Re: Re: ftp from mathematica code
• Previous by thread: Re: Infinity appears as a factor in Integrate result!
• Next by thread: Re: Re: Infinity appears as a factor in Integrate result!