What is an exact characterization for the functions $f$ such that $xf'(x) \leq 2f(x)$? What is an exact characterization for the functions $f$ such that $xf'(x) \leq 2f(x)$?
I know, for instance, that the inequality holds for all functions $f(x) = c_0 + c_1x + c_2x^2$, with $c_0, c_1, c_2 \geq 0$. But it does not hold for $f(x) = x^2 - x$ or $f(x) = e^x$. I'm interested in the broadest possible class of functions that it holds for.
Note 1: For my application, we can also assume that $f(x), f'(x), f''(x) \geq 0$ for all $x \geq 0$ (i.e., it is positive, non-decreasing, and convex over $[0, \infty)$). 
Note 2: I am interested in a slightly more general solution, $xf'(x) \leq bf(x)$, where $b \geq 1$ is a constant. But I should be able to generalize any solution for the $b = 2$ case.
 A: One very general class of functions: It will hold for any "generalized" polynomial $\sum_n c_n x^{\alpha_n}$ for any choices of positive $c_n$ and any choice of positive real powers $\alpha_n < 2$ (i.e. you can have as many powers that you want, and they can be real instead of just integer). This should extend to infinite series that have the same types of powers, although they might not converge for all non-negative $x$ unless you restrict the sequence of $c_n$. But for example you could put $c_n \leq K/n!$ and get a series that converges for all non-negative $x$, thus defining another class of functions.
A: I'm not sure what you mean by "characterization".  For $x>0$, this should hold whenever $x^{-2} f(x)$ is a nonincreasing function, i.e. $f(x) = x^2 g(x)$ for any nonincreasing differentiable function $g$.
To derive this, write the given inequality as
$$
x\,f'(x) - 2\,f(x) \;\leq\; 0
$$
Assuming $x> 0$, we can multiply through by the integrating factor $x^{-3}$ to get
$$
x^{-2}f'(x) \,-\, 2x^{-3}f(x) \;\leq\; 0,
$$
which can be written
$$
\frac{d}{dx}\biggl[x^{-2} f(x) \biggr] \;\leq\; 0.
$$
A: For $x > 0$, the condition is equivalent to $\frac{d}{dx} \frac{f(x)}{x^2} \le 0$ while for $x = 0$, it simply says $f(0) \ge 0$. Therefore these are the differentiable functions on $[0,\infty)$ that satisfy 
$$f(0) \ge 0, \quad x \mapsto x^{-2}f(x) \quad \text{ is non-increasing.}
$$
The generalization to the case $xf'(x) \le b f(x)$ is now obvious.
A: The inequality yields (Let's say you have $b$ instead of $2$)
For $x>0$,  $xf'(x)-bf(x)\leq 0\Rightarrow x^bf'(x)-bx^{b-1}f(x)\leq 0$  
$\Rightarrow \frac{x^bf'(x)-bx^{b-1}f(x)}{x^{2b}}\leq 0 \Rightarrow (\frac{f(x)}{x^b})'\leq 0 $
This means that the function $g(x)=\frac{f(x)}{x^b}$ is strictly decreasing.
I think this is what you want.
