Taylor's Theorem

Theorem
Taylor's Theorem states that any infinitely differentiable function (including one where the derivative is 0) can be approximated by a series of polynomials.

One Variable
Let $$f$$ be a real function which is continuous on the closed interval $$\left[{a \,. \, . \, b}\right]$$ and $n$ times differentiable on the open interval $$\left({a \, . \, . \, b}\right)$$.

Let $$\xi \in \left({a \, . \, . \, b}\right)$$.

Then, given any $$x \in \left({a \, . \, . \, b}\right)$$:

$$ $$ $$ $$ $$ $$

where $$R_n$$ (sometimes denoted $$E_n$$) is known as the error term, and satisfies $$R_n = \frac 1 {\left({n+1}\right)!} \left({x - \xi}\right)^{n+1} f^{\left({n+1}\right)} \left({\eta}\right)$$

where $$\eta$$ lies somewhere between $$x$$ and $$\xi$$.

Note that when $$n = 1$$ Taylor's Theorem reduces to the Mean Value Theorem.

Integral version
We first prove Taylor's theorem with the integral remainder term.

The Fundamental Theorem of Calculus states that


 * $$\int_a^x \, f'(t) \, dt=f(x)-f(a),$$

which can be rearranged to:


 * $$f(x)=f(a)+ \int_a^x \, f'(t) \, dt.$$

Now we can see that an application of Integration by Parts yields:

$$ $$ $$

Another application yields $$f \left({x}\right) = f \left({a}\right)+(x-a)f' \left({a}\right)+ \frac 1 2 (x-a)^2f \left({a}\right) + \frac 1 2 \int_a^x \, (x-t)^2 f' \left({t}\right) \, dt. $$

By repeating this process, we may derive Taylor's theorem for higher values of $$n$$.

This can be formalized by applying the technique of Principle of Mathematical Induction. So, suppose that Taylor's theorem holds for a $$n$$, that is, suppose that:

$$ $$ $$ $$ $$

We can rewrite the integral using integration by parts. An antiderivative of $$(x-t)^n$$ as a function $$t$$ is given by $$\frac{-(x-t)^{n+1}}{n+1}$$, so


 * $$ \int_a^x \frac{f^{(n+1)} (t)}{n!} (x - t)^n \, dt $$


 * $$ {} = - \left[ \frac{f^{(n+1)} (t)}{(n+1)n!} (x - t)^{n+1} \right]_a^x + \int_a^x \frac{f^{(n+2)} (t)}{(n+1)n!} (x - t)^{n+1} \, dt $$


 * $$ {} = \frac{f^{(n+1)} (a)}{(n+1)!} (x - a)^{n+1} + \int_a^x \frac{f^{(n+2)} (t)}{(n+1)!} (x - t)^{n+1} \, dt. $$

Substituting this in $$(*)$$ proves Taylor's theorem for $$n+1$$, and hence for all nonnegative integers $$n$$.

The remainder term in the Lagrange form can be derived by the mean value theorem in the following way:



R_n = \int_a^x \frac{f^{(n+1)} (t)}{n!} (x - t)^n \, dt =f^{(n+1)}(\xi) \int_a^x \frac{(x - t)^n }{n!} \, dt. $$

The last integral can be solved immediately, which leads to



R_n = \frac{f^{(n+1)}(\xi)}{(n+1)!} (x-a)^{n+1}. $$

Mean value theorem
An alternative proof, which holds under milder technical assumptions on the function $$f$$, can be supplied using the Cauchy mean value theorem.

Let $$G$$ be a real-valued function continuous on $$[a,x]$$ and differentiable with non-vanishing derivative on $$(a,x)$$. Let



F(t) = f(t) + \frac{f'(t)}{1!}(x-t) + \cdots + \frac{f^{(n)}(t)}{n!}(x-t)^n. $$

By Cauchy's mean value theorem,



\frac{F'(\xi)}{G'(\xi)} = \frac{F(x) - F(a)}{G(x) - G(a)} $$ (1)

for some $$\xi\in(a,x)$$. Note that the numerator $$F(x)-F(a)=R_n$$ is the remainder of the Taylor polynomial for $$f(x)$$. On the other hand, computing $$F^{\prime} (t)$$,



F'(t) = f'(t) - f'(t) + \frac{f(t)}{1!}(x-t) - \frac{f(t)}{1!}(x-t) + \cdots + \frac{f^{(n+1)}(t)}{n!}(x-t)^n = \frac{f^{(n+1)}(t)}{n!}(x-t)^n. $$

Putting these two facts together and rearranging the terms of (1) yields



R_n = \frac{f^{(n+1)}(\xi)}{n!}(x-\xi)^n\cdot\frac{G(x)-G(a)}{G'(\xi)}. $$

which was to be shown.

Note that the Lagrange form of the remainder comes from taking $$G(t)=(x-t)^{n+1}$$ and the given Cauchy form of the remainder comes from taking $$G(t)=t-a$$.