$f(x)$ can be shown as $1 + x^2$ when $x\le0, x-2$ when $0<x\le2, (x-2)^2$ when $x>2$. Find an interval $\left[a,b\right]$ and a real value $L$ between $f(a)$ and $f(b)$ but there does not exist a real number $c$ which is in the range $(a,b)$ with $f(c) = L$. Why this does not contradict the intermediate value theorem?
I found the discontinuous places of $f(x)$ and I sketched the graph. I want to know a complete explanation for the above question. Please help me
One possible choice is to let $a=0$, $b=2$, and $L=\frac12$.
Notice that $f(a) = 1$ and $f(b) = 0$ and hence $L$ is in between $f(a)=1$ and $f(b) = 0$.
Now, suppose $c$ is in $(a,b)$, $$a<c<b$$ $$0<c<2$$ $$-2<c-2<0$$ $$-2<f(c)<0$$
Hence if $c \in (a,b)$, we must have $f(c) <0$ and hence $f(c) \neq \frac12$.
Intermediate value theorem requires continuity which is not satisfied in this function.