home *** CD-ROM | disk | FTP | other *** search
- "File: EULERMAC.DMO Euler-Maclaurin Summation Formula Demonstration"
-
- "EULERMAC.MTH was contributed by Jim FitzSimons of Cave Creek, Arizona."
-
- "Phone: 602-488-1859 Fax: 602-488-5014 E-mail: cherry@neta.com"
-
- "The Euler-Maclaurin summation formula can be used to find asymptotic"
-
- "expansions of finite or infinite sums."
-
- "It is described in Section 23.1.30 on page 806 of the Handbook of"
-
- "Mathematical Functions by Milton Abramowitz and Irene A. Stegun."
-
- pause:=
-
- "This is the Euler-Maclaurin summation formula as defined in EULERMAC.MTH:"
-
- EULERMAC(y,k,a0,a,b,m):=SUM(y,k,a0,a-1)+(LIM(y,k,b)+LIM(y,k,a))/2+INT(y,k,a,b)~
- +SUM(ZETA(1-2*j_)/(2*j_-1)!*(LIM(DIF(y,k,2*j_-1),k,a,0)-LIM(DIF(y,k,2*j_-1),k,~
- b,0)),j_,1,m)
-
- "The first argument, y, of EULERMAC should be an expression which is a"
-
- "function of the second argument, k, the index variable of the sum."
-
- "a0 and b are the starting and ending indexes of the sum, respectively."
-
- "a is the start of the Euler-Maclaurin asymptotic expansion. m is the"
-
- "order of the expansion. Choose a and m to give the desired accuracy."
-
- pause:=
-
- "The Euler-Mascheroni Gamma constant can be defined as:"
-
- euler_gamma=LIM(SUM(1/(k+1),k,0,b-1)-LN(b),b,inf,1)
-
- "EULERMAC can approximate the Gamma constant to any desired degree of"
-
- "precision. For example, to approximate it accurate to 32 digits of"
-
- "precision, let y(k)=1/(k+1), a0=0, a=64, and n=9:"
-
- APPROX(LIM(EULERMAC(1/(k+1),k,0,64,b-1,9)-LN(b),b,inf,1),32)
-
- "As another example, EULERMAC can approximate the Riemann Zeta function."
-
- "If the real part of z>1, Zeta(z,q) can be defined as the infinite sum:"
-
- ZETA(z,q)=SUM(1/(q+k)^z,k,0,inf)
-
- "To compute Zeta(2)=Zeta(2,1) accurate to 32 digits of precision, set"
-
- "precision to exact mode, but display using 32 digit decimal notation:"
-
- [Precision:=Exact,Notation:=Decimal,NotationDigits:=32]
-
- "Then let y(k)=1/(1+k)^2, a0=0, a=64, b=inf, and m=9 in EULERMAC:"
-
- EULERMAC(1/(1+k)^2,k,0,64,inf,9)