Using the trapezoidal rule with \(n=4\) on \(\int_0^1 e^x\,dx\), what is the approximation given nodes \(f(0)=1\), \(f(0.25)\approx1.2840\), \(f(0.5)\approx1.6487\), \(f(0.75)\approx2.1170\), \(f(1)\approx2.7183\)?
With \(h=0.25\): \(\frac{0.25}{2}[1+2(1.2840+1.6487+2.1170)+2.7183]\approx1.7272\). Omitting the factor 2 on the interior nodes gives \(1.0960\), and \(1.7183\) is the exact value \(e-1\), not an approximation.
The trapezoidal rule is a quadrature method that approximates the definite integral of a function \(f\) on \([a,b]\) by replacing the curve with the straight line joining \((a,f(a))\) and \((b,f(b))\).