Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Big O notation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example == In typical usage the <math>O </math> notation is asymptotical, that is, it refers to very large <math>x </math>. In this setting, the contribution of the terms that grow "most quickly" will eventually make the other ones irrelevant. As a result, the following simplification rules can be applied: *If <math>f(x) </math> is a sum of several terms, if there is one with largest growth rate, it can be kept, and all others omitted. *If <math>f(x) </math> is a product of several factors, any constants (factors in the product that do not depend on <math>x </math>) can be omitted. For example, let <math>f(x)=6x^4-2x^3+5 </math>, and suppose we wish to simplify this function, using <math>O </math> notation, to describe its growth rate as <math>x \rightarrow \infty </math>. This function is the sum of three terms: <math>6x^4 </math>, <math>-2x^3 </math>, and <math>5 </math>. Of these three terms, the one with the highest growth rate is the one with the largest exponent as a function of <math>x </math>, namely <math>6x^4 </math>. Now one may apply the second rule: <math> 6x^4 </math>is a product of <math>6 </math> and <math>x^4 </math> in which the first factor does not depend on <math>x </math>. Omitting this factor results in the simplified form <math>x^4 </math>. Thus, we say that <math>f(x) </math> is a "big O" of <math>x^4 </math>. Mathematically, we can write <math>f(x)=O(x^4) </math>. One may confirm this calculation using the formal definition: let <math>f(x)=6x^4-2x^3+5 </math> and <math>g(x)=x^4 </math>. Applying the [[#Formal definition|formal definition]] from above, the statement that <math>f(x)=O(x^4) </math> is equivalent to its expansion, <math display="block">|f(x)| \le M x^4</math> for some suitable choice of a real number <math>x_0 </math> and a positive real number <math> M </math> and for all <math>x>x_0 </math>. To prove this, let <math>x_0=1 </math> and <math>M=13 </math>. Then, for all <math>x>x_0 </math>: <math display="block">\begin{align} |6x^4 - 2x^3 + 5| &\le 6x^4 + |2x^3| + 5\\ &\le 6x^4 + 2x^4 + 5x^4\\ &= 13x^4 \end{align}</math> so <math display="block"> |6x^4 - 2x^3 + 5| \le 13 x^4 .</math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)