Skip to content

eulermaclaurin

specfun · scripts/specfun/eulermaclaurin.m

: q = eulermaclaurin (f, a, b, n)
: q = eulermaclaurin (f, a, b, n, terms)

Approximate integral (f, a, b) with the Euler–Maclaurin formula.

Composite trapezoidal rule on n panels with terms Bernoulli endpoint corrections (default 2). f must be a function handle that accepts a scalar real argument. n is a positive integer panel count; terms is a nonnegative integer count of even Bernoulli corrections (B_2, B_4, …).

MATLAB R2026a does not ship this name; the signature follows the Nexus next-wave math-011 contract (nexus#1855). Prefer integral / quadgk for adaptive quadrature.