2

I had a question on Big-O.

If $f(x) = -3x^2 + 6x + 2$, prove that $f(x)$ is $O(x^2)$

Generally my teacher gave us these strategies to follow: 1. Eliminate Negative Terms 2. Multiply to match highest order term.

So in this case Would I be getting rid of $-3x^2$ term and end up with $6x+2$?

So my $c = 8$ and $k = 1$.

Any help would be appreciated.

Andre.J
  • 1,021

1 Answers1

0

Consider that by the triangle inequality we have, $$|f(x)| = |-3x^2+6x+2| \leq |-3x^2|+|6x|+2$$

then for $x>0$ we have that

$$|f(x)| \leq 3x^2+6x+2$$

and for any $x>1$ (because $x^2>x>1$), we clearly than have that

$$|f(x)|\leq 3x^2+6x^2+2x^2 = 11x^2 = 11\cdot|x^2|.$$

Since this holds for all $x>1$, we have that $f(x)$ is $O(x^2)$ by definition.

David
  • 3,180