Why do we need $\sup$ and $\inf$ when we have $\max$ and $\min$. In my analysis text, it seems that $\max$ and $\min$ are replaced by $\sup$ and $\inf$ for 1D single variable function, why is this the case?
 A: Because $\max$ only exists if the set contains its $\sup$. The set $\{0.9, 0.99, 0.999, 0.9999, 0.99999,...\}$ has sup 1 but no max.
A: Well there isn't always a maximum.  Consider $S=\{r\in\Bbb Q:r<2\}$.  This is a bounded set with no maximum element.  But we can say that $2$ is the smallest number which is an upper bound of $S$.
A: They're different things.  Intuitively, supremum and infimum mean least upper bound and greatest lower bound, respectively, which are different concepts from maximum and minimum.  Thus, for example, $(-\infty, 0)$, the set of all negative reals, has a sup of $0$, but no maximum value: whatever negative value $x$ you come up with, $x/2$ is greater but still negative.
A: A maximum and a minimum are attained at some value of the variable (by definition), while the supremum and the infimum (least upper bound and greatest lowerbound) are values which can be approached as close as we wish, but are not necessarily attained.
Example: on $\mathbf R$, the function $\arctan$ has a $\sup$ and an $\inf\,$ ($\frac\pi2$ and $-\frac\pi2$), but there is no $x$ such that $\,\arctan x=\frac\pi2$.
