Analysis question about $f$ and $g$, differentiable on $\mathbb R$ Let $f, g$ be differentiable on $\mathbb R$ and suppose that $f(0) = g(0)$ and $f'(x) \le g'(x)$ for all $x \ge 0$.  Show that $f(x) \le g(x)$ for all $x \ge 0$.
This seems intuitive to me but I don't even know how to get started.  Is there a theorem that makes this an obvious conclusion, like Rolle's or Darboux's?  Any help is appreciated.  Thanks!
 A: Hint: Apply the Mean Value theorem to $g(x) - f(x)$ on the interval $[0, a]$.
A: An essential point is that the result is not true if the domain has gaps.  Any statement involving derivatives that fails when the domain has gaps should make you think of the mean value theorem.
Suppose the domain could be partitioned into two sets $A$ and $B$, so that $A\cup B=\text{domain}$ and every member of $A$ is less than every member of $B$; and for every member of $A$ there is some larger member of $A$ and for every member of $B$ there is some smaller member of $B$.  That would be a gap.  Then you could have $0\in A$ and $f(0)=g(0)=0$ and $f'(x)=g'(x)$ for every $x$ in the domain, and yet there could be points $x\in A$ and $y\in B$ such that $f(x)>f(y)$.  For example, this happens with $f(x) = 1/(1-x)$ and $g(x)=0$.
So, as someone has already pointed out, apply the mean value theorem on the interval from $0$ to some positive number.
A: The only theorem you need is that if $f'(x) \geq 0$ on an interval, then $f$ is increasing on that interval.
Let $h(x) = g(x) - f(x).$ Then, $h'(x)=g'(x)-f'(x) \geq 0$ for $x \geq 0$ so $h(x)$ is increasing on $[0, \infty).$ Therefore, if $x \geq 0$, $h(0) \leq h(x)$, and then since $h(0) = 0$ we get that $0 \leq h(x) = g(x) - f(x)$, or $f(x) \leq g(x).$
