2

I want to estimate with big O the following expressions:

$$ \begin{align*} f_1(x) &= \frac{x^4 + x^2 + 1}{x^4 + 1}, \\ f_2(x) &= \frac{x^3 + 5 \log x}{x^4 + 1}. \end{align*} $$

How do you eliminate the constant on the bottom of the fraction? How would you work to solve these types of problems?

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
Dan Webster
  • 141
  • 2
  • 5

3 Answers3

5

The idea is that $x^4 + x^2 + 1 = \Theta(x^4)$, and similarly $x^4 + 1 = \Theta(x^4)$. So the first expression is $\Theta(x^4)/\Theta(x^4) = \Theta(1)$. The second expression can be estimated similarly.

This sort of calculation shows the advantage of asymptotic notation - irrelevant details disappear and calculations become manageable.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
4

If you want to abstain abuse of notation, you can proceed as follows. Compute the limit the ratio for $x \to \infty$:

$\qquad\begin{align*} \lim_{x \to \infty} \frac{x^4 + x^2 + 1}{x^4 + 1} &= \lim_{x \to \infty} \frac{1 + \frac{1}{x^2} + \frac{1}{x^4}}{1 + \frac{1}{x^4}} \\ &= \frac{\lim_{x \to \infty} 1 + \lim_{x \to \infty} \frac{1}{x^2} + \lim_{x \to \infty} \frac{1}{x^4}}{\lim_{x \to \infty} 1 + \lim_{x \to \infty} \frac{1}{x^4}} \\ &= \frac{1 + 0 + 0}{1 + 0} \\ &= 1 \end{align*}$

Note that in the first step is just fraction arithmetics and the second uses rules of calculations with limits; check for yourself that these are valid steps (in particular, all the "small" limits are finite).

Now, by definition of $\sim$ (asymptotic equivalence) we get that $x^4 + x^2 + 1 \sim x^4 + 1$ which implies

  • $x^4 + x^2 + 1 \in \Theta(x^4 + 1)$,
  • $x^4 + x^2 + 1 \in O(x^4 + 1)$ and
  • $x^4 + x^2 + 1 \in \Omega(x^4 + 1)$.

Of course, this calculation generalises to all polynomials: for $P$ a polynomial of degree $k$ with positive dominant coefficient $a_k$ we have that $P(x) \sim a_k x^k$ holds.

Your second example works similarly but you get $0$ as limit; this, by definition, implies $x^3 + 5\log x \in o(x^4 + 1)$.

Raphael
  • 73,212
  • 30
  • 182
  • 400
1

$O(-)$ does not "solve" things or "estimate" them. I'm not just being pedantic: from the way you phrase the question, I think you've misunderstood at quite a fundamental level. To see where I'm coming from, imagine I asked you, "How do I solve the number $x\geq \tfrac34+\tfrac13$?" Maybe I don't understand how to add fractions but I probably wouldn't have written the question that way if adding fractions was my only problem.

Remember what $f(x)=O(g(x))$ means: there are constants $x_0$ and $c$ such that, for all $x\geq x_0$, $|f(x)|\leq c|g(x)|$. Just as there are infinitely many numbers greater than or equal to $\tfrac34+\tfrac13$, there are infinitely many functions that are eventually bigger than $f$, whatever function $f$ you choose. In particular, just as $x=\tfrac34+\tfrac13$ is a trivial answer to my question, $g(x)=f(x)$ is a trivial answer to, "Name a function $g$ such that $f=O(g)$."

I hope that helps you understand the concepts better; Yuval and Raphael have already given answers that should give more practical help with these particular examples.

David Richerby
  • 82,470
  • 26
  • 145
  • 239