# Big O notation

1. Jan 24, 2008

### dobry_den

$$\biggl(-\frac{x^2}2 + \frac{x^4}{24} - \frac{x^6}{720} +\mathcal{O}(x^8)\biggr)-\frac12\biggl(-\frac{x^2}2+\frac{x^4}{24}+\mathcal{O}(x^6)\biggr)^2+\frac13\biggl(-\frac{x^2}2+\mathcal{O}(x^4)\biggr)^3 + \mathcal{O}(x^8)\\ & =-\frac{x^2}2 + \frac{x^4}{24}-\frac{x^6}{720} - \frac{x^4}8 + \frac{x^6}{48} - \frac{x^6}{24} +\mathcal{O}(x^8)\\$$

(http://en.wikipedia.org/wiki/Taylor_series#First_example)

This is a Taylor expansion of f(x) = ln(cos(x)) . I just wonder what happened with the first three O's, especially with (O(x^6))^2 and (O(x^4))^3. Are they somehow incorporated in O(x^8)?

2. Jan 24, 2008

### NateTG

Both of those go to $\mathcal{O}(x^8)$ when you multiply out...
For example:
$$\left (- \frac{x^2}{2}+ \mathcal{O}(x^4}) \right)^3$$
multiplies out to:
$$-\frac {x^6}{8} + 3\frac{x^4}{4} \mathcal{O}(x^4) - 3\frac{x^2}{2} \mathcal{O}{x^8} + \mathcal{O}(x^12)$$
$$-\frac{x^6}{8} + \left( \mathcal{O}(x^8) - \mathcal{O}(x^{10}) + \mathcal{O}(x^{12}) \right)$$
$$-\frac{x^6}{8} + \mathcal{O}(x^8)$$

3. Jan 24, 2008

### dobry_den

that's exactly what i don't get... shouldn't the result of

$$\mathcal{O}(x^8) - \mathcal{O}(x^{10}) + \mathcal{O}(x^{12}) \right)$$

be O(x^12) since that is the largest term?

Last edited: Jan 24, 2008
4. Jan 25, 2008

### NateTG

Doesn't that depend on $x$? (In Taylor expansions $x$ is 'small', so lower exponents are more important.)