fredrik-johansson / fungrim

Fungrim: the Mathematical Functions Grimoire
MIT License
119 stars 15 forks source link

Sign of remainder term in Euler-Maclaurin formula (ce2272) may be incorrect? #32

Open jscott0 opened 1 year ago

jscott0 commented 1 year ago

Hi,

I write "may" since many books have different conventions for representing the Bernoulli polynomials, but having reviewed the conventions that Fungrim follows, I think the sign of the remainder term needs to be negative. I am referring to Asymptotic Methods in Analysis by N. G. be Bruijn which states the Euler-Maclaurin summation formula in almost exactly the same form, but with a negative sign on the remainder. Having reviewed the integration by parts derivation of the formula very closely, I believe the book is correct and Fungrim is probably in error.

When doing the integration by parts, the signs alternate on the remainder term, but since Fungrim always refers to the 2m'th Bernoulli polynomial, the sign should always be negative I believe.