limit(cos(1/x)*sin(x)-sin(x),x,inf) should give 0, not IND.
Stavros Macrakis
2002-09-19
Logged In: YES
user_id=588346
Strangely enough, limit even gets this wrong if you feed it the
factored form:
limit ( (cos(1/x)-1) * sin(x), x, inf)
even though it correctly gets
limit(cos(1/x)-1,x,inf) => 0
and
limit(sin(x),x,inf) => ind
and 0*ind is always 0.
On the other hand, it does get it right if you factor the
exponentialized form:
limit(factor(ev(...,exponentialize)),x,inf) => 0
Stavros Macrakis
2005-01-21
Robert Dodier
2006-04-09
Rupert Swarbrick
2009-02-15
This happens for
limit ( (cos(1/x)-1) * sin(x), x, inf)
because $limit is somehow refactoring before it gets around to calling limit. Tracing shows:
(LIMIT
((MPLUS SIMP) ((MTIMES SIMP) -1 ((%SIN SIMP) $X))
((MTIMES SIMP) ((%COS SIMP) ((MEXPT SIMP) $X -1)) ((%SIN SIMP) $X)))
$X $INF THINK)
which then gets evaluated for each term in the plus, giving $ind - $ind = $ind.
The following call works:
(let ((lhp?))
(declare (special lhp?))
(limit #$(cos(1/x)-1) * sin(x)$ '$X '$INF 'THINK))
giving '$zerob.
I'm not sure if there's a canonical way to expand the right things in general though.
Rupert
Dieter Kaiser
2009-12-13
Fixed in limit.lisp revision 1.88.
Closing this bug report as fixed.
Dieter Kaiser
Dieter Kaiser
2009-12-13