# Asymptotics and function composition -- which is bigger

I have been using the big O notation for some time now and know that, for example, $$(e^x)^2 \in o(e^{x^2})$$. In general, if $$f$$ grows faster than $$g$$, then $$f(g(x))$$ grows faster than $$g(f(x))$$. Does this hold in general? If so, how can I prove this? I was not able to find such proof anywhere. If not, does something similar hold, which would imply examples such as the one mentioned?

The version with "$$f(g(x))$$ grows strictly faster than $$g(f(x))$$" clearly does not hold (as correctly pointed out by Brian). Does the non-strict version hold?

It definitely does not hold in general. Let $$f(x)=x^2$$ and $$g(x)=x$$; then
$$\lim_{x\to\infty}\frac{g(x)}{f(x)}=\lim_{x\to\infty}\frac{x}{x^2}=0\;,$$
so $$g(x)\in o(f(x))$$, but $$g\circ f=f\circ g$$.
Taking $$f(x)=1$$ and $$g(x)=\frac1x$$ yields a similar example.