Let’s have a look at that bell-shaped function:

f[x_]:=Exp[-x^2]
a=0;
b=1;
Plot[f[x],{x,a,b},AxesOrigin->{0,0}]
integral=Integrate[f[x],{x,a,b}] (* Mathematica uses the Erf function, which is a numerical approximation to this integral -- because we can't evaluateit analysically! :) *)
integral=N[integral]

Compare the five methods on a single “panel”:  n=1

n=1
lrr=N[f[a]]
rrr=N[f[b]]
trap=(lrr+rrr)/2
mid=N[f[(b-a)/2]]
simp=(2*mid+trap)/3
integral

Compare the errors to the bounds of the “trapezoid-like” methods:

You have to study the second derivative over the interval of interest, to find out where it takes its largest absolute value (the K2 in the error formulas).

fpp[x_]=Simplify[D[f[x],{x,2}]]
Plot[Abs[fpp[x]],{x,a,b}]
k2=5.0 (* Not a particularly good choice.... *)

trapError=Abs[trap-integral]
trapBound=(k2(1-0)^3)/(12*1^2)

midError=Abs[mid-integral]
midBound=(k2(1-0)^3)/(24*1^2)

Solve[.0001 == (k2(1-0)^3)/(12*x^2),x]
trapBound=(k2(1-0)^3)/(12*65^2)

Compare the errors to the bounds of Simpson’s rule:

You have to study the fourth derivative over the interval of interest for Simpson’s rule, to find out where it takes its largest absolute values (the K4 in the error formula).

fpppp[x_]=Simplify[D[f[x],{x,4}]]
Plot[Abs[fpppp[x]],{x,a,b}]
k4=20.0 (* Not a particularly good choice.... *)

simpError=Abs[simp-integral]
simpBound=(k4(b-a)^5)/(180*(2n)^2) (* Note the (2n)^2 in the denominator*)