Why do these functions satisfy that f(n) is not O(g(n)) and g(n) is not O(f(n))? I don't understand what these function are like and why they satisfy that f(n) is not O(g(n)) and g(n) is not O(f(n)).
Where is x?
\begin{eqnarray}
f(x)=
\begin{cases}
    k^{2k}, &amp;x\in(2,2+1)&amp; \\
    k^{2k+1}, &amp;x\in(2+1,2+2)&amp;
\end{cases}
\end{eqnarray}
\begin{eqnarray}
g(x)=
\begin{cases}
    k^{2k-2}, &amp;x\in(2,2+1)&amp; \\
    k^{2k+2}, &amp;x\in(2+1,2+2)&amp;
\end{cases}
\end{eqnarray}
Also, could you teach me how to write these functions in Grapher on MacOS? Cuz I want to know what they are like.
Let's firstly imagine function $f$: for $k=2$ we have two intervals $(4,5)$ and $(5,6)$ and for $k=3$ we have two intervals $(6,7)$ and $(7,8)$. Accordingly for $f$ we have:
$$\quad\quad\quad   x\quad\ \overbrace{(4,5)\quad (5,6)}^{k=2}\quad\overbrace{(6,7)\quad (7,8)}^{k=3} \cdots\\
f(x)\quad  2^4\quad\quad 2^5\quad\quad\quad 3^6 \quad\quad3^7$$
for function $g$ we have:
$$\quad\quad\quad   x\quad\ \overbrace{(4,5)\quad (5,6)}^{k=2}\quad\overbrace{(6,7)\quad (7,8)}^{k=3} \cdots\\
g(x)\quad  2^2\quad\quad 2^6\quad\quad\quad 3^4 \quad\quad3^8$$
So, as you see both $f$ and $g$ are increasing, but alternately one is more then  other with more then constant factor, so they cannot be big-$O$ of each other.
To get an idea of an example you can take a look at DNA molecule chain  and imagine, that $f$ is one line and $g$ another.