# if $f$ is continuous on $(a,b)$, then $f$ has a maximum - Proof refutation

So I adapted this argument from one that assumes a closed interval, but I can't see why the arguement fails (even though I think it should) if we're talking about an open interval

Theorem if $$f$$ is continuous on $$(a,b)$$, then $$\exists y \in (a,b)$$ such that $$f(y) \geq f$$

Let $$A = \big \{ f(x) : x \in (a, b) \big \}$$

$$A$$ is bounded, and obviously not empty. Hence there exists $$\alpha = \text{sup} \ A$$

Suppose $$\alpha \not \in A$$, and therefore $$\alpha > f(x)$$

Consider $$(g \circ f) (x) = \dfrac{1}{\alpha - f(x)}$$

We know $$\alpha - f(x) \in \mathbb{P}$$, therefore $$g$$ is cts. everywhere

Consider $$\alpha - \epsilon < b$$. It is certainly not an upper bound, and so there exists $$f(x') \in A$$ where $$f(x') > \alpha - \epsilon$$.

\begin{align*} &\phantom{\Rightarrow}\alpha - \epsilon < f(x') \\ &\Rightarrow \alpha - f(x') < \epsilon \\ &\Rightarrow \frac{1}{\epsilon} < \frac{1}{\alpha - f(x')} \\ &\Rightarrow \frac{1}{\epsilon} < (x') && \left (f(x') \in A \right) \\ &\Rightarrow N < g(x') \end{align*}

A contradiction, for $$g$$ is continuous on $$(a,b)$$ and therefore bounded above.

• What does "cts.@" mean? – Saucy O'Path May 14 at 14:40
• continuous - I'll make the correction – user_hello1 May 14 at 14:40
• The function $f(x)=x$ is a counterexample on the interval $(0,1)$. – lulu May 14 at 14:42
• @lulu lol fantastic counterexample. – Randall May 14 at 14:42
• As I said, the function $f(x)=x$ is a counterexample to your theorem on $(0,1)$. That is, there is no $y\in (0,1)$ such that $f(y)≥f(x)$ for every $x\in (0,1)$. If you meant something else, please edit accordingly. Otherwise, I suggest going through your argument using my function to see where it goes wrong. – lulu May 14 at 14:50

Your set $$A$$ need not be bounded. For example, take $$f(x) = \frac{1}{x}$$ with domain $$(0,1)$$. In particular, the resulting set $$A$$ in this example has no upper bound, so you may not use its supremum as in your argument.