> On 29 Apr., 09:55, Tom Bachmann <ness...@googlemail.com> wrote:
> > Evidently neither gruntz nor limit play along particularly well with
> > infinities. Clearly this should be nan. I'll try to look into the
> > gruntz issue today.
> >
> > On 29 Apr., 09:25, smichr <smi...@gmail.com> wrote:
> >
> > > I would have expected NaN to be returned but I get:
> >
> > > h[1] >>> limit(x-oo,x,oo)
> > > oo
> > > h[2] >>> limit(oo-x,x,oo)
> > > -oo
I would argue that the correct results are limit(x - oo, x, oo) == -oo
and limit(oo - x, x, oo) == oo.
The expression whose limit is taken belongs to the extended real line,
so we need to consider the topology of the extended real line. Unless
otherwise specified, limits are always evaluated for values of the
variable close to, but different from, the "destination". In this case,
this means arbitrarily large, but finite, reals. For any real x, x - oo
= -oo, so the function Lambda(x, x - oo) is constant over the reals, but
discontinuous, undefined actually, at x = +oo. However, the latter
doesn't matter for the limit, and the result is the constant value, -oo.
All this is completely parallel to limit(abs(x)/x, x, 0, '+'), for
instance.
That's a good point. Putting oo in an expression assumes the extended real line.
Another idea is that if there were a way to take multiple limits at once, we could just replace all instances of oo with a second limit tending toward oo.
Aaron Meurer
Why can't it be right? Limits that don't commute at a singular point are
a common occurrence. For instance:
lim(lim(exp(-b/a), b, 0+), a, 0+) == 1
lim(lim(exp(-b/a), a, 0+), b, 0+) == 0
Intuitively, the inner variable goes to infinity first, i.e. much faster
than the outer one.