For the following defined functions $$f(x) = \frac{1}{x}+\frac{n-1}{x^2}+\mathcal{O}\left(\frac{1}{x^3}\right)$$ and $$y(x) = c\left(\frac{1}{x}+\frac{m-1}{x^2}+\mathcal{O}\left(\frac{1}{x^3}\right)\right)$$ where $m > n > 0$ and $c$ is large.

I want to bound $f(x)-y(x))$.

I thought that $f(x)-y(x) \leq \frac{1}{x}+\frac{n-1}{x^2}- c\left(\frac{1}{x}+\frac{m-1}{x^2} \right)$, since we are talking about an approximation!

Is this true?

After that, I found this question where the answer states that

For every $x\geq0$, $f(x)-y(x) \leq f(x)$

Is this the tighter bound? if so, how can I get rid of the $\mathcal{O}$ in $f(x)$?

  • $\begingroup$ Put a representative for $\mathcal{O}$, for example, put $c_1/x^3$ instead of $\mathcal{O}(1/x^3)$ $\endgroup$
    – kelalaka
    Sep 19, 2019 at 16:04

2 Answers 2


Regarding your first question

I thought that $ f(x) − y(x) \leq \frac{1}{x} + \frac{n−1}{x^2} −c (\frac{1}{x} + \frac{m−1}{x^2}) $ , since we are talking about an approximation!

Is this true?

No. Consider for example $ f(x) = \frac{1}{x} + \frac{n-1}{x^2} + \frac{c+1}{x^3}, g(x) = c(\frac{1}{x} + \frac{m-1}{x^2} + \frac{1}{x^3}) $. Then you get $ f(x) - g(x) = \frac{1}{x} + \frac{n-1}{x^2} - c(\frac{1}{x} + \frac{m-1}{x^2}) + \frac{1}{x^3} > \frac{1}{x} + \frac{n-1}{x^2} - c(\frac{1}{x} + \frac{m-1}{x^2}) $


You don't get rid of the $\mathcal{O}$, but rather the argument is, that for some reason you do not need to keep close track of it. I feel like there should be some kind of rules how to calculate with them properly. They could look like this:

$\mathcal{O}(f(x)) = c\mathcal{O}(f(x))$

$\mathcal{O}(f(x)) \pm \mathcal{O}(f(x)) = \mathcal{O}(f(x))$

and that would lead to

$f(x)-y(x) \leq \frac{1}{x}+\frac{n-1}{x^2}- c\left(\frac{1}{x}+\frac{m-1}{x^2} \right) + \mathcal{O}\left(\frac{1}{x^3}\right)$

  • $\begingroup$ I don't get rid or I can't ? I need to simplify it because in this way it would be too complicated! $\endgroup$ Sep 19, 2019 at 12:48
  • $\begingroup$ You can only get rid of the term, if you know what 'hides behind' the big-O. But most importantly: If you are already writing it like that, you don't want to! Writing it like that makes your life easier, because you do not really have to account for anything that happens there. You just do your inequalities as if the term is not there. $\endgroup$
    – don-joe
    Sep 19, 2019 at 12:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .