Claim 1: If $f: [a, b] \rightarrow \mathbb{R}$ is continuous, then $f$ assumes a maximum value
I know there's a theorem that states if $f$ is a continuous real-valued function on a closed interval $[a, b]$, then $f$ is a bounded function. And $f$ assumes its max and min values on $[a, b]$.
Going back to the claim, it doesn't state that $f$ is necessarily bounded. (I understood it as $x$ are bounded, i.e., $a \leq x \leq b$, but $f(x)$ is not necessarily bounded? Since $f(x) \in \mathbb{R}$, for $a \leq x \leq b$). So I think it is false. And my counterexample is $f(x) = tan(x)$ where $-\frac{\pi}{2} \leq x \leq \frac{\pi}{2}$. Although $f: [a, b] \rightarrow \mathbb{R}$ is continuous, it is not bounded, so it does not assume a maximum value. Is my logic correct?
Claim 2: If $f: [a, b] \rightarrow \mathbb{R}$ assumes a maximum, then $f$ is continuous.
I feel like this is not necessarily true, either? Since a function might have a jump discontinuity and that point might be the max, but the function is not continuous. Would this be correct?