# Upper and lower Riemann sums

1. Jun 23, 2010

### AxiomOfChoice

Let $f$ be a Riemann integrable function defined on an interval $[a,b]$, and let $P = \{a = x_0 < x_1 < \ldots < x_n = b\}$ be a partition of $[a,b]$. I don't understand why the definition of (say) the upper Riemann sum of $f$ associated with $P$ is always given as
$$U(f,P) = \sum_{i=1}^n M_i (x_i - x_{i-1}),$$

where

$$M_i = \sup\limits_{x\in [x_{i-1},x_i]} f(x).$$

Why does it need to be $\sup$? Why can't it just be $\max$? I can't think of an instance where $\max$ wouldn't be suitable; that is, I can't think of a Riemann integrable function that doesn't actually attain its max somewhere on any given $[x_{i-1},x_i]$. Can someone provide an example for me?

2. Jun 23, 2010

### Martin Rattigan

$y=x$ when $x\neq 1$, $y=0$ when $x=1$ on interval $[0,1]$. Take interval $[x_{n-1},x_n]$ from the partition.