## #1183 limit/integrate wrong

open
nobody
5
2007-07-03
2007-05-04
Stavros Macrakis
No

limit('integrate(t,t,0,x)/x,x,inf);
Is 'limit('integrate(t,t,0,x),x,inf) positive, negative, or zero? pos;

=> 0

Of course the correct answer is INF, since

integrate(t,t,0,x)/x == x/2

More complicated examples (correct answer is INF)

limit(integrate(t/log(t),t,2,a)/a,a,inf) => 0
limit(integrate(t/log(t),t,x,2*x)/x,x,inf) => 0

## Discussion

• Logged In: NO

Maybe you should try your 1st example without "'" before "integrate":

And for your ´more complicated´ examples:
What other answers do you expect, when Maxima isn´t able to solve the
definite integrals???

• Logged In: YES
user_id=588346
Originator: YES

> Maybe you should try your 1st example without "'" before "integrate":
> limit(integrate(t,t,0,x)/x,x,inf); gives the correct answer!

Well, of course it does; Maxima can calculate a closed form for that integral. I was using that as a *simple* example of a noun-form integral where limit gives the wrong answer.

> And for your ´more complicated´ examples:
> What other answers do you expect, when Maxima isn´t able to solve the
> definite integrals???

First of all, I expect not to get an *incorrect* answer, 0. If Maxima can't calculate the correct answer, it should return a noun form.

Secondly, in many cases it is possible to calculate the limit without being able to calculate a closed-form integral. For example,

limit( integrate( exp(t)/t, t, 1, x) , x, inf) = inf
(I'm surprised that integrate(exp(t)/t,t,1,inf)
doesn't report it's divergent, but it doesn't...)
limit( integrate( t^5/(t^7+log(t)), x, x+1), x, inf) = 0

etc.

It turns out that limit doesn't have any special code for integrals like this, but it certainly *could*.

• Robert Dodier
2007-07-03

• labels: --> Lisp Core - Limit

• Dan Gildea
2009-09-07

Fixed in limit.lisp rev 1.80.

(%i2) limit('integrate(t,t,0,x)/x,x,inf);
(%o2) 'limit(('integrate(t,t,0,x))/x,x,inf)
(%i3) limit(integrate(t/log(t),t,2,a)/a,a,inf);
Is a-2 positive, negative, or zero?
p;
(%o3) inf
(%i4) limit(integrate(t/log(t),t,x,2*x)/x,x,inf);
Is x positive, negative, or zero?
p;
Is 2*x-1 positive, negative, or zero?
p;
Is x-1 positive, negative, or zero?
p;
(%o4) 'limit(gamma_incomplete(0,-2*log(x))/x
-gamma_incomplete(0,-2*log(2*x))/x,x,inf)

Indefinite integral are still buggy:
(%i5) limit('integrate(x,x)/x,x,inf);
(%o5) 0