Is the tightest upper bound for (logn)^2 = O(sqrt(n))

13 Views Asked by At

I was asked to find the tightest upper bound for (logn)^2

What I think should be the right way of doing this is as follows:

Since we know log X < X, we can let X be n^(1/4)

log n^(1/4) < n^(1/4)

log n < 4 * n^(1/4)

(logn)^2 < 4 * n^(1/2)

Thus, (logn)^2 = O(n^(1/2))

Plotting the graph out for it seems to suggest it as well. On a side note, I tried substituting n^(1/8) and realised perhaps an even tighter bound would be O(n^(1/8))