#104 limit/sin(inf)etc. should give 0, not IND

closed
nobody
5
2009-12-13
2002-08-10
Stavros Macrakis
No

limit(cos(1/x)*sin(x)-sin(x),x,inf) should give 0, not IND.

Discussion

  • 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

     
    • summary: limit should give 0, not IND --> limit/sin(inf)etc. should give 0, not IND
     
  • Robert Dodier
    Robert Dodier
    2006-04-09

    • labels: --> Lisp Core - Limit
     
  • 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
    Dieter Kaiser
    2009-12-13

    Fixed in limit.lisp revision 1.88.
    Closing this bug report as fixed.
    Dieter Kaiser

     
  • Dieter Kaiser
    Dieter Kaiser
    2009-12-13

    • status: open --> closed