How to prove or disprove $f(n) = O((f(n)^2))$

7.1k Views Asked by At

$f(n)$ is an asymptotically positive function (that is, $f(n)$ is positive when $n$ is sufficiently large).

I don't know if I can give an example to disprove it...

$f(n)=O(g(n))$ means if and only if there exist two positive constants $c$ and $n_0$ such that $|f(n)| \leq c|g(n)|$ for all $n \geq n_0$.

2

There are 2 best solutions below

0
On

Suppose $f(n) = \frac{1}{n}$ (it is always positive), then $f(n)^2 = \frac{1}{n^2}$ and $\frac{f(n)}{f(n)^2} = n$ is unbounded. Thus $f(n) \neq O(f(n)^2)$ and that is your counterexample.

However, if you additionally assume that $(f(n) - 1)$ is asymptotically positive, then your statement becomes true as $x^2 > x$ for all $x > 1$.

1
On

It depends on the function $f(n)$, so if take a counter example where $f(n)$ takes values in $ [0,1]$, then the statement is wrong. So it does not hold $\forall n\ge n_0$.