A function $f(x)$ about $x = a$ may be linearized into
$$
P_1(x) = f(a) + f'(a)(x-a),
$$
obtaining a polynomial that matches the value and derivative of $f$ at $x = a$.
## Taylor's theorem
Even better approximations of $f(x)$ can be obtained by using higher degree polynomials if $f^{n+1}(t)$ exists for all $t$ in an interval containing $a$ and $x$. Thereby matching more derivatives at $x = a$,
is just the [Mean-value theorem](differentation.md#mean-value-theorem) for some $s$ between $a$ and $x$
$$
\frac{f(x) - f(a)}{x-a} = f'(s).
$$
Using induction to prove for $n > 0$. Suppose $n = k-1$ where $k \geq 1$ is an integer, then
$$
E_{k-1}(x) = \frac{f^{(k)}(s)}{k!}(x-a)^k,
$$
where $s$ is some number between $a$ and $x$. Consider the next higher case: $n=k$. Applying the [Generalized Mean-value theorem](differentation.md/#generalized-mean-value-theorem) to the functions $E_k(t)$ and $(t-a)^{k+1}$ on $[a,x]$. Since $E_k(a)=0$, a number $u$ in $(a,x)$ is obtained such that
$f(x) = O(u(x))$ for $x \to a$ if and only if there exists a $k > 0$ such that
$$
|f(x)| \leq k|u(x)|
$$
For all $x$ in the open interval around $x=a$.
The following properties follow from the definition:
1. If $f(x) = O(u(x))$ as $x \to a$, then $Cf(x) = O(u(x))$ as $x \to a$ for any value of the constant $C$.
2. If $f(x) = O(u(x))$ as $x \to a$ and $g(x) = O(u(x))$ as $x \to a$, then $f(x) \pm g(x) = O(u(x))$ as $x \to a$.
3. If $f(x) = O((x-a)^ku(x))$ as $x \to a$, then $\frac{f(x)}{(x-a)^k} = O(u(x))$ as $x \to a$ for any constant $k$.
If $f(x) = Q_n(x) + O((x-a)^{n+1})$ as $x \to a$, where $Q_n$ is a polynomial of degree at most $n$, then $Q_n(x) = P_n(x)$.
**Proof:** Follows from the properties of the big-O notation
Let $P_n$ be the Taylor polynomial, then properties 1 and 2 of big-O imply
that $R_n(x) = Q_n(x) - P_n(x) = O((x - a)^{n+1})$ as $x \to a$. It must be shown that $R_n(x)$ is identically zero so that $Q_n(x) = P_n(x)$ for all $x$. $R_n(x)$ may be written in the form
If $R_n(x)$ is not identically zero, then there is a smallest coefficient $c_k$ $k \leq n$, such that $c_k \neq 0$, but $c_j = 0$ for $0 \leq j \leq k -1$
Suppose the function $f$ and $g$ are differentiable on the interval $(a,b)$, and $g'(x) \neq 0$ there. Also suppose that $\lim_{x \downarrow a} f(x) = \lim_{x \downarrow a} g(x) = 0$ then