Showing for $f,g:\mathbb{R}\rightarrow\mathbb{R}$ that for $M>0, |f(x)|\le M|g(x)|$ for $x>x_0$

37 Views Asked by At

Showing for $f,g:\mathbb{R}\rightarrow\mathbb{R}$ that for $M>0, |f(x)|\le M|g(x)|$ for $x>x_0$.

This is a repost of a question that is probably too long to ever get an answer (I feel compelled to show I can solve these for fear I be accused of not trying!).

This is in the context of big-oh notation, if this is true then f is O(g). I have done them by sketching graphs, which makes me feel like I've totally missed the point.

  1. $f=5x^2-2x+7$ and $g=x^5$
  2. $f=5x^2-2x+7$ and $g=x^2$
  3. $f=\frac{5}{x}$ and $g=1$
  4. $f=3x^2\log(x)+5x\log^2(x)$ and $g=x^2\log(x)$
  5. $f=\sum^k_{i=0}(a_ix^i)$ and $g=x^k$ - I am struggling with the algebra of this one.

Odly phrased big-oh question, have I done what is required? (because it's not really big-oh, it's more graph sketching) is the OP, but it really was too long.

I'd like to know if simple graph sketching is really what this question wants me to do.

1

There are 1 best solutions below

2
On

Your first line is a little muddled. $f$ is $O(g)$ if there exist constants $M > 0$ and $x_0$ with the property that $ x > x_0 $ implies $|f(x)| \le M |g(x)|$.

A typical big-O problem is therefore "show that $f$ is $O(g)$ [where $f$ and $g$ are explicitly given by formulas] by exhibiting an $M$ and $x_0$ for which the conclusion in the definition holds."

A first observation: if you come up with a correct pair $(M, x_0)$, then I can given an alternative correct pair, namely $(M, x_0 + 1)$, or $(M+1, x_0)$. (You might want to check that this claim is correct.) So while you're asked to exhibit this pair of numbers, there are infinitely many correct answers. (This might be one reason we teachers don't tend to ask a lot of these questions...they're harder to grade!)

Next observation: for any correct value of $M$, there's a smallest value of $x_0$ that has the necessary property, but there's no great honor in finding the smallest $x_0$! Indeed, picking a larger $x_0$ often makes the proof part (showing that $x > x_0$ implies $|f(x)| < M |g(x)|$) much cleaner.

Third point: the idea with the $x > x_0$ is "We want to show that $f$ is eventually less than a multiple of $g$. We don't care how far out we have to look, as long as eventually it stays less." Letting $x_0$ be a free parameter in the definition captures this.

Fourth: the "M" in the definition captures the idea that a factor of 2 (or of any constant) in either direction really doesn't matter when we're trying to compare big-$n$ features of a function. You could argue that it matters a lot, and that you personally really care about it, and I'd actually say "I think you've got a point." But the folks who developed big-O notation didn't care, so you have to live with it until you write your first research papers. :)

So how do you actually do these things? Graphing is a great way to start. For the first one, you could use your favorite programming language to find out where $x^5$ and $5x^2 - 2x + 7$ are last equal, and call this $x_0$. But personally, I'd just pick $x_0 = 10$ and see what happens. If I do so, I get \begin{align} 5x^2 - 2x + 7 &< 5x^2 + 7 \text{ because $2x$ is negative for $x > 10$} \\ & < 5x^2 + 7x^2 \text{ because $1 < x^2$ for $x > 10$ } \\ &= 12 x^2 \\ &< x^3 x^2 \text{ because $x^3 > 12$ for $x > 10$ } \\ & = x^5 \end{align} and now I've shown that for $x > x_0$, we have $|f(x)| < 1 \cdot |g(x)|$.

For the next one, you can see that $f$ is about five times as large as $g$, so you'll need a factor of $5$ to establish the inequality. My choice? Use $M = 10$ to make things easier. In fact, I'll use $M = 5 + 2 + 7$, the sum of the coefficients. Now the proof looks like this: \begin{align} 5x^2 - 2x + 7 &< 5x^2 + 2x + 7 \text{ because 2x is negative for $x > 10$} \\ & < 5x^2 + 2x^2 + 7x^2 \text{ because $1 < x$ and $1 < x^2$ for $x > 10$ } \\ &< (5 + 2 + 7) x^2 \\ &= M g(x). \end{align}

Is this beginning to make sense? Graph sketching gets you a starting point for guess what might work for $x_0$ and $M$. Doubling those values (or doing something like that) makes the proving part go a lot easier in general. But the proving is needed -- a mere graph isn't a proof.