Several questions on the mean value theorem? Fisrt here is the theorem :"Let $f : [a, b] → \mathbb{R}$ be a continuous function on the closed interval $[a, b]$, and differentiable on the open interval $(a, b)$, where $a < b$. Then there exists some $c \in (a, b)$ such that : $f(b)-f(a)=f'(c)(b-a)$".
So first, if $\lim \limits_{x \to a}f(x)= -\infty$ and  $\lim \limits_{x \to b}f(x)= +\infty$ does this theorem work ? If it does why ?
Second, if we substitute $[a,b]$ to $\bar {\mathbb{R}}=\mathbb{R}\cup\{-\infty,+\infty\}$
does the theorem is equal to the first form ? ($\bar {\mathbb{R}}$ is a compact set.)
Thanks in advance.
PS : I try to prove some generalizations of this theorem.

If $f$ is continuous on $[a,b]$, then $\lim_{x\to a}f(x)=f(a)$ and $\lim_{x\to b}f(x)=f(b)$ are never equal to $\pm\infty$.
For the second question, if $[a,b]=[-\infty,\infty]$, what is $(f(b)-f(a))/(b-a)$? 
In the case where we can make sense of it, the result is not true in general. Consider for example $f(x)=\arctan x$. Then $f(\pm\,\infty)=\pm\,\pi/2$ and it is reasonable to set $(f(a)-f(a))/(b-a)=0$, but $f'(x)>0$ for all $x\in(-\infty,\infty)$.
