Understanding big O notation simplified function Recently been looking into algorithms and trying to understand the big O notation. On the wikipedia website it gives an example linked below to image in reference.
I'm struggling to understand why we can simplify the $-2x^3$ to $+2x^3$, and then on line 2 why we can further simplify to $+2x^4 + 5x^4$ ? Thanks in advance for guidance! \
$| 6x^4 - 2x^3 + 5 | ≤ 6x^4 + | 2x^3 | + 5$ 
$| 6x^4 - 2x^3 + 5 | ≤ 6x^4 + 2x^4 + 5x^4$ 
$| 6x^4 - 2x^3 + 5 | ≤ 13x^4$
wiki-big-o-notation-example 
https://en.wikipedia.org/wiki/Big_O_notation
 A: We say $f(x)=O(g(x))$ if there $C>0$ such that $|f(x)|\le C|g(x)|$. In your case $x^3=O(g(x))$, more is True, $x^3=o(g(x)), x>>1$ because
$$\dfrac{x^3}{x^4}\to 0, x\to \infty$$.
This is the reason on line 2.
A: The first step is a triangle inequality:
$$
|a+b| \leq |a|+|b|.
$$
You haven't copied, and thus may have disregarded, some crucial text in the Wikipedia example you quote :

[Prove] $f(x) \leq Mx^4$ for some suitable choice of $x_0$ and M and for all
$x > x_0$. To prove this, let $x_0 = 1$ and $M = 13$.

With this in mind, you can understand the following steps, e.g. $2x^3 \leq 2x^4$... for $x > x_0$ of course.
Probably, what you haven't understood either, is the objective of all this: one wants to have a "simple" upper bound (written as $x$ to some power, here $x^4$) for $f(x)$ valid for all $x$ greater that some $x_0$, which will allow us to write that $f(x) = O(x^4)$ as $x \rightarrow \infty$.
For functions of only one variable, it is in general not too difficult to determine which is the fastest growing term, then use a multiple of this term as a bound on each of the other terms. The sum of all these will be a certain number of times this fastest growing term ($M$ in the example), because this $M$ is a fixed constant this doesn't affect the behaviour of the function asymptotically, so one doesn't pay special attention to the actual value of this $M$. Which means that you can obtain the same optimal $O$ behaviour with more or less tight bounds on individual terms, as long as you have correctly identified the fastest growing one.
