source
I want to understand the Euler-Maclaurin sum formula. On page 136 of A First Course in
Numerical Analysis by Anthony Ralston and Philip Rabinowitz there is a derivation of the
Euler-Maclaurin sum formula. They leave out the details and define non-standard Bernoulli
polynomials. My derivation will fill in the details and use standard Bernoulli polynomials.
Our interest is in approximating the sum
We begin by introducing the polynomials
, defined to be the polynomials of degree
Using DERIVE we can show that
The DERIVE results are:
k:epsilonInteger
;User=Simp(User)
S(k,1)=0
k:epsilonInteger (1, inf)
;User=Simp(User)
S(k,0)=0
Using DERIVE we can find the first few polynomials:
|
|
;Expd(User')
VECTOR(S(k,x),k,0,3)=[0,x-1,x^2-x,x^3-3*x^2/2+x/2]
The constants
are the Bernoulli numbers. The following two idenities
are of particular interest to us:
|
|
Using DERIVE we can verify these idenities for several values of
.
;User=Simp(User)
VECTOR(B(2*k+1),k,1,12)=[0,0,0,0,0,0,0,0,0,0,0,0]
S(k,x):=k*SUM(p^(k-1),p,1,x-1)
;User=Simp(User)
VECTOR(DIF(S(k,x),x)-k*(S(k-1,x)+B(k-1)),k,3,12)=[0,0,0,0,0,0,0,0,0,0]
Now we define
|
|
Using DERIVE we find
.
M(k,x,h):=INT(S(2*k,(y-x)/h)*DIF(F(y),y,2*k),y,x,x+h)/(2*k)!
For
|
|
;Simp(User')
S(2,(y-x)/h)=(x-y)*(x-y+h)/h^2
Evaluate S.
|
|
M(1,x,h)=INT((x-y)*(x-y+h)*F''(y),y,x,x+h)/(2*h^2)
Substute that value of S.
|
|
INT((x-y)*(x-y+h)*F''(y),y,x,x+h)/(2*h^2)
[V(y):=(y-x)*(y-x-h), U(y):=DIF(F(y),y,1)]
INT(V(y)*DIF(U(y),y),y,x,x+h)=
V(x+h)*U(x+h)-V(x)*U(x)-INT(U(y)*DIF(V(y),y),y,x,x+h)
Integrate
by parts.
|
|
;Simp(User')
INT((x-y)*(x-y+h)*F''(y),y,x,x+h)=
(2*x+h)*F(x+h)-(2*x+h)*F(x)-2*INT(y*F'(y),y,x,x+h)
Evaluate the integral.
|
|
[U(y):=F(y), V(y):=y]
INT(V(y)*DIF(U(y),y),y,x,x+h)=
V(x+h)*U(x+h)-V(x)*U(x)-INT(U(y)*DIF(V(y),y),y,x,x+h)
Integrate by parts again.
;Simp(#3)
INT(y*F'(y),y,x,x+h)=(x+h)*F(x+h)-x*F(x)-INT(F(y),y,x,x+h)
Evaluate the integral.
|
|
;Simp(#6') INT((x-y)*(x-y+h)*F''(y),y,x,x+h)=
-h*F(x+h)-h*F(x)+2*INT(F(y),y,x,x+h)
Subsitute the last integral.
|
|
;Expd(#10')
M(1,x,h)=-F(x+h)/(2*h)-F(x)/(2*h)+INT(F(y),y,x,x+h)/h^2
Subsitute this result to get the value of
.
|
|
Now to find the other values of
we will find a recurrence relationship.
Start again with the definition of
.
|
|
Do the same thing in DERIVE.
M(k,x,h):=INT(S(2*k,(y-x)/h)*DIF(F(y),y,2*k),y,x,x+h)/(2*k)!
Integrate
by parts.
|
|
[V(y):=, U(y):=]
INT(V(y)*DIF(U(y),y),y,x,x+h)=
LIM(V(y)*U(y),y,x+h,0)-LIM(V(y)*U(y),y,x,0)-
INT(U(y)*DIF(V(y),y),y,x,x+h)
[V(y):=S(2*k,(y-x)/h), U(y):=DIF(F(y),y,2*k-1)]
;Simp(#4)
INT(S(2*k,(y-x)/h)*DIF(F(y),y,2*k),y,x,x+h)=
-INT(DIF(F(y),y,2*k-1)*LIM(DIF(S(2*k,@),@),@,(y-x)/h,0),y,x,x+h)/h+
LIM(S(2*k,(y-x)/h)*DIF(F(y),y,2*k-1),y,x+h,0)-
LIM(S(2*k,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,0)
[U(y)=DIF(F(y),y,2*k-1),U(y):=]
;Simp(User) INT(S(2*k,(y-x)/h)*DIF(F(y),y,2*k),y,x,x+h)=
-INT(U(y)*LIM(DIF(S(2*k,@),@),@,(y-x)/h,0),y,x,x+h)/h+
U(x+h)*S(2*k,1)-U(x)*S(2*k,0)
[S(k,x):=k*SUM(p^(k-1),p,1,x-1),k:epsilonInteger (1, inf)]
;User=Simp(User)
[S(2*k,1),S(2*k,0)]=[0,0]
[S(k,x):=,B(k):=]
;Simp(User) INT(S(2*k,(y-x)/h)*DIF(F(y),y,2*k),y,x,x+h)=
-INT(U(y)*LIM(DIF(S(2*k,@),@),@,(y-x)/h,0),y,x,x+h)/h
LIM(DIF(S(2*k,@),@),@,(y-x)/h,0)=LIM(DIF(S(2*k,t),t),t,(y-x)/h,0)
[DIF(S(k,x),x)=k*(S(k-1,x)+B(k-1)),k>2]
;Sub(User)
DIF(S(2*k,t),t)=(2*k)*(S(2*k-1,t)+B(2*k-1))
;Sub(#13')
LIM(DIF(S(2*k,@),@),@,(y-x)/h,0)=
LIM((2*k)*(S(2*k-1,t)+B(2*k-1)),t,(y-x)/h,0)
B(k):=IF(k=0,1,IF(k=1,-1/2,-k*ZETA(1-k)))
;Simp(#16')
LIM(DIF(S(2*k,@),@),@,(y-x)/h,0)=2*k*S(2*k-1,(y-x)/h)
;Simp(User)
INT(S(2*k,(y-x)/h)*DIF(F(y),y,2*k),y,x,x+h)=
-2*k*INT(U(y)*S(2*k-1,(y-x)/h),y,x,x+h)/h
U(y):=DIF(F(y),y,2*k-1)
;Simp(#19)
INT(S(2*k,(y-x)/h)*DIF(F(y),y,2*k),y,x,x+h)=
-2*k*INT(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,x+h)/h
Evaluate the integral.
|
|
|
|
This can be simplified using the two idenities. For
.
|
|
|
|
We also know
so it simplifys even more.
|
|
Substitute that result into the integral.
|
|
;Simp(User') M(k,x,h)=
-INT(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,x+h)/(h*(2*k-1)!)
Substitute the integral in the definition of
.
|
|
M(k,x,h):=INT(S(2*k,(y-x)/h)*DIF(F(y),y,2*k),y,x,x+h)/(2*k)!
M(k,x,h)=-INT(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,x+h)/(h*(2*k-1)!)
[V(y):=S(2*k-1,(y-x)/h), U(y):=DIF(F(y),y,2*k-2)]
;Simp(#5) INT(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,x+h)=
-INT(DIF(F(y),y,2*k-2)*LIM(DIF(S(2*k-1,@),@),@,(y-x)/h,0),y,x,x+h)/h+
LIM(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-2),y,x+h,0)-
LIM(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-2),y,x,0)
[U(y)=DIF(F(y),y,2*k-2),U(y):=]
;Simp(User) INT(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,x+h)=
-INT(U(y)*LIM(DIF(S(2*k-1,@),@),@,(y-x)/h,0),y,x,x+h)/h+
U(x+h)*S(2*k-1,1)-U(x)*S(2*k-1,0)
[S(k,x):=k*SUM(p^(k-1),p,1,x-1),k:epsilonInteger (1, inf)]
;User=Simp(User)
[S(2*k-1,0),S(2*k-1,1)]=[0,0]
[S(k,x):=,B(k):=]
;Simp(User) INT(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,x+h)=
-INT(U(y)*LIM(DIF(S(2*k-1,@),@),@,(y-x)/h,0),y,x,x+h)/h
LIM(DIF(S(2*k-1,@),@),@,(y-x)/h,0)=LIM(DIF(S(2*k-1,t),t),t,(y-x)/h,0)
[DIF(S(k,x),x)=k*(S(k-1,x)+B(k-1)),k>2]
;Sub(User)
DIF(S(2*k-1,t),t)=(2*k-1)*(B(2*k-2)+S(2*k-2,t))
;Simp(User)
LIM(DIF(S(2*k-1,@),@),@,(y-x)/h,0)=
(2*k-1)*(B(2*k-2)+S(2*k-2,(y-x)/h))
;Simp(User)
INT(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,x+h)=
(1-2*k)*(B(2*k-2)*INT(U(y),y,x,x+h)+
INT(U(y)*S(2*k-2,(y-x)/h),y,x,x+h))/h
U(y):=DIF(F(y),y,2*k-2)
;Simp(User) INT(S(2*k-1,(y-x)/h)*DIF(F(y),y,2*k-1),y,x,x+h)=
(1-2*k)*(B(2*k-2)*(LIM(DIF(F(y),y,2*k-3),y,x+h,0)-
LIM(DIF(F(y),y,2*k-3),y,x,0))+
INT(S(2*k-2,(y-x)/h)*DIF(F(y),y,2*k-2),y,x,x+h))/h
Integrate
by parts again.
|
|
Evaluate the integral.
|
|
|
|
This can be simplified using the two idenities. For
.
|
|
|
|
Substitute that result into the integral.
|
|
|
|
;Simp(User') M(k,x,h)=
(INT(S(2*k-2,(y-x)/h)*DIF(F(y),y,2*k-2),y,x,x+h)-
B(2*k-2)*(LIM(DIF(F(y),y,2*k-3),y,x+h,0)-
LIM(DIF(F(y),y,2*k-3),y,x,0)))/(h^2*(2*k-2)!)
;User=Simp(User) M(k-1,x,h)=
INT(S(2*(k-1),(y-x)/h)*DIF(F(y),y,2*(k-1)),y,x,x+h)/(2*k-2)!
;User=Simp(User) M(k,x,h):=
M(k-1,x,h)*(2*k-2)!=
INT(S(2*(k-1),(y-x)/h)*DIF(F(y),y,2*(k-1)),y,x,x+h)
;Simp(User) M(k,x,h)=B(2*k-2)*(LIM(DIF(F(y),y,2*k-3),y,x+h,0)-
LIM(DIF(F(y),y,2*k-3),y,x,0))/(h^2*(2*k-2)!)+M(k-1,x,h)/h^2
Substitute the integral in the definition of
.
|
|
Expand the integral.
|
|
Form the definition we can see
.
|
|
We substitute
in the recurrence relation for
.
|
|
Our interest is in approximating the sum
We really do not care what
is.
We know what
is.
|
|
Reorder the equation to be more useful.
|
|
Reorder the recurrence relation for
.
|
|
We can get
from
from this recurrence relation with
.
|
|
We can get
from
from the recurrence relation.
|
|
|
|
We can get
from
from the recurrence relation.
|
|
Substitute this for
in a previous equation.
|
|
|
|
Now we can verify some examples using DERIVE.
;Simp(User') M(k,x,h):=
IF(k=1,-F(x+h)/(2*h)-F(x)/(2*h)+INT(F(y),y,x,x+h)/h^2,
B(2*k-2)*(LIM(DIF(F(y),y,2*k-3),y,x+h,0)-
LIM(DIF(F(y),y,2*k-3),y,x,0))/(h^2*(2*k-2)!)+M(k-1,x,h)/h^2)
(F(x+h)+F(x))/2=INT(F(y),y,x,x+h)/h+
SUM(h^(2*k-1)*B(2*k)*(LIM(DIF(F(y),y,2*k-1),y,x+h,0)-
LIM(DIF(F(y),y,2*k-1),y,x,0))/(2*k)!,k,1,l)-h^(2*l+1)*M(l+1,x,h)
l=12
;Simp(Sub(#3)) true
Now using derive we can find
F(x):=
B(k):=
M(k,x,h):=
;Sub(User)
(F(x+h)+F(x))/2=INT(F(y),y,x,x+h)/h+
SUM(h^(2*k-1)*B(2*k)*(LIM(DIF(F(y),y,2*k-1),y,x+h,0)-
LIM(DIF(F(y),y,2*k-1),y,x,0))/(2*k)!,k,1,l)-h^(2*l+1)*M(l+1,x,h)
This is results on the previous page.
|
|
|
|
SUM(F(x0+j*h),j,0,n)=F(h*n+x0)/2+F(x0)/2+
SUM(F(h*j+x0),j,1,n)/2+SUM(F(h*j+x0),j,0,n-1)/2
Expand the sumation into four parts.
|
|
;Sub(User)
SUM(F(h*j+x0),j,0,n)=F(h*n+x0)/2+F(x0)/2+
SUM((F(h*j+h+x0)+F(h*j+x0))/2,j,0,n-1)
Combine two of the parts.
|
|
;Sub(#5)
(F((x0+j*h)+h)+F(x0+j*h))/2=
INT(F(y),y,x0+j*h,(x0+j*h)+h)/h+
SUM(h^(2*k-1)*B(2*k)*(LIM(DIF(F(y),y,2*k-1),y,(x0+j*h)+h,0)-
LIM(DIF(F(y),y,2*k-1),y,x0+j*h,0))/(2*k)!,k,1,l)-
h^(2*l+1)*M(l+1,x0+j*h,h)
Substitute for the last part.
|
|
|
|
;Sub(#7)
SUM(F(h*j+x0),j,0,n)=F(h*n+x0)/2+
F(x0)/2+SUM(INT(F(y),y,x0+j*h,(x0+j*h)+h)/h+
SUM(h^(2*k-1)*B(2*k)*(LIM(DIF(F(y),y,2*k-1),y,(x0+j*h)+h,0)-
LIM(DIF(F(y),y,2*k-1),y,x0+j*h,0))/(2*k)!,k,1,l)-
h^(2*l+1)*M(l+1,x0+j*h,h),j,0,n-1)
;Simp(#9)
SUM(F(h*j+x0),j,0,n)=F(h*n+x0)/2+F(x0)/2+
SUM(-h^(2*l+1)*M(l+1,h*j+x0,h)+INT(F(y),y,h*j+x0,h*j+h+x0)/h+
SUM(h^(2*k)*B(2*k)*(LIM(DIF(F(y),y,2*k-1),y,h*j+h+x0,0)-
LIM(DIF(F(y),y,2*k-1),y,h*j+x0,0))/(2*k)!,k,1,l)/h,j,0,n-1)
;Sub(#11)
SUM(F(h*j+x0),j,0,n)=F(h*n+x0)/2+F(x0)/2+
(-h^(2*l+1)*SUM(M(l+1,h*j+x0,h),j,0,n-1)+ INT(F(y),y,x0,h*n+x0)/h+
SUM(h^(2*k)*B(2*k)*(LIM(DIF(F(y),y,2*k-1),y,h*n+x0,0)-
LIM(DIF(F(y),y,2*k-1),y,x0,0))/(2*k)!,k,1,l)/h)
Simplify the sums.
|
|
|
|
File translated from
TEX
by
TTM,
version 3.01.
On 5 Jul 2001, 00:33.