Menu

#1735 Limit of the factorial function - 4 problems

closed
nobody
5
2009-08-28
2009-08-20
No

1. The limits from above and below for even negative integers are wrong:

This is the correct limit for an odd integer from above.

(%i4) limit(factorial(x),x,-1,plus);
(%o4) inf

For an even negative integer the answer is minf, but again we get inf:

(%i5) limit(factorial(x),x,-2,plus);
(%o5) inf

The same problem for the limit from below:

(%i8) limit(factorial(x),x,-1,minus);
(%o8) minf

The sign of the infinity does not change:

(%i9) limit(factorial(x),x,-2,minus);
(%o9) minf

2. Lisp error when the value is a symbol declared to be an integer.

(%i10) declare(n,integer)$

(%i11) limit(factorial(x),x,n,plus);
Maxima encountered a Lisp error:
MINUSP: $N is not a real number
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

3. No limit when the value is a floating point number representing
a negative integer.

(%i14) limit(factorial(x),x,-1.0,plus);
factorial: factorial of negative integer -1.0 not defined.
-- an error. To debug this try debugmode(true);

But for a bigfloat numbers it works.

(%i15) limit(factorial(x),x,-1.0b0,plus);
`rat' replaced -1.0B0 by -1/1 = -1.0B0
`rat' replaced -1.0B0 by -1/1 = -1.0B0
`rat' replaced -1.0B0 by -1/1 = -1.0B0
(%o15) inf

4. Arguments with infinities do not simplify correctly.

(%i1) limit(factorial(x+inf),x,a);
(%o1) (a + inf)!
(%i2) limit(factorial(x+minf),x,a);
(%o2) (a + minf)!
(%i3) limit(factorial(x+infinity),x,a);
(%o3) (a + infinity)!

Fixes to the routine simplimfact are reported on the mailing list.

Dieter Kaiser

Discussion

  • Dan Gildea

    Dan Gildea - 2009-08-28

    Applied suggested fix in limit.lisp rev 1.74

     
  • Dan Gildea

    Dan Gildea - 2009-08-28
    • status: open --> closed
     

Log in to post a comment.