Menu

#4137 simplimplus bugs

None
closed
nobody
limit (217)
5
6 days ago
2023-05-03
No

The function simplimplus is responsible for determining the limit of a sum of terms. It's easy to find bugs in this function.

Wrong--should be und not 0.

(%i1)   limit(3^x * cos(x) + sin(x),x,inf);
(%o1)   0

Wrong--should be und not inf.

(%i2)   limit(3^x * cos(x) + x,x,inf);
(%o2)   inf

Wrong--should be und not inf.

(%i4)   limit(3^x * cos(x) + 2^x,x,inf);
(%o4)   inf

Wrong---needs to ask about the relative magnitudes of a and b.

(%i7)   limit(a^x * cos(x) + b^x,x,inf);
"Is "abs(b)-1" positive, negative or zero?"p;
"Is "b-1" positive, negative or zero?"p;
"Is "abs(a)-1" positive, negative or zero?"p;
"Is "a-1" positive, negative or zero?"p;
(%o7)   inf

Wrong--shouldn't throw an error

(%i8)   limit(3^x + (9+%i)^x,x,inf);
sign: argument cannot be imaginary; found %i

Discussion

  • Dan Gildea

    Dan Gildea - 2026-09-12

    Update on these cases.

    ok now:

    (%i1) limit(3^x * cos(x) + sin(x),x,inf);
    (%o1) und
    

    should be und:

    (%i2) limit(3^x * cos(x) + x,x,inf);
    (%o2)                                 inf
    

    should be und:

    (%i3) limit(3^x * cos(x) + 2^x,x,inf);
    (%o3)                                 inf
    

    should ask a vs b:

    (%i4) limit(a^x * cos(x) + b^x,x,inf);
    Is abs(b) - 1 positive, negative or zero?
    p;
    Is b - 1 positive, negative or zero?
    p;
    Is abs(a) - 1 positive, negative or zero?
    p;
    Is a - 1 positive, negative or zero?
    p;
    (%o4)                                 inf
    

    should be infinity:

    (%i5) limit(3^x + (9+%i)^x,x,inf);
    (%o5)                                 inf
    
     
  • Dan Gildea

    Dan Gildea - 2026-09-12

    should be infinity:

    (%i1) limit(2*%i*atan(x) + x, x, inf);
    (%o1)                                 inf
    
     
  • David Scherfgen

    David Scherfgen - 6 days ago
    • status: open --> closed
     
  • David Scherfgen

    David Scherfgen - 6 days ago

    Should now all be fixed by commit [fc6faa].

     

    Related

    Commit: [fc6faa]


    Last edit: David Scherfgen 6 days ago

Log in to post a comment.