Failure of unrestricted Big O composition
= Failure of unrestricted Big O composition
From $f_1=O(g_1)$ and $f_2=O(g_2)$ one cannot generally deduce $f_2\circ f_1=O(g_2\circ g_1)$. For $f_1(n)=2n$, $g_1(n)=n$ and $f_2(n)=g_2(n)=2^n$, the two premises hold, but the ratio of the compositions is $2^n$, which is unbounded. A constant scaling of an inner argument can change the growth order after an <exponential function> is applied.