Taylor's theorem


In calculus, Taylor's theorem gives an approximation of a k-times differentiable function around a given point by a polynomial of degree k, called the kth-order Taylor polynomial. For a smooth function, the Taylor polynomial is the truncation at the order k of the Taylor series of the function. The first-order Taylor polynomial is the linear approximation of the function, and the second-order Taylor polynomial is often referred to as the quadratic approximation. There are several versions of Taylor's theorem, some giving explicit estimates of the approximation error of the function by its Taylor polynomial.
Taylor's theorem is named after the mathematician Brook Taylor, who stated a version of it in 1715, although an earlier version of the result was already mentioned in 1671 by James Gregory.
Taylor's theorem is taught in introductory-level calculus courses and is one of the central elementary tools in mathematical analysis. It gives simple arithmetic formulas to accurately compute values of many transcendental functions such as the exponential function and trigonometric functions.
It is the starting point of the study of analytic functions, and is fundamental in various areas of mathematics, as well as in numerical analysis and mathematical physics. Taylor's theorem also generalizes to multivariate and vector valued functions.

Motivation

If a real-valued function f is differentiable at the point x = a, then it has a linear approximation near this point. This means that there exists a function h1 such that
Here
is the linear approximation of f for x near the point a, whose graph is the tangent line to the graph y = f at. The error in the approximation is:
As x tends to a, this error goes to zero much faster than, making a useful approximation.
For a better approximation to f, we can fit a quadratic polynomial instead of a linear function:
Instead of just matching one derivative of f at x = a, this polynomial has the same first and second derivatives, as is evident upon differentiation.
Taylor's theorem ensures that the quadratic approximation is, in a sufficiently small neighborhood of x = a, more accurate than the linear approximation. Specifically,
Here the error in the approximation is
which, given the limiting behavior of, goes to zero faster than as x tends to a.
Similarly, we might get still better approximations to f if we use polynomials of higher degree, since then we can match even more derivatives with f at the selected base point.
In general, the error in approximating a function by a polynomial of degree k will go to zero much faster than as x tends to a. However, there are functions, even infinitely differentiable ones, for which increasing the degree of the approximating polynomial does not increase the accuracy of approximation: we say such a function fails to be analytic at x = a: it is not determined by its derivatives at this point.
Taylor's theorem is of asymptotic nature: it only tells us that the error Rk in an approximation by a k-th order Taylor polynomial Pk tends to zero faster than any nonzero k-th degree polynomial as xa. It does not tell us how large the error is in any concrete neighborhood of the center of expansion, but for this purpose there are explicit formulae for the remainder term which are valid under some additional regularity assumptions on f. These enhanced versions of Taylor's theorem typically lead to uniform estimates for the approximation error in a small neighborhood of the center of expansion, but the estimates do not necessarily hold for neighborhoods which are too large, even if the function f is analytic. In that situation one may have to select several Taylor polynomials with different centers of expansion to have reliable Taylor-approximations of the original function
There are several ways we might use the remainder term:
  1. Estimate the error for a polynomial Pk of degree k estimating f on a given interval.
  2. Find the smallest degree k for which the polynomial Pk approximates f to within a given error tolerance on a given interval .
  3. Find the largest interval on which Pk approximates f to within a given error tolerance.
  4. Taylor's theorem in one real variable

Statement of the theorem

The precise statement of the most basic version of Taylor's theorem is as follows:
The polynomial appearing in Taylor's theorem is the k-th order Taylor polynomial
of the function f at the point a. The Taylor polynomial is the unique "asymptotic best fit" polynomial in the sense that if there exists a function and a k-th order polynomial p such that
then p = Pk. Taylor's theorem describes the asymptotic behavior of the remainder term
which is the approximation error when approximating f with its Taylor polynomial. Using the little-o notation, the statement in Taylor's theorem reads as

Explicit formulas for the remainder

Under stronger regularity assumptions on f there are several precise formulae for the remainder term Rk of the Taylor polynomial, the most common ones being the following.
These refinements of Taylor's theorem are usually proved using the mean value theorem, whence the name. Also other similar expressions can be found. For example, if G is continuous on the closed interval and differentiable with a non-vanishing derivative on the open interval between a and x, then
for some number ξ between a and x. This version covers the Lagrange and Cauchy forms of the remainder as special cases, and is proved below using Cauchy's mean value theorem.
The statement for the integral form of the remainder is more advanced than the previous ones, and requires understanding of Lebesgue integration theory for the full generality. However, it holds also in the sense of Riemann integral provided the th derivative of f is continuous on the closed interval .
Due to absolute continuity of f on the closed interval between a and x, its derivative f exists as an L1-function, and the result can be proven by a formal calculation using fundamental theorem of calculus and integration by parts.

Estimates for the remainder

