Opened 12 years ago

Closed 12 years ago

# failing calculation with limit

Reported by: Owned by: casamayou burcin minor sage-4.5.2 calculus limit jason, mvngu, mhansen sage-4.5.2.alpha0 Karl-Dieter Crisman Paul Zimmermann N/A

### 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
```

### comment:1 follow-up: ↓ 2 Changed 12 years ago by 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...?

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

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

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

• 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 :)

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.