Which function goes faster?

  • Thread starter minase
  • Start date
42
0

Main Question or Discussion Point

If you are given two functions and asked which function goes faster. You divide on function by the other and you use lopitals rule. If your ratio gives you a constant it is said the two fuction grow at the same rate. I can't understand why 5x and 2x would be growing at the same rate. 5=2? Isn't rate 5 for 5x and 2 for 2x. how is it 5x and 2x growing at the same rate?
 

Answers and Replies

1,631
4
remember that we are talking for infinitely large or small terms, so the fact that 5>2 does not make any change, since lim(5x/2x)=5/2, when x->infinity, so actually here f(x)=5x and f(x)=2x grow at the same rate. Because 5* infinity is also infinity,and 2* infinity is also infinity, so 5, and 2 and any other constand do not really make any change. They would not grow at the same rate if we would have let's say f(x)=5x^3 and f(x)=2x, in this case f(x)=5x^3 , would grow at a faster rate, since the limit of their ratio when x-> infinity,would give you either 0 or infinity, depends whic function you take as a denominator,and which as a numerator.

anyone correct me if i am wrong!!
 
HallsofIvy
Science Advisor
Homework Helper
41,734
893
"Which function goes faster" makes no sense. I think you are asking "which function goes to infinity faster" which can be determined by
[tex]\lim_{x\rightarrow\infty}\frac{f(x)}{g(x)}[/itex]
If that limit is a finite, non-zero, number, then f= O(g) (and g= O(f)). If it is 0, then f= o(g). If it is infinite, then g= o(g).
 
360
0
If you are given two functions and asked which function goes faster. You divide on function by the other and you use lopitals rule. If your ratio gives you a constant it is said the two fuction grow at the same rate. I can't understand why 5x and 2x would be growing at the same rate. 5=2?
I agreee that's kinda stupid terminology .Get used to it.
It makes more sense to me to say f1(x)=5x grows "faster" than f2(x)=2x for [itex]x\in\mathbb{R^+}[/itex].
 
1,631
4
If it is 0, then f= o(g). If it is infinite, then g= o(g).
at the last one i think halls meant
g= o(f), since at this case g(x) is said to be of a higher order than f, considering that both of them are infinitely small.
 
1,631
4
HallsofIvy;1285869[tex said:
\lim_{x\rightarrow\infty}\frac{f(x)}{g(x)}[/itex]
If that limit is a finite, non-zero, number, then f= O(g) (and g= O(f)). If it is 0, then f= o(g). If it is infinite, then g= o(g).
yeah and if f, and g are infinitely large when x->infinity, than it is vice verse
 
HallsofIvy
Science Advisor
Homework Helper
41,734
893
yeah and if f, and g are infinitely large when x->infinity, than it is vice verse
Actually, I was assuming that f and g are unbounded so I'm not sure what you mean by "vice versa".
 
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,843
17
If you are given two functions and asked which function goes faster. You divide on function by the other and you use lopitals rule. If your ratio gives you a constant it is said the two fuction grow at the same rate. I can't understand why 5x and 2x would be growing at the same rate. 5=2? Isn't rate 5 for 5x and 2 for 2x. how is it 5x and 2x growing at the same rate?
You should consider "the same rate" a technical term with a technical definition that may or may not relate to a common English interpretation of those same words.

We use this definition because it's useful. Constant factors are often irrelevant. In analysis, there is no difference between "x goes to zero" and "4x goes to zero". In computer science, we choose up front to ignore the constant factors, so that we can prove things in generality without having to worry about the architectural differences between different computers, or the optimization skill of the programmer / compiler, et cetera.
 
Last edited:

Related Threads for: Which function goes faster?

  • Last Post
Replies
3
Views
3K
Replies
1
Views
745
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
3
Views
736
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
8
Views
11K
  • Last Post
Replies
1
Views
1K
Top