It is often useful in practice to be able to estimate the remainder term appearing in the Taylor approximation, rather than having an exact formula for it. Suppose that f is -times continuously differentiable in an interval I containing a. Suppose that there are real constants q and Q such that
throughout I. Then the remainder term satisfies the inequality
if, and a similar estimate if. This is a simple consequence of the Lagrange form of the remainder. In particular, if
on an interval with some , then
for all The second inequality is called a uniform estimate, because it holds uniformly for all x on the interval

Example

Suppose that we wish to find the approximate value of the function on the interval while ensuring that the error in the approximation is no more than 10−5. In this example we pretend that we only know the following properties of the exponential function:
From these properties it follows that for all k, and in particular,. Hence the k-th order Taylor polynomial of f at 0 and its remainder term in the Lagrange form are given by
where ξ is some number between 0 and x. Since ex is increasing by, we can simply use ex ≤ 1 for x ∈ to estimate the remainder on the subinterval . To obtain an upper bound for the remainder on , we use the property for 0<ξ to estimate
using the second order Taylor expansion. Then we solve for ex to deduce that
simply by maximizing the numerator and minimizing the denominator. Combining these estimates for ex we see that
so the required precision is certainly reached, when
As a conclusion, Taylor's theorem leads to the approximation
For instance, this approximation provides a decimal expression e ≈ 2.71828, correct up to five decimal places.

Relationship to analyticity

Taylor expansions of real analytic functions

Let IR be an open interval. By definition, a function f : IR is real analytic if it is locally defined by a convergent power series. This means that for every aI there exists some r > 0 and a sequence of coefficients ckR such that and
In general, the radius of convergence of a power series can be computed from the Cauchy–Hadamard formula
This result is based on comparison with a geometric series, and the same method shows that if the power series based on a converges for some bR, it must converge uniformly on the closed interval, where rb = |ba|. Here only the convergence of the power series is considered, and it might well be that extends beyond the domain I of f.
The Taylor polynomials of the real analytic function f at a are simply the finite truncations
of its locally defining power series, and the corresponding remainder terms are locally given by the analytic functions
Here the functions
are also analytic, since their defining power series have the same radius of convergence as the original series. Assuming that ⊂ I and r < R, all these series converge uniformly on. Naturally, in the case of analytic functions one can estimate the remainder term Rk by the tail of the sequence of the derivatives f′ at the center of the expansion, but using complex analysis also another possibility arises, which is described below.

Taylor's theorem and convergence of Taylor series

The Taylor series of f will converge in some interval in which all its derivatives are bounded and do not grow too fast as k goes to infinity.
One might think of the Taylor series
of an infinitely many times differentiable function f : RR as its "infinite order Taylor polynomial" at a. Now the estimates for the remainder imply that if, for any r, the derivatives of f are known to be bounded over, then for any order k and for any r > 0 there exists a constant such that
for every x ∈ . Sometimes the constants can be chosen in such way that is bounded above, for fixed r and all k. Then the Taylor series of f converges uniformly to some analytic function
The limit function is by definition always analytic, but it is not necessarily equal to the original function f, even if f is inifintely differentiable. In this case, we say f is a non-analytic smooth function, for example a flat function:
Using the chain rule repeatedly by mathematical induction, one shows that for any order k,
for some polynomial pk of degree 2. The function tends to zero faster than any polynomial as, so f is infinitely many times differentiable and for every positive integer k. The above results all hold in this case:
  • The Taylor series of f converges uniformly to the zero function Tf = 0, which is analytic with all coefficients equal to zero.
  • The function f is unequal to this Taylor series, and hence non-analytic.
  • For any order kN and radius r > 0 there exists Mk,r > 0 satisfying the remainder bound above.
However, as k increases for fixed r, the value of Mk,r grows more quickly that rk, and the error does not go to zero.

Taylor's theorem in complex analysis

Taylor's theorem generalizes to functions f : CC which are complex differentiable in an open subset UC of the complex plane. However, its usefulness is dwarfed by other general theorems in complex analysis. Namely, stronger versions of related results can be deduced for complex differentiable functions f : UC using Cauchy's integral formula as follows.
Let r > 0 such that the closed disk BS is contained in U. Then Cauchy's integral formula with a positive parametrization of the circle S with gives
Here all the integrands are continuous on the circle S, which justifies differentiation under the integral sign. In particular, if f is once complex differentiable on the open set U, then it is actually infinitely many times complex differentiable on U. One also obtains the Cauchy's estimates
for any zU and r > 0 such that BSU. These estimates imply that the complex Taylor series
of f converges uniformly on any open disk BU with SU into some function Tf. Furthermore, using the contour integral formulae for the derivatives f,
so any complex differentiable function f in an open set UC is in fact complex analytic. All that is said for real analytic functions here holds also for complex analytic functions with the open interval I replaced by an open subset UC and a-centered intervals replaced by c-centered disks B. In particular, the Taylor expansion holds in the form
where the remainder term Rk is complex analytic. Methods of complex analysis provide some powerful results regarding Taylor expansions. For example, using Cauchy's integral formula for any positively oriented Jordan curve γ which parametrizes the boundary ∂WU of a region WU, one obtains expressions for the derivatives as above, and modifying slightly the computation for, one arrives at the exact formula
The important feature here is that the quality of the approximation by a Taylor polynomial on the region WU is dominated by the values of the function f itself on the boundary ∂WU. Similarly, applying Cauchy's estimates to the series expression for the remainder, one obtains the uniform estimates

Example

The function
is real analytic, that is, locally determined by its Taylor series. This function was plotted above to illustrate the fact that some elementary functions cannot be approximated by Taylor polynomials in neighborhoods of the center of expansion which are too large. This kind of behavior is easily understood in the framework of complex analysis. Namely, the function f extends into a meromorphic function
on the compactified complex plane. It has simple poles at z = i and z = −i, and it is analytic elsewhere. Now its Taylor series centered at z0 converges on any disc B with r < |zz0|, where the same Taylor series converges at zC. Therefore, Taylor series of f centered at 0 converges on B and it does not converge for any zC with |z| > 1 due to the poles at i and −i. For the same reason the Taylor series of f centered at 1 converges on B and does not converge for any zC with |z − 1| > √2.

Generalizations of Taylor's theorem

Higher-order differentiability

A function f: RnR is differentiable at aRn if and only if there exists a linear functional L : RnR and a function h : RnR such that
If this is the case, then L = df is the differential of f at the point a. Furthermore, then the partial derivatives of f exist at a and the differential of f at a is given by
Introduce the multi-index notation
for αNn and xRn. If all the k-th order partial derivatives of are continuous at, then by Clairaut's theorem, one can change the order of mixed derivatives at a, so the notation
for the higher order partial derivatives is justified in this situation. The same is true if all the -th order partial derivatives of f exist in some neighborhood of a and are differentiable at a. Then we say that f is k times differentiable at the point a .

Taylor's theorem for multivariate functions

If the function is k + 1 times continuously differentiable in a closed ball for some, then one can derive an exact formula for the remainder in terms of order partial derivatives of f in this neighborhood. Namely,
In this case, due to the continuity of -th order partial derivatives in the compact set B, one immediately obtains the uniform estimates

Example in two dimensions

For example, the third-order Taylor polynomial of a smooth function f: R2R is, denoting xa = v,

Proofs

Proof for Taylor's theorem in one real variable

Let
where, as in the statement of Taylor's theorem,
It is sufficient to show that
The proof here is based on repeated application of L'Hôpital's rule. Note that, for each,. Hence each of the first k−1 derivatives of the numerator in vanishes at, and the same is true of the denominator. Also, since the condition that the function f be k times differentiable at a point requires differentiability up to order k−1 in a neighborhood of said point, the numerator and its k − 2 derivatives are differentiable in a neighborhood of a. Clearly, the denominator also satisfies said condition, and additionally, doesn't vanish unless x=a, therefore all conditions necessary for L'Hopital's rule are fulfilled, and its use is justified. So
where the second to last equality follows by the definition of the derivative at x = a.

Derivation for the mean value forms of the remainder

Let G be any real-valued function, continuous on the closed interval between a and x and differentiable with a non-vanishing derivative on the open interval between a and x, and define
For. Then, by Cauchy's mean value theorem,
for some ξ on the open interval between a and x. Note that here the numerator is exactly the remainder of the Taylor polynomial for f. Compute
plug it into and rearrange terms to find that
This is the form of the remainder term mentioned after the actual statement of Taylor's theorem with remainder in the mean value form.
The Lagrange form of the remainder is found by choosing and the Cauchy form by choosing.
Remark. Using this method one can also recover the integral form of the remainder by choosing
but the requirements for f needed for the use of mean value theorem are too strong, if one aims to prove the claim in the case that f is only absolutely continuous. However, if one uses Riemann integral instead of Lebesgue integral, the assumptions cannot be weakened.

Derivation for the integral form of the remainder

Due to absolute continuity of f on the closed interval between a and x its derivative f exists as an L1-function, and we can use fundamental theorem of calculus and integration by parts. This same proof applies for the Riemann integral assuming that f is continuous on the closed interval and differentiable on the open interval between a and x, and this leads to the same result than using the mean value theorem.
The fundamental theorem of calculus states that
Now we can integrate by parts and use the fundamental theorem of calculus again to see that
which is exactly Taylor's theorem with remainder in the integral form in the case k=1.
The general statement is proved using induction. Suppose that
Integrating the remainder term by parts we arrive at
Substituting this into the formula shows that if it holds for the value k, it must also hold for the value k + 1.
Therefore, since it holds for k = 1, it must hold for every positive integer k.

Derivation for the remainder of multivariate Taylor polynomials

We prove the special case, where f : RnR has continuous partial derivatives up to the order k+1 in some closed ball B with center a. The strategy of the proof is to apply the one-variable case of Taylor's theorem to the restriction of f to the line segment adjoining x and a. Parametrize the line segment between a and x by u = We apply the one-variable version of Taylor's theorem to the function :
Applying the chain rule for several variables gives
where is the multinomial coefficient. Since, we get:

Footnotes