Calculation with Landau symbol (Big $O$)

169 Views Asked by At

I'm not sure about my calculations with the Landau Symbol $O$:

Let $c>0$ and $n\to \infty$. Consider:

$$\frac{1}{c\sqrt{n}+O\left(\frac{\ln(n)}{n}\right)}-\frac{1}{c\sqrt{n}}= \frac{O\left(\frac{\ln(n)}{n}\right)}{\left (c\sqrt{n}+O\left(\frac{\ln(n)}{n}\right)\right)c\sqrt{n}}= \frac{O\left(\frac{\ln(n)}{n\sqrt{n}}\right)}{\left (c\sqrt{n}+O\left(\frac{\ln(n)}{n}\right)\right)} $$

Now, I am not sure if I can conclude

$=O\left(\frac{\ln(n)}{n^2}\right),$

since the $O$ in the denominator tends to zero compared to the other summand.

3

There are 3 best solutions below

7
On BEST ANSWER

Hint: A slightly different approach to yield your desired bound is to factor $c\sqrt n$ out of the denominator in the first fraction and use geometric series to handle the resulting term after factoring out $c\sqrt n$.

0
On

As suggested,

$\begin{array}\\ \frac{1}{c\sqrt{n}+O\left(\frac{\ln(n)}{n}\right)}-\frac{1}{c\sqrt{n}} &=\frac{1}{c\sqrt{n}}\left(\frac1{1+O\left(\frac{\ln(n)}{n\sqrt{n}}\right)}-1\right)\\ &=\frac{1}{c\sqrt{n}}\frac{1-(1+O\left(\frac{\ln(n)}{n\sqrt{n}}\right))}{1+O\left(\frac{\ln(n)}{n\sqrt{n}}\right)}\\ &=\frac{1}{c\sqrt{n}}\frac{O\left(\frac{\ln(n)}{n\sqrt{n}}\right)}{1+O\left(\frac{\ln(n)}{n\sqrt{n}}\right)}\\ &=\frac{1}{c}\frac{O\left(\frac{\ln(n)}{n^2}\right)}{1+O\left(\frac{\ln(n)}{n\sqrt{n}}\right)}\\ &= O\left(\frac{\ln(n)}{n^2}\right)\\ \end{array} $

0
On

Let me add following consideration for lovers of accuracy in proof.

By definition, taking non negative sequences, we have $$O(g) = \left\lbrace f:\exists C > 0, \exists N \in \mathbb{N}, \forall n (n > N \& n \in \mathbb{N}) (f(n) \leqslant C \cdot g(n)) \right\rbrace$$ So any equality, which uses O-big, and especially on both sides of equality, can be viewed as equality between sets. Also let me notice, that equality type $f=O(g)$ is quite different from type $O(f)=O(g)$. First means "$\in$", while under second we understand "$\subset \land \supset$". There can be proved some basic properties: $$f + O(g) = \{f \}+ O(g)=O(f+g) $$ $$f \cdot O(g) =\{f \} \cdot O(g)= O(f \cdot g) $$ Which are used, for example, on suggested factoring out $c\sqrt n$ i.e. $$c\sqrt{n}+O\left(\frac{\ln(n)}{n}\right)=O\left( c\sqrt{n}+\frac{\ln(n)}{n} \right)=c\sqrt{n} \left( 1+O\left(\frac{\ln(n)}{n\sqrt{n}}\right) \right)$$