Menu

#1484 Limit of the Wallis product

closed
None
5
2008-08-30
2008-08-30
No

Computing the Wallis product for %pi fails:

(%o3) (%pi*4^N*N!^2)/(2*2^(2*N)*gamma(N+1/2)*gamma(N+3/2))
(%i4) limit(%, N, inf);
(%o4) 0
(%i5) load(stirling)$
(%i6) stirling(%o3);
(%o6) ((N+3/2)^(-N-1)*2^(-2*N-1)*4^N*%e^(2*N+2)*N!^2)/(2*(N+1/2)^N)
(%i7) limit(%, N, inf);
(%o7) 0
(%i8) ratsimp(%o6);
(%o8) (4^N*%e^(2*N+2)*N!^2)/((2*N+1)^N*(2*N+3)^N*(4*N+6))
(%i9) limit(%, N, inf);
(%o9) %pi/2

Only the last limit is correct.

Andrej

Discussion

  • Dan Gildea

    Dan Gildea - 2008-08-30
    • status: open --> closed
    • assigned_to: nobody --> dgildea
     
  • Dan Gildea

    Dan Gildea - 2008-08-30

    Logged In: YES
    user_id=1797506
    Originator: NO

    src/tlimit.lisp rev 1.7:
    taylim: ask for $lhospitallim terms of taylor series, instead of 1 term.
    this is an arbitrary limit: with default value $lhospitallim = 4,
    tlimit(2^n/n^5, n, inf) => 0
    (before, tlimit(2^n/n^2, n, inf) => 0 )
    This handles this problem with the default settings, and gives the
    user the ability to increase the limit.

    (%i2) (%pi*4^N*N!^2)/(2*2^(2*N)*gamma(N+1/2)*gamma(N+3/2));
    (%o2) %pi*2^(-2*N-1)*4^N*N!^2/(gamma(N+1/2)*gamma(N+3/2))
    (%i3) limit(%, N, inf);
    (%o3) %pi/2
    (%i4) load(stirling)$
    (%i5) stirling(%o2);
    (%o5) (N+3/2)^(-N-1)*2^(-2*N-2)*4^N*%e^(2*N+2)*N!^2/(N+1/2)^N
    (%i6) limit(%, N, inf);
    (%o6) %pi/2
    (%i7) ratsimp(%o5);
    (%o7) 4^N*%e^(2*N+2)*N!^2/((2*N+1)^N*(2*N+3)^N*(4*N+6))
    (%i8) limit(%, N, inf);
    (%o8) %pi/2

     

Log in to post a comment.