Opened 5 years ago

Last modified 2 years ago

#16422 new defect

cancellation of two indefinite limits

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-6.4
Component: symbolics Keywords: symbolic, cancellation, limit, indefinite
Cc: jakobkroeker Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps: wrongBehaviourMarker

Description (last modified by dkrenn)

We get

sage: limit(cos(x),x=oo) - limit(sin(x),x=oo)
0

This comes from the fact that the return value of each of these limits is a symbolic variable:

sage: limit(sin(x), x=oo)
ind
sage: type(limit(sin(x), x=oo))
<type 'sage.symbolic.expression.Expression'>
sage: limit(sin(x), x=oo).variables()
(ind,)

Change History (5)

comment:1 Changed 5 years ago by dkrenn

  • Description modified (diff)

comment:2 Changed 5 years ago by nbruin

This is an upstream problem (in maxima). It seems "ind" isn't a special symbol there either:

Maxima 5.29.1 http://maxima.sourceforge.net
using Lisp ECL 12.12.1
(%i3) limit(sin(x),x,inf)-limit(cos(x),x,inf);
(%o3)                                  0

We could intercept ind whenever it comes by (from limit) and raise an exception to limit the damage, but I imagine the bad simplifications could already happen internal to maxima.

This seems to happen with infinity as well, by the way:

(%i14) limit(1/x^2,x,0)-limit(1/x^4,x,0);
(%o14)                                 0

Sage catches those (when they happen in a way sage can see it happen), so perhaps we should recognize ind and a special value--leading to an exception if we can't do anything with it.

comment:3 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:4 Changed 4 years ago by dkrenn

Still there in 6.6.

comment:5 Changed 2 years ago by jakobkroeker

  • Cc jakobkroeker added
  • Stopgaps set to wrongBehaviourMarker
Note: See TracTickets for help on using tickets.