Finite samples do not certify quadrature accuracy (source code)

= Finite samples do not certify quadrature accuracy
{title2=$p(x)=\prod_{j=1}^m(x-x_j)^2$}

For any finite set of <quadrature nodes> $x_1,\ldots,x_m$ in $[a,b]$, $a<b$, consider the <polynomial>
$$
p(x)=\prod_{j=1}^m(x-x_j)^2,\qquad A=\int_a^bp(x)\,dx>0.
$$
Every sample is zero, so every <quadrature rule> at these <quadrature nodes> gives $Q(p)=0$. Yet $p$ is nonnegative and strictly positive away from its finitely many <polynomial roots>; its <continuity> makes the <integral> positive. Consequently the <smooth functions> $0$ and $g(x)=p(x)/A$ have identical samples but <definite integrals> $0$ and $1$. Multiplying $g$ by any positive constant makes the difference arbitrarily large. This is an information limit, even with exact arithmetic; merely assuming smoothness without quantitative bounds does not remove it. The related <degree ceiling for quadrature exactness> uses the same squared nodal <polynomial> to limit <polynomial> exactness.

For example, the endpoint <quadrature nodes> $0,1$ give $p(x)=x^2(1-x)^2$, $A=1/30$, and $g(x)=30x^2(1-x)^2$. Both the zero <function> and $g$ produce zero under the one-panel <trapezoidal rule>, although $I(g)=1$. More generally, any estimate based only on their shared samples has <absolute error> at least $1/2$ for one of these two <integrands>, by the <triangle inequality>.

The obstruction also applies to a deterministic adaptive procedure that terminates after finitely many evaluations on the zero <function>: form $p$ using every <quadrature node> it visited. On $g$, the same zero responses lead to the same choices and answer. Certified <quadrature error> control therefore needs additional information, such as a known bound on relevant <derivatives>, rather than agreement among sampled approximations alone.