We were recently asked in class whether $f:X \to \mathbb{R}$ with $f'\equiv 0$ implies $f$ is constant.
Of course, if we take $X=(0,1)\cup (2,3)$ with $$f(x)=1\text{ when } x\in (0,1)$$ $$f(x)=2\text { when } x \in (2,3)$$
I could work out through this. Then I thought whether taking $X=[0,1]\cup [2,3]$ would yield the same result. I am confused whether $f'(1)$ would be $0$ or not, since of course right hand limit does not exist.