What is the bound on a function $f(x)$ given that $|f'(x)| \leq |g'(x)|$? Suppose you know that $|f'(x)| \leq |g'(x)|$ for some interval on the real line. Is it possible to infer a bound on $|f(x)|$ in terms of $g(x)$?
Maybe you can use the Mean Value Theorem to do so? If so, what additional assumptions do you need about $f$ and $g$?

There is the generalized mean value theorem which says that for all intervals $(a,b)$ in the intersection of the domains of a pair of differentiable functions $f$ and $g$ there exists $c \in (a,b)$ such that
$$
f'(c)(g(b) - g(a)) = g'(c)(f(b) - f(a))
$$
So
$$
|f'(c)||g(b) - g(a)| = |g'(c)||f(b) - f(a)| \geq |f'(c)||f(b) - f(a)|
$$
So either $f'(c) = 0$ or
$$
|f(b) - f(a)| \leq |g(b) - g(a)|
$$
In particular, if $f(a) = g(a) = 0$ and $f$ and $g$ are differentiable on $\mathbb{R}$, then
$$
|f(x)| \leq |g(x)|
$$
for all $x \in \mathbb{R}$.
A Counterexample?
I found the argument above convincing, and yet it seems like there is a counterexample. Consider
$$
f(x) = (-1)^{1 +\left\lfloor \frac{x}{\pi} \right\rfloor}\cos x + 2\left(1 + \left\lfloor \frac{x}{\pi} \right\rfloor \right)
$$
This function is differentiable on $(-\pi , \infty)$. Moreover, $|f'(x)| = |\sin(x)| = |\cos ' x|$. According to my post, this should mean $|f(x) - 1| \leq |\cos x - 1|$ for all $x \in \mathbb{R}$. Yet clearly $|f(x) - 1| \geq |\cos x - 1|$ for all $x \geq 0$. What's going on here?
I can spin this off into a separate question if that's more appropriate, but I'm sure there's some simple thing I'm missing that prevents this from being a counterexample.
Resolution?
I think I figured out what is going on with the counterexample. The proof I alluded to in the comments below doesn't actually work. So, in order to conclude
$$
|f(b) - f(a)| \leq |g(b) - g(a)|
$$
we must have that $f'(c) \neq 0$ for all $c \in (a,b)$. In this light, the counterexample is just a demonstration that this hypothesis can't be omitted.
