Prove f(x) ∈ O(x^3) Using Big-O Definition: Homework

  • Thread starter Thread starter sta|ker
  • Start date Start date
  • Tags Tags
    Definition
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 2K views
sta|ker
Messages
12
Reaction score
0

Homework Statement


Let [itex]f(x) = 2x^{3} + 3x\log{x}[/itex], prove [itex]f \in O(x^{3})[/itex] using the Big-O Definition.

Homework Equations


Big-O definition:
[itex]f(x) \in O(g(x))[/itex] if [itex]|f(x)| \leq C|g(x)|[/itex] and [itex]x \geq k[/itex] where [itex]C[/itex] and [itex]k[/itex] are both positive integers.

The Attempt at a Solution


I basically set [itex]C=4[/itex] and [itex]k=4[/itex], then wrote it out:
[itex]|2x^{3}+3x\log{x}| \leq 4|x^{3}|[/itex] where [itex]x \geq 4[/itex]

then using 4 for x:
[itex]256 \geq 152[/itex]

According to the definition this proves it. It just seems to simple for an assignment (not the only problem on it, but still). Did I prove this correctly? Or do I completely not understand? I can prove it using limits, but she wants us to use the Big-O therom.
 
Physics news on Phys.org
sta|ker said:

Homework Statement


Let [itex]f(x) = 2x^{3} + 3x\log{x}[/itex], prove [itex]f \in O(x^{3})[/itex] using the Big-O Definition.

Homework Equations


Big-O definition:
[itex]f(x) \in O(g(x))[/itex] if [itex]|f(x)| \leq C|g(x)|[/itex] and [itex]x \geq k[/itex] where [itex]C[/itex] and [itex]k[/itex] are both positive integers.

The Attempt at a Solution


I basically set [itex]C=4[/itex] and [itex]k=4[/itex], then wrote it out:
[itex]|2x^{3}+3x\log{x}| \leq 4|x^{3}|[/itex] where [itex]x \geq 4[/itex]

then using 4 for x:
[itex]256 \geq 152[/itex]

According to the definition this proves it. It just seems to simple for an assignment (not the only problem on it, but still). Did I prove this correctly? Or do I completely not understand? I can prove it using limits, but she wants us to use the Big-O therom.

So saying ##|2x^{3}+3x\log{x}| \leq 4|x^{3}|## when ##x>4## you are observing that ##3x\log x \le 2x^3## when ##x\ge 4##. I would think you would need to give an argument for that or at least explain why you already know that after checking ##x=4##.
 
Office_Shredder said:
You have to prove it for EVERY x larger than 4, not just when x = 4. Also is your log base 2?
Yes, the log base is assumed to be 2. Sorry, I forgot about that.

LCKurtz said:
So saying ##|2x^{3}+3x\log{x}| \leq 4|x^{3}|## when ##x>4## you are observing that ##3x\log x \le 2x^3## when ##x\ge 4##. I would think you would need to give an argument for that or at least explain why you already know that after checking ##x=4##.
Hmm, I guess I don't understand that technique then. I can do it using limits, but I guess I'll just have to review it until I get it.
 
LCKurtz said:
So saying ##|2x^{3}+3x\log{x}| \leq 4|x^{3}|## when ##x>4## you are observing that ##3x\log x \le 2x^3## when ##x\ge 4##. I would think you would need to give an argument for that or at least explain why you already know that after checking ##x=4##.

sta|ker said:
Hmm, I guess I don't understand that technique then. I can do it using limits, but I guess I'll just have to review it until I get it.

It's just an ordinary calculus question now. How could you argue that ##3x\log_2 x \le 2x^3## if ##x>4##?