It is obvious that for any c>0, the function f(x)=xc has the desired property; we will prove that conversely, any function with the desired property has this form for some c. Define the function g:(0,∞)→(0,∞) given by g(x)=logf(ex); this function has the property that if x,y∈(0,∞) and 2x≤y≤3x, then 2g(x)≤g(y)≤3g(x). It will suffice to show that there exists c>0 such that g(x)=cx for all x>0. Similarly, define the function h:\RR→\RR given by h(x)=logg(ex); this function has the property that if x,y∈\RR and x+log2≤y≤x+log3, then h(x)+log2≤h(y)≤h(x)+log3. It will suffice to show that there exists c>0 such that h(x)=x+c for all x∈\RR (as then h(x)=ecx for all x>0). By interchanging the roles of x and y, we may restate the condition on h as follows: if x−log3≤y≤x−log2, then h(x)−log3≤h(y)≤h(x)−log2. This gives us the cases a+b=0,1 of the following statement, which we will establish in full by induction on a+b: for any nonnegative integers a,b, for all x,y∈\RR such that x+alog2−blog3≤y≤x+alog3−blog2, we have h(x)+alog2−blog3≤h(y)≤h(x)+alog3−blog2. To this end, suppose that a+b>0 and that the claim is known for all smaller values of a+b. In particular, either a>0 or b>0; the two cases are similar, so we treat only the first one. Define the function j(t)=a+b(a+b−1)t−b(log2+log3), so that j(alog2−blog3)=(a−1)log2−blog3, j(alog3−blog2)=(a−1)log3−blog2. For t∈[alog2−blog3,alog3−blog2] and y=x+t, we have log2≤t−j(t)≤log3 and hence (a−1)log2−blog3≤h(x+j(t))−h(x)≤(a−1)log3−blog2 log2≤h(y)−h(x+j(t))≤log3; this completes the induction. Now fix two values x,y∈\RR with x≤y. Since log2 and log3 are linearly independent over \QQ, the fractional parts of the nonnegative integer multiples of log3/log2 are dense in [0,1). (This result is due to Kronecker; a stronger result of Weyl shows that the fractional parts are uniformly distributed in [0,1). In particular, for any ϵ>0 and any N>0, we can find integers a,b>N such that y−x<alog3−blog2<y−x+ϵ. By writing alog2−blog3=log3log2(alog3−blog2)−blog3(log3)2−(log2)2, we see that this quantity tends to −∞ as N→∞; in particular, for N sufficiently large we have that alog2−blog3<y−x. We thus have h(y)≤h(x)+alog2−blog3<y−x+ϵ; since ϵ>0 was chosen arbitrarily, we deduce that h(y)−h(x)≤y−x. A similar argument shows that h(y)−h(x)≥y−x; we deduce that h(y)−h(x)=y−x, or equivalently h(y)−y=h(x)−x. In other words, the function x↦h(x)−x is constant, as desired.