We have two differentiable functions from $\mathbb{R} \rightarrow \mathbb{R}$; suppose that f'(x) \leq g'(x) for every real number $x$ and $f(0) = g(0)$; then show that $f(x) \leq g(x)$ when $x \geq 0$ and $f(x) \geq g(x)$ when $x \leq 0$
Would it be correct to use the extended mean value theorem to prove this? For instance to write there is a point $x \in (0, b)$ at which \frac{f(b) - f(0)}{g(b) - g(0)} = \frac{f'(x)}{g'(x)} \leq 1 The issue is that I can't guarantee the sign of g'(x), so I'm not even sure if this works.