# Confused about dealing with Big $\mathcal{O}$ in functions

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)$$?

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

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))$$

$$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)$$