# Which type of Riemann Sum is the most accurate?

When estimating the area under a curve, is it more accurate to average out the values of the upper and lower sums or use the midpoints of the intervals instead?

I would assume it varies but I just wanted to know what the best way is to estimate the area under a curve when no instructions on how to do so have been given.

• All the methods you have listed are only estimates. None of them are exact. The 'best' way of finding the area is integration. – Landuros Jan 14 '18 at 3:40

Your question is about the error analysis of Numerical Methods of approximating a definite integral.

Both midpoint rule and trapezoidal rule have a global error which is $O(h^2)$ where $h=(b-a)/n$ is the step size.

That means if you double your $n$ the error divides by $4$.

Among the midpoint and the trapezoidal rules, the midpoint is the better choice because its error estimate is half of the trapezoidal rule.

The error estimate for trapezoidal rule is $$-\frac {(b-a)h^2}{12}f''(\eta)$$While the error estimate for the midpoint rule is $$\frac {(b-a)h^2}{24}f''(\eta)$$where $\eta \in [a,b]$ depends on the function.

• Note that the two $\eta$'s are different in general. While midpoint is "usually" better, there are cases where the trapezoidal rule turns out to be better. – Robert Israel Jan 14 '18 at 6:03
• The midpoint error can be larger than the trapezoidal error when the integrand exhibits a high degree of curvature in a small subinterval. See here. – RRL Jan 14 '18 at 7:07
• There are other quadrature methods that converge even faster. – Wouter Jan 14 '18 at 9:42
• Yes, Simpson Method, comes next. Gaussian quadrature is a jem and many Gaussian type quadratures exist. – Mohammad Riazi-Kermani Jan 14 '18 at 10:33