# Example of the Extreme Value Theorem not holding over the rational numbers

I'm reading some notes, and on page 11 the author uses the function f(x):[0,2], f(x) = 1/(x^2 - 2) over the rational numbers to show that the extreme value theorem doesn't hold(over the rationals).

I'm wondering if it's correct to even apply the extreme value theorem for this function - isn't one of the requirements that the function be bounded(which this one isn't)?

Apologies for the lack of formatting, I have no knowledge about that (yet).

• A much easier example would be $f:[0,\sqrt{2}]\rightarrow\mathbb{R}$, $f(x)=x^2$... – JP McCarthy May 29 '14 at 8:33
• On page 111 of the notes you linked, the only condition is that $f$ be continuous on a closed finite interval. That $f$ is bounded is part of the conclusion of the theorem, not a requirement. – David May 29 '14 at 8:43

As pointed out in the comments, that example does work. But if it makes you feel better, think about $\sin(x)$ on, say, $[0,2]$. The maximum of $\sin$ occurs at $x= \pi/2, 5\pi/2$, etc., none of which are rational. You can show that $\sin(x)$ has no maximum on the rational numbers in $[0,2]$, since you can plug in rational values of $x$ arbitrarily close to $\pi/2$ and the $y$-values approach 1, but never get there.