I tried differentiate the two functions, then I got $\frac{2\log n}{n}$ and $\frac{1}{2\sqrt{n}}$.
Take the limit on the ratio, we can get
$\lim_{n \rightarrow \infty} \frac{2logn/n}{1/2\sqrt{n}} $
Then substitute n by $m^2$,
$\lim_{n \rightarrow \infty} \frac{8logm}{m} = \lim_{n \rightarrow \infty} 8/m = 0$
So $\log^{2}n = O(\sqrt{n})$.
But this is opposite from the plots I got with Matlab. What's wrong here?