Function defined on a closed interval must be bounded? Intuitively, if a function $f$ is defined on $[a, b]$, then it must be bounded. Is there a theorem for this? I remember reading something related to this, but not the details. 
 A: Define $f \colon [0,1] \to \mathbb{R}$ by $f(x)=1/x$ for $x \in (0,1]$ and $f(0)=0$.
You probably remember a theorem (Weierstrass theorem) about continuous functions.
A: Theorem: If $f:[a,b]\rightarrow \mathbb{R}$ is a continuous funcion then $f([a,b])$ is a compact set. In particular, there is $x_m\in [a,b]$ and $x_M\in [a,b]$ such that $f(x_m)\leq f(x)\leq f(x_M)$ for every $x\in [a.b]$.
Well, this theorem said if you have a continuous function defined on compact interval then it is bounded. But $f:[0,+\infty)\rightarrow \mathbb{R}$ defined by $f(x)=x$ is defined on closed set but does not bounded.
A: My approach is, if $f(x)$ is bounded at each point of $D=[a,b]$ there is a neighbourhood $N(x)$ of $x$ s.t $f$ is bounded on $N(x)\cap D$. Consider $G=\{N(x):x\in D\}$ s.t $f$ is bounded on $N(x)\cap D$.Clearly $G$ is open cover of $D$ since $D$ is closed and bounded set in $\mathbb{R}$ by Heine-borel theorem there exists a finite subcollection $G'$ of $G$ s.t $G'$ also covers D. Let $G'=\{N(x_1),..,N(x_m)\}$ then $D\in N(x_1)\cup ... \cup N(x_m)$ & $f$ is bounded on $D\cap N(x_i)$ for $i=1,...,m$ .So there exists a +ve $M_i$ s.t $|f(x)|\leq M_i$ for all $x\in D\cap N(x_i)$ , $i=1,...,m$. Let $m=\max\{M_i,i=1,...,m\}$ & let $x\in D$ so $|f(x)|\leq M$ hence the proof.
