a) Let $f : [a, b] → \mathbb{R}$ be a (not necessarily continuous) function with the property that, for every $x ∈ [a, b]$, there is a number $δ_x > 0$ for which $f$ is bounded on the neighborhood $Vδ_x (x)$ of $x$. Prove that the function f is bounded on the interval $[a, b]$.
b. Does the result of part a hold if the interval is $(a, b)$?
My proof for a: Let $k = [a, b]$. If $f(k)$ is not bounded, the for all $n \in \mathbb{N}$, there exist a sequence $\{y_n\}$ is a subset of $f(k)$ such that $|y_n| > n$. Let $\{x_n\}$ be a subset of $K$ satisfy $f(x_n) = y_n$. Then seq $\{x_n\}$ is bounded. So we extract convergent subsequences with $x_{n_j}$ converges to $x$ as $j$ goes to infinity. Since $K$ is closed, $x \in K$. By sequence criterion for continuity, $y_{n_j} = f(x_{n_j})$ converges to $f(x)$ . But $|y_{n_j}| > n_j \geq j$. This is a contradiction since unbounded sequences are divergences. Thus $f(k)$ is bounded.
Is this proof good ?
For part b, could someone give some hints how to proceed this proof?