Proving the inequality $\bigg|\int_a^b f(x) \, dx - \frac{b-a}{n} \sum_{k=1}^n f\big(a + \frac{2k-1}{2n}(b-a)\big) \bigg| < \frac{C}{n^2}$ Suppose $f$ is twice differentiable and $|f''(x)| < B,$ some constant.  Using Taylor's theorem, it is easy to show that $$\big|2Af(0) - \int_{-A}^A f(x)\;dx\big| < \frac{A^3B}{3}.$$
I am looking to use this result in proving the following estimate,
$$(*) \;\;\;\;\;\;\; \bigg|\int_a^b f(x) \, dx - \frac{b-a}{n} \sum_{k=1}^n f\big(a + \frac{2k-1}{2n}(b-a)\big) \bigg| < \frac{C}{n^2},
$$
where $C$ is a constant that doesn't depend on $n.$

I see that the summation part of $(*)$ is an estimate for $\int f\,dx$ that works by partitioning the domain into $n$ evenly spaced intervals, and multiplies the value of $f$ at the midpoint of those intervals by the width of the interval.  Seems similar to the trapezoidal method for estimating integrals.  The first estimate estimates $f$ at the midpoint of the interval $[-A,A],$ so I see why it is relevant but I have not been able to give a satisfactory proof linking these.
Any hints/help? Thanks in advance.

Consider a partition with points
$$x_k = a + k\frac{b-a}{n}.$$ Define 
$$c_k = \frac{x_{k-1} +x _k}{2} = a + (2k-1)\frac{b-a}{2n}.$$
Assuming that $f \in C^2([a,b]),$ consider the Taylor expansion with remainder
$$f(x) = f(c_k) + f'(c_k)(x - c_k) + \frac{1}{2}f''(\xi_k)((x - c_k)^2.$$
Integrate both sides over $[x_{k-1},x_k],$ to get
$$ \int_{x_{k-1}}^{x_k}f(x) \, dx = \frac{b-a}{n}f(c_k) + f'(c_k)\int_{x_{k-1}}^{x_k}(x - c_k) \, dx  + \frac{1}{2}\int_{x_{k-1}}^{x_k}f''(\xi_k)(x- c_k)^2 \, dx.  $$
Note that
$$\int_{x_{k-1}}^{x_k}(x - c_k) \, dx = 0.$$
Hence, when the second derivative is bounded,
$$\left|\int_{x_{k-1}}^{x_k}f(x) \, dx - \frac{b-a}{n}f(c_k)\right| =  \left|\int_{x_{k-1}}^{x_k}f''(\xi_k)(c_k - x)^2 \, dx\right| \\ \leqslant \int_{x_{k-1}}^{x_k}|f''(\xi_k)|(c_i - x)^2 \, dx \\ \leqslant M\int_{x_{k-1}}^{x_k}(c_k - x)^2 \, dx \\ = \frac{2M(b-a)^3}{24n^3}$$
Summing over $k = 1,2, \ldots, n,$ we get
$$\left|\int_{a}^{b}f(x) \, dx - \frac{b-a}{n}\sum_{k=1}^nf(c_k)\right| \leqslant \frac{M(b-a)^3}{12n^2}.$$
