Replacing $\inf/\sup$ by $\max/\min$ in the definition of the Riemann upper/lower sum

definitionreal-analysisriemann-integration

In chapter $13$ in Spivak Calculus in the beginning of Integrals chapter he introduced a new definition which is as follow :

Suppose $f$ is bounded on $[a,b]$ and $P$ is a partition of $[a,b]$ . Let

$m_{i}=inf\{ f(x):t_{i-1}\le x \le t_{i}\}$

$M_{i}=sup\{ f(x):t_{i-1}\le x \le t_{i}\}$

then the Lower sum denoted by $L(f,P) =\sum_{i=1}^{n} m_{i}(t_{i}-t_{i-1})$

and the Upper sum denoted by $U(f,P)=\sum_{i=1}^{n} M_{i}(t_{i}-t_{i-1})$

My question is as follows :Is the using of $inf$ and $sup$ insted of $max$ and $min$ indicates that the function may not be well defined at the end points of the interval which is $a$ and $b$ $?$

because I read that the function to be riemann integrable must be defined on the whole interval $[a,b]$ so does the definition in Spivak mean something else or not

Best Answer

The definition uses $\inf$ and $\sup$ because the sets $\{f(x)\mid t_{i-1}\leqslant x\leqslant t_i\}$ is bounded (since $f$ is bounded) and non-empty, and therefore they have a supremum and and an infimum. But those sets don't have to have a maximum or a minimum. For instance, if $a=0$, $b=1$, $P=\{0,1\}$, and$$f(x)=\begin{cases}\cos(\pi x)&\text{ if }x\in[0,1]\setminus\Bbb Q\\0&\text{ otherwise,}\end{cases}$$then $\{f(x)\mid0\leqslant x\leqslant1\}$ has no maximum or minimum. But its supremum is $1$ and its infimum is $-1$.