Opened 12 years ago

Closed 12 years ago

#8942 closed defect (fixed)

failing calculation with limit

Reported by: casamayou Owned by: burcin
Priority: minor Milestone: sage-4.5.2
Component: calculus Keywords: limit
Cc: jason, mvngu, mhansen Merged in: sage-4.5.2.alpha0
Authors: Karl-Dieter Crisman Reviewers: Paul Zimmermann
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In all three calculations below, the first result is false, whereas in a previous version of Sage, he returned Und what is the correct answer.

sage:f(x) = (cos(pi/4-x) - tan(x)) / (1 - sin(pi/4+x))
sage:limit(f(x), x = pi/4) 
+Infinity
sage: limit(f(x), x = pi/4, dir='plus')            
-Infinity
sage: limit(f(x), x = pi/4, dir='minus')           
+Infinity

Attachments (1)

trac_8942-unsigned-inf.patch (961 bytes) - added by kcrisman 12 years ago.
Based on 4.4.2

Download all attachments as: .zip

Change History (8)

comment:1 follow-up: Changed 12 years ago by kcrisman

  • Cc jason added

This was fixed when we improved our recognition of Maxima's unsigned infinity.

sage: sage: limit(f(x), x = pi/4, dir='minus')           
+Infinity
sage: sage: limit(f(x), x = pi/4, dir='plus')            
-Infinity
sage: sage:limit(f(x), x = pi/4) 
Infinity

So I guess this can be closed? Or should we whip up a patch to document this...?

comment:2 in reply to: ↑ 1 Changed 12 years ago by casamayou

  • Resolution set to fixed
  • Status changed from new to closed

Replying to kcrisman:

This was fixed when we improved our recognition of Maxima's unsigned infinity.

sage: sage: limit(f(x), x = pi/4, dir='minus')           
+Infinity
sage: sage: limit(f(x), x = pi/4, dir='plus')            
-Infinity
sage: sage:limit(f(x), x = pi/4) 
Infinity

So I guess this can be closed? Or should we whip up a patch to document this...?

This can be closed. Thanks a lot !

comment:3 Changed 12 years ago by kcrisman

  • Cc mvngu mhansen added
  • Resolution fixed deleted
  • Status changed from closed to new

Thanks. One thing to point out is http://www.sagemath.org/doc/developer/trac.html#closing-tickets, so that in theory only the release manager should close a ticket. For instance, we might want to document this somewhere (which is what I was really asking about).

I will now violate that same web page by re-opening it; since it hasn't actually been merged (nothing to merge) hopefully that is ok, Minh or Mike :)

Changed 12 years ago by kcrisman

Based on 4.4.2

comment:4 Changed 12 years ago by kcrisman

  • Authors set to Karl-Dieter Crisman
  • Status changed from new to needs_review

If we want more documentation that we have fixed this, here it is. Ready for review.

comment:5 Changed 12 years ago by zimmerma

  • Status changed from needs_review to positive_review

positive review (I've checked that all doctests still pass).

A small comment: maybe the documentation could say more explicitly that the output Infinity indicates a complex infinity, whereas +Infinity means plus infinity.

By the way, there is a problem since Sage parses Infinity as +Infinity:

sage: Infinity
+Infinity
sage: Infinity == +Infinity
True
sage: a=limit(1/x, x=0)
sage: a == +Infinity
True

but this could be in a different ticket.

comment:6 Changed 12 years ago by zimmerma

but this could be in a different ticket.

see #9480

comment:7 Changed 12 years ago by mpatel

  • Merged in set to sage-4.5.2.alpha0
  • Resolution set to fixed
  • Reviewers set to Paul Zimmermann
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.