I'm having some confusion in the proof of Darboux's Theorem. It appears similar questions have been asked before, but I'm still confused by the replies, so I thought I would ask my own.
Here is my proof. Let $g(x) = f(x) - \gamma x$
Assume $f'(a) < f'(b)$ w.l.o.g.
We know $f'(a) < \gamma < f'(b)$ by hypothesis.
So, $f'(a) - \gamma = g'(a) < 0$ and $f'(b) - \gamma = g'(b) > 0$
Since $g'(a) < 0$ and $g'(b) > 0$, (opposite signs) we know $\exists c$ such that $g'(c) = 0$
That step right there is my confusion. I am basically using the IVT to claim there is a value in between. However, to use the IVT, the function has to be continuous. That is not an assumption in the problem, only that $f$ is continuous. I've found this question asked a couple of times, but the common reply seems to be that the derivative need not be continuous to have the intermediate value property because of Darboux's Theorem. But I am trying to prove Darboux's Theorem! So while I believe that fact, I can't use the theorem within its proof. I cannot seem to justify that step in the event that $g'$ is discontinuous.
I have been told there is another version of the proof combining the MVT and IVT. However, I've found it online in a few places, and I'm having a hard time following it. So I am trying to figure out how to do it this way since I don't understand the other way. Can someone explain to me why I can use the IVT without the derivative being continnuous?