2
$\begingroup$

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?

$\endgroup$
1

3 Answers 3

5
$\begingroup$

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.

$\endgroup$
5
  • $\begingroup$ Of course, by losing the detail you don't get so see what really happens and are more likely to make mistakes in non-trivial cases. I strongly advise beginners not to abuse notation like this but rather prove useful lemmas themselves (see my answer for an example). Eventually you learn when you can simplify to what degree without harm. $\endgroup$
    – Raphael
    Nov 8, 2013 at 11:43
  • $\begingroup$ Raphael, I'm not abusing notation. All my derivations are completely formal. You're right that if I encountered something like $\Theta(x^4) - \Theta(x^4)$ then I'd be in trouble, but here everything is fine. I reiterate my claim that the point of asymptotic notation is to abstract away details. $\endgroup$ Nov 8, 2013 at 18:21
  • $\begingroup$ In order for $\Theta(\dots)/\Theta(\dots)$ to be "completely formal" one would have to define what the division operator means on function classes. As far as I know, this is not done (explicitly) in the usual sources. Also, overloading $=$ in this fashion is unfortunate since it replaces $\in$, a non-symmetric relation. (I don't say that one can not define everything so that what everybody does is formal, but it tends to become more messy than being rigorous from the start. Imho.) $\endgroup$
    – Raphael
    Nov 8, 2013 at 18:29
  • 1
    $\begingroup$ And, of course, a statement like "but here everything is fine" is red flag for me as far as teaching is concerned (and, clearly, Dan Webster is learning). If things don't always work, we should make clear when and why they work so that novices don't fall into traps. $\endgroup$
    – Raphael
    Nov 8, 2013 at 18:31
  • $\begingroup$ The problem with $\Theta(x^4) - \Theta(x^4)$ is the same as with $0/0$-type limits in calculus. When you see $0/0$, you know that you're in trouble, but everything is fine if instead it's $1/2$, $0/1$ or even $2/0$. It's the same here. $\endgroup$ Nov 8, 2013 at 19:38
4
$\begingroup$

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

$\endgroup$
0
1
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.