# Need a function be continuous on a closed interval for the constitution of Intermediate Value Theorem?

The statement for Intermediate Value Theorem is thus:

Let $$f$$ denote a function that is continuous on the closed interval $$[a, b]$$ and suppose $$f(a)\neq f(b)$$. If $$N$$ is any number between $$f(a)$$ and $$f(b)$$, then there is at least one number $$c$$ in $$(a,b)$$ so that $$f(c)=N$$.

But who is to stop me if I put it like this?

Let $$f$$ denote a function that is continuous on the open interval $$(a, b)$$. Now, $$\lim\limits_{x\to a^+} f(a)=L$$ and $$\lim\limits_{x\to b^-} f(b)=M$$. Suppose, $$L\neq M$$. If $$N$$ is any number between $$L$$ and $$M$$, then there is at least one number $$c$$ in $$(a,b)$$ so that $$f(c)=N$$.

• The only problem here is that $\lim_{x\to a^+}f(x)$ may not exist. For example, $1/x$ or $\sin(1/x)$ is continuous on the open interval $(0,1)$, but has no limit as $x\to0^+$. – mr_e_man Oct 10 at 20:44

In fact, with $$f$$ as in your suggestion, define $$g\colon[a,b]\to \Bbb R$$, $$g(x)=\begin{cases}f(x)&a Then the classical IVT applied to $$g$$ is equivalent to your variant applied to $$f$$. With this in mind, the standard formulation looks perhaps more appealing.
• But what if $L$ or $M$ doesn't exist? – mr_e_man Oct 10 at 20:12
Your version follows from the previous version. Let $$F(x)=f(x)$$ for $$a , $$F(a)=L$$ and $$F(b)=M$$. Then $$F$$ is continuous on $$[a,b]$$ and the first version applied to $$F$$ gives you the new version.
The statement of intermediate value theorem is what you have writtem in the $$1$$st statement.But who told you that if the statement of intermediate value theorem is that one,then we cannot say that what you have written next is false.In fact if you take $$I$$ as any interval domain,then for any two points $$x_1,x_2$$ in $$I$$ consider restriction of $$f$$ on $$[x_1,x_2]$$,then apply intermediate value theorem,this will give you the generalized result. i.e. If $$f:I\to R$$ is a continuous fucntion on an interval domain $$I$$ then if $$f$$ takes 2 values at $$x_1$$ and $$x_2$$,then it will take all values between the 2 values for some $$x$$ lying between $$x_1$$ and $$x_2$$.