Does the function $f(x)=x$, $x\in (0,1)$ have a maximum and minimum value? My book says that since we cannot determine the value of x when it is just less than 1 and just greater than 0, hence the function does not have a maxima or minima. But the fact confuses me because although we cannot determine those values, they still exist. Where am I going wrong?
 A: No you can't!  Remember for the maximum to exist the function actually has to assume that value in some point.
You know that $f(x) = x$ on $(0, 1)$ is always less than $1$, for example. So you can say that $\sup_{x \in (0,1)} f(x) = 1$
But that does not mean that the maximum of $f(x)$ is $1$, because $f(x)$ is never one, is it?
On the other hand, the maximum cannot be any other number, because for any number $\alpha < 1$ the function $f(x)$ is going to assume a value that is bigger than $\alpha$ (as long as $x$ is very very close to $1$, $f(x)$ can get aribitrarily close to $1$, but never gets there)
Therefore the maximum does not exist. Same thing for the minimum
A: The number you "want" to be the maximum, $1$, is called the supremum. It will satisfy your itch. 
Similarly, the infimum is $0$, which is analogous to the minimum.
The difference is that the supremum needn't be actually achieved at a point of the domain, whereas the maximum must.
Supremum/infimum are also known as least upper bound/greatest lower bound.
A: 
But the fact confuses me because although we cannot determine those values, they still exist.

No, they don't exist, because they don't exist. It can be shown that there exists no maximum or minimum for the function as defined. Keep in mind what it means for a function to be a minimum or maximum:


*

*Maximum: The maximum $f(x)$ occurs at the point $x$ such that $f(x) \geq x$ for all $x$ in the domain of $f$.

*Minimum: The minimum $f(x)$ occurs at the point $x$ such that $f(x) \leq x$ for all $x$ in the domain of $f$.


The implication here is that $f(x)$ exists for some $x$ for it to be an extreme.

Let's suppose $f(x) = x, x \in (0,1)$. Suppose it has a maximum $M$.
From the definition of $f$, then, it is clear $0 < M < 1$.
But consider the midpoint of $M$ and $1$. From the above inequality,
$$\frac{M+1}{2} < \frac{1+1}{2} = \frac{2}{2} = 1 \tag 1$$
$$\frac{M+1}{2} > \frac{0+1}{2} = \frac12 > 0 \tag 2$$
$$\frac{M+1}{2} > M \iff \frac12 > \frac M 2 \iff 1 > M \tag 3$$
We discuss:


*

*$(1)$ and $(2)$ establish the midpoint is in the image of $f$

*$(3)$ establishes the midpoint is greater than $M$. This only happens if $M < 1$, which is true from $M$'s definition.


Thus, if $M$ is the maximum, we have $(M+1)/2$ which is greater than $M$ yet also still in the image of $f$. Thus, $M$ is not the maximum, giving us the contradiction that $f$ cannot have a maximum.
An analogous proof follows for the minimum.
