How to find the $f\left(x_i\right)$ for midpoint Riemann sum

$\begin{array}{|c|c|c|c|c|c|c|c|c|c|} \hline \mbox{Time} & \mbox{9am} & \mbox{10:30 am} & \mbox{Noon} & \mbox{1:30 pm} & \mbox{3 pm} & \mbox{4:30 pm} & \mbox{6 pm} & \mbox{7:30 pm} & \mbox{9 pm} \\ \hline t & 0 & 1.5 & 3 & 4.5 & 6 & 7.5 & 9 & 10.5 & 12 \\ \hline P\left(t\right) & 200 & 728 & 1193 & 1329 & 1583 & 1291 & 804 & 256 & 0 \\ \hline \end{array}$

Use a midpoint Riemann sum with four intervals of equal size to estimate the total number of people seeking care during the 12-hour period.

I know the formula for the midpoint Riemann sum is $\int_a^b f\left(x\right) \; \mathrm{d}x \approx \frac{b-a}{n} \left[ f\left(x_1\right) + f\left(x_2\right) + \ldots + f\left(x_n\right) \right]$

I know that $b = 12$ and $a = 0$ and $n = 4$, but what is my $f\left(x_1\right), \; f\left(x_2\right), \; f\left(x_3\right), \; f\left(x_4\right)$

-
You're going to pick $x_i$ such that it falls halfway in the $i$th interval, $[(i-1)\cdot b/n,(i)\cdot b/n]$. In general, you can see $x_i=ib/2n$. – Ian Coley Mar 20 '13 at 0:33
You should not write that the integral is equal to the Riemann sum, as it is rarely true. – 1015 Mar 20 '13 at 0:34
@julien I'll fix that. – yiyi Mar 20 '13 at 0:41

The midpoint of $[0,3]$ is $x_1=1.5$, so $f(x_1)=728$. The next interval to consider is $[3,6]$ with midpoint $x_2=4.5$. I think you can continue.

-

For $n$ points from $a$ to $b$, $x_i = a + \frac{b-a}{n}(i-\frac1{2})$.

Note that $x_1 = a + \frac1{2}\frac{b-a}{n}$ is just to the right of $a$, and $x_n = a+(n-\frac1{2})\frac{b-a}{n} = b - \frac1{2}\frac{b-a}{n}$ is just to the left of $b$.

-