Menu

#4804 limit(sin((p-1)^5 * x)/x,x,0,plus) is correct, but perverse

None
open
nobody
None
5
2 days ago
3 days ago
No

Correct, but perverse:

(%i1)   limit(sin((p-1)^5 * x)/x,x,0,plus);
(%o1)   p^5-5*p^4+10*p^3-10*p^2+5*p-1

a better answer is (p-1)^5.

The L'Hôpital code does some unnecessary calls to ratsimp--these calls expand (p-1)^5.

Discussion

  • Stavros Macrakis

    Although it would be nice if manipulations returned things in the same form as their input, that isn't something that most of Maxima does. For example:

    integrate((2*x-3)^3,x) => 2*x^4-12*x^3+27*x^2-27*x
    

    but (2*x-3)^4/8 would preserve the input form.

     
  • Barton Willis

    Barton Willis - 2 days ago

    My primary objective was to eliminate a few unnecessary calls to sratsimp in the limit code, not to make the input and output forms more parallel. I believe there are good reasons for doing so: improved speed, better efficiency, and avoiding surprising float‑to‑rational conversions.

    I constructed this example specifically to illustrate why removing these unnecessary calls to sratsimp was the right thing to do.

     
  • David Scherfgen

    David Scherfgen - 2 days ago

    Maybe we could at least have a version of ratsimp that simplifies only with respect to some given variable (e.g., limit variable, integration variable) and leaves everything else alone.

     

Log in to post a comment.

Auth0 Logo