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

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

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$$.
• or another example (I'm sure you know this; this is just for OP) $f(x)=x$ for $x\in (0,1)$ and $f(0)=f(1)=\frac{1}{2}$. This is a bounded function on $[0,1]$ with no minimum/maximum, but infimum/supremum of $0,1$ respectively. Aug 15 at 22:11
• @JoséCarlosSantos So we use $inf$ and $sup$ because sometimes the function can't have a $max$ or $min$ but the function must be defined on the whole interval $[a,b]$ to be riemann integrable on the interval $[a,b]$, is that right ? Aug 15 at 22:27