Is the interval for the middle point of the Mean Value Theorem open or closed? Please help me understand some math that my teacher wrote.
He defined the (Lagrange) MVT as:

If $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$, then $\exists c\in(a,b)$ such that:
$f(b) - f(a) = f'(c)(b-a)$.

This makes sense. But then he said that, in fact, one could write $c\in[a,b]$ instead.
He then let $c = a$ and wrote $f'(c)$. I think this is wrong because $f(x)$ might not be differentiable at $a$.
He told me to consider $f(x) = \sqrt{x}$.
Am I missing something, or did he make a mistake?
Edit: More context. This was a question on an exam and I got it correct (other than leaving out $f\in C[a,b]$), but when he went over the solutions in class, he said the $c\in(a,b)$ could be $c\in[a,b]$.

 A: With your edited question,

*

*your typed statement of the MVT starts "If $f$ is continuous on $[a,b]$ and ..."


*while your handwritten answer starts "Let $f \in C^1(a,b) \implies \cdots$"
Your teacher corrected this to $[a,b]$, as you need continuity at $a$ and $b$ for the theorem to apply
A: The Mean Value Theorem states $c \in (a,b)$, i.e. the interval is open. I'm not sure why your teacher would state it with $c \in [a,b]$, as $c \in (a,b)$ is a stronger result. And you're right that $c \in \{a,b\}$ doesn't make sense when differentiability at $a,b$ is not specified. There are of course examples where $f'(a) = \frac{f(b)-f(a)}{b-a}$, e.g. if $f$ is the constant function $f=0$ and $[a,b]$ is some interval, then $f'(a) = 0 = \frac{f(b)-f(a)}{b-a}$. The Mean Value Theorem dictates that some $c \in (a,b)$ must satisfy this too though.
I definitely don't get your teacher's example of $f(x) = \sqrt{x}$. The derivative of this function is strictly decreasing, so anytime $[a,b]$ is an interval on the domain, $c \in (a,b)$ has $f'(b)(b-a) < f'(c)(b-a) < f'(a)(b-a)$, so not only do we not need to consider the endpoints $a,b$, but the endpoints never work.
EDIT: The commenter @Henry is right that if $a = b$ and if $f$ is differentiable at this point, then we always have $f(b) - f(a) = f'(a) (b-a) = 0$. One could define $[a,a] = \{a\}$, so $a \in [a,a]$ as needed. Meanwhile, one could define $(a,a) = \varnothing$, so there is no $c \in (a,a)$ to consider in this case. Maybe this is what your teacher means, although I'm not sure what the point is of considering this. The Mean Value Theorem generally has the condition $a < b$.
A: Everything is upon the proof of the Mean Value Theorem, and that proof rely on Rolle's Theorem, in wich necessarily $c\in (a,b)$, otherwise the MVT does not take place.
