In calculus, Taylor's theorem gives an approximation of a ${\textstyle k}$-times differentiable function around a given point by a polynomial of degree ${\textstyle k}$, called the ${\textstyle k}$-th-order Taylor polynomial. For a smooth function, the Taylor polynomial is the truncation at the order ${\textstyle 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.^{[1]} There are several versions of Taylor's theorem, some giving explicit estimates of the approximation error of the function by its Taylor polynomial.
The exponential function ${\textstyle y=e^{x}}$ (red) and the corresponding Taylor polynomial of degree four (dashed green) around the origin.
Taylor's theorem is named after the mathematician Brook Taylor, who stated a version of it in 1715,^{[2]} although an earlier version of the result was already mentioned in 1671 by James Gregory.^{[3]}
Graph of ${\textstyle f(x)=e^{x}}$ (blue) with its linear approximation${\textstyle P_{1}(x)=1+x}$ (red) at ${\textstyle a=0}$.
If a real-valued function${\textstyle f(x)}$ is differentiable at the point ${\textstyle x=a}$, then it has a linear approximation near this point. This means that there exists a function h_{1}(x) such that
is the linear approximation of ${\textstyle f(x)}$ for x near the point a, whose graph ${\textstyle y=P_{1}(x)}$ is the tangent line to the graph ${\textstyle y=f(x)}$ at x = a. The error in the approximation is:
$R_{1}(x)=f(x)-P_{1}(x)=h_{1}(x)(x-a).$
As x tends to a, this error goes to zero much faster than $f'(a)(x{-}a)$, making $f(x)\approx P_{1}(x)$ a useful approximation.
Graph of ${\textstyle f(x)=e^{x}}$ (blue) with its quadratic approximation $P_{2}(x)=1+x+{\dfrac {x^{2}}{2}}$ (red) at ${\textstyle a=0}$. Note the improvement in the approximation.
For a better approximation to ${\textstyle f(x)}$, we can fit a quadratic polynomial instead of a linear function:
Instead of just matching one derivative of ${\textstyle f(x)}$ at ${\textstyle 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 ${\textstyle x=a}$, more accurate than the linear approximation. Specifically,
which, given the limiting behavior of $h_{2}$, goes to zero faster than $(x-a)^{2}$ as x tends to a.
Approximation of ${\textstyle f(x)={\dfrac {1}{1+x^{2}}}}$ (blue) by its Taylor polynomials ${\textstyle P_{k}}$ of order ${\textstyle k=1,\ldots ,16}$ centered at ${\textstyle x=0}$ (red) and ${\textstyle x=1}$ (green). The approximations do not improve at all outside $(-1,1)$ and ${\textstyle (1-{\sqrt {2}},1+{\sqrt {2}})}$, respectively.
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 $(x-a)^{k}$ 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 (locally) determined by its derivatives at this point.
Taylor's theorem is of asymptotic nature: it only tells us that the error ${\textstyle R_{k}}$ in an approximation by a ${\textstyle k}$-th order Taylor polynomial P_{k} tends to zero faster than any nonzero ${\textstyle k}$-th degree polynomial as ${\textstyle x\to a}$. 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 formulas for the remainder term (given below) 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 (see animation on the right.)
There are several ways we might use the remainder term:
Estimate the error for a polynomial P_{k}(x) of degree k estimating ${\textstyle f(x)}$ on a given interval (a – r, a + r). (Given the interval and degree, we find the error.)
Find the smallest degree k for which the polynomial P_{k}(x) approximates ${\textstyle f(x)}$ to within a given error tolerance on a given interval (a − r, a + r) . (Given the interval and error tolerance, we find the degree.)
Find the largest interval (a − r, a + r) on which P_{k}(x) approximates ${\textstyle f(x)}$ to within a given error tolerance. (Given the degree and error tolerance, we find the interval.)
Taylor's theorem in one real variableEdit
Statement of the theoremEdit
The precise statement of the most basic version of Taylor's theorem is as follows:
Taylor's theorem^{[4]}^{[5]}^{[6]} — Let k ≥ 1 be an integer and let the functionf : R → R be k times differentiable at the point a ∈ R. Then there exists a function h_{k} : R → R such that
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 h_{k} : R → R and a ${\textstyle k}$-th order polynomial p such that
then p = P_{k}. Taylor's theorem describes the asymptotic behavior of the remainder term
$R_{k}(x)=f(x)-P_{k}(x),$
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
$R_{k}(x)=o(|x-a|^{k}),\quad x\to a.$
Explicit formulas for the remainderEdit
Under stronger regularity assumptions on f there are several precise formulas for the remainder term R_{k} of the Taylor polynomial, the most common ones being the following.
for some real number ${\textstyle \xi _{C}}$ between ${\textstyle a}$ and ${\textstyle x}$. This is the Cauchy form^{[9]} of the remainder.
These refinements of Taylor's theorem are usually proved using the mean value theorem, whence the name. Additionally, notice that this is precisely the mean value theorem when ${\textstyle k=0}$. Also other similar expressions can be found. For example, if G(t) is continuous on the closed interval and differentiable with a non-vanishing derivative on the open interval between ${\textstyle a}$ and ${\textstyle x}$, then
for some number ${\textstyle \xi }$ between ${\textstyle a}$ and ${\textstyle 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 Lagrange form is obtained by taking $G(t)=(x-t)^{k+1}$ and the Cauchy form is obtained by taking $G(t)=t-a$.
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 (k + 1)th derivative of f is continuous on the closed interval [a,x].
Integral form of the remainder^{[10]} — Let ${\textstyle f^{(k)}}$ be absolutely continuous on the closed interval between ${\textstyle a}$ and ${\textstyle x}$. Then
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 (k + 1)-times continuously differentiable in an interval I containing a. Suppose that there are real constants q and Q such that
$q\leq f^{(k+1)}(x)\leq Q$
throughout I. Then the remainder term satisfies the inequality^{[11]}
for all x∈(a − r,a + r). The second inequality is called a uniform estimate, because it holds uniformly for all x on the interval (a − r,a + r).
ExampleEdit
Approximation of ${\textstyle e^{x}}$ (blue) by its Taylor polynomials $P_{k}$ of order ${\textstyle k=1,\ldots ,7}$ centered at ${\textstyle x=0}$ (red).
Suppose that we wish to find the approximate value of the function ${\textstyle f(x)=e^{x}}$ on the interval ${\textstyle [-1,1]}$ 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 ${\textstyle f^{(k)}(x)=e^{x}}$ for all ${\textstyle k}$, and in particular, ${\textstyle f^{(k)}(0)=1}$. Hence the ${\textstyle k}$-th order Taylor polynomial of ${\textstyle f}$ at ${\textstyle 0}$ and its remainder term in the Lagrange form are given by
where ${\textstyle \xi }$ is some number between 0 and x. Since e^{x} is increasing by (★), we can simply use ${\textstyle e^{x}\leq 1}$ for ${\textstyle x\in [-1,0]}$ to estimate the remainder on the subinterval $[-1,0]$. To obtain an upper bound for the remainder on $[0,1]$, we use the property ${\textstyle e^{\xi }<e^{x}}$ for ${\textstyle 0<\xi <x}$ to estimate
(See factorial or compute by hand the values ${\textstyle 9!=362880}$ and ${\textstyle 10!=3628800}$.) As a conclusion, Taylor's theorem leads to the approximation
For instance, this approximation provides a decimal expression$e\approx 2.71828$, correct up to five decimal places.
Relationship to analyticityEdit
Taylor expansions of real analytic functionsEdit
Let I ⊂ R be an open interval. By definition, a function f : I → R is real analytic if it is locally defined by a convergent power series. This means that for every a ∈ I there exists some r > 0 and a sequence of coefficients c_{k} ∈ R such that (a − r, a + r) ⊂ I and
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 b ∈ R, it must converge uniformly on the closed interval${\textstyle [a-r_{b},a+r_{b}]}$, where ${\textstyle r_{b}=\left\vert b-a\right\vert }$. Here only the convergence of the power series is considered, and it might well be that (a − R,a + R) extends beyond the domain I of f.
The Taylor polynomials of the real analytic function f at a are simply the finite truncations
are also analytic, since their defining power series have the same radius of convergence as the original series. Assuming that [a − r, a + r] ⊂ I and r < R, all these series converge uniformly on (a − r, a + r). Naturally, in the case of analytic functions one can estimate the remainder term ${\textstyle R_{k}(x)}$ by the tail of the sequence of the derivatives f′(a) 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 seriesEdit
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. (However, even if the Taylor series converges, it might not converge to f, as explained below; f is then said to be non-analytic.)
of an infinitely many times differentiable function f : R → R 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 (a − r, a + r), then for any order k and for any r > 0 there exists a constant M_{k,r} > 0 such that
for every x ∈ (a − r,a + r). Sometimes the constants M_{k,r} can be chosen in such way that M_{k,r} is bounded above, for fixed r and all k. Then the Taylor series of fconverges uniformly to some analytic function
(One also gets convergence even if M_{k,r} is not bounded above as long as it grows slowly enough.)
The limit function T_{f} is by definition always analytic, but it is not necessarily equal to the original function f, even if f is infinitely differentiable. In this case, we say f is a non-analytic smooth function, for example a flat function:
for some polynomial p_{k} of degree 2(k − 1). The function $e^{-{\frac {1}{x^{2}}}}$ tends to zero faster than any polynomial as ${\textstyle x\to 0}$, so f is infinitely many times differentiable and f^{(k)}(0) = 0 for every positive integer k. The above results all hold in this case:
The Taylor series of f converges uniformly to the zero function T_{f}(x) = 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 k ∈ N and radius r > 0 there exists M_{k,r} > 0 satisfying the remainder bound (★★) above.
However, as k increases for fixed r, the value of M_{k,r} grows more quickly than r^{k}, and the error does not go to zero.
Let r > 0 such that the closed diskB(z, r) ∪ S(z, r) is contained in U. Then Cauchy's integral formula with a positive parametrization γ(t) = z + re^{it} of the circle S(z, r) with $t\in [0,2\pi ]$ gives
Here all the integrands are continuous on the circleS(z, r), 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^{[12]}
of f converges uniformly on any open disk${\textstyle B(c,r)\subset U}$ with ${\textstyle S(c,r)\subset U}$ into some function T_{f}. Furthermore, using the contour integral formulas for the derivatives f^{(k)}(c),
so any complex differentiable function f in an open set U ⊂ C 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 U ∈ C and a-centered intervals (a − r, a + r) replaced by c-centered disks B(c, r). In particular, the Taylor expansion holds in the form
where the remainder term R_{k} 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${\textstyle \gamma }$ which parametrizes the boundary ${\textstyle \partial W\subset U}$ of a region ${\textstyle W\subset U}$, one obtains expressions for the derivatives f^{(j)}(c) as above, and modifying slightly the computation for T_{f}(z) = f(z), one arrives at the exact formula
The important feature here is that the quality of the approximation by a Taylor polynomial on the region ${\textstyle W\subset U}$ is dominated by the values of the function f itself on the boundary ${\textstyle \partial W\subset U}$. Similarly, applying Cauchy's estimates to the series expression for the remainder, one obtains the uniform estimates
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 ${\textstyle z=i}$ and ${\textstyle z=-i}$, and it is analytic elsewhere. Now its Taylor series centered at z_{0} converges on any disc B(z_{0}, r) with r < |z − z_{0}|, where the same Taylor series converges at z ∈ C. Therefore, Taylor series of f centered at 0 converges on B(0, 1) and it does not converge for any z ∈ C 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 ${\textstyle B(1,{\sqrt {2}})}$ and does not converge for any z ∈ C with ${\textstyle \left\vert z-1\right\vert >{\sqrt {2}}}$.
If this is the case, then ${\textstyle L=df({\boldsymbol {a}})}$ is the (uniquely defined) 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
for α ∈ N^{n} and x ∈ R^{n}. If all the ${\textstyle k}$-th order partial derivatives of f : R^{n} → R are continuous at a ∈ R^{n}, 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 (k − 1)-th order partial derivatives of f exist in some neighborhood of a and are differentiable at a.^{[13]} Then we say that f is ktimes differentiable at the point a.
Taylor's theorem for multivariate functionsEdit
Using notations of the preceding section, one has the following theorem.
Multivariate version of Taylor's theorem^{[14]} — Let f : R^{n} → R be a k-times continuously differentiable function at the point a ∈ R^{n}. Then there exist functions h_{α} : R^{n} → R, where $|\alpha |=k,$ such that
If the function f : R^{n} → R is k + 1 times continuously differentiable in a closed ball$B=\{\mathbf {y} \in \mathbb {R} ^{n}:\left\|\mathbf {a} -\mathbf {y} \right\|\leq r\}$ for some $r>0$, then one can derive an exact formula for the remainder in terms of (k+1)-th order partial derivatives of f in this neighborhood.^{[15]} Namely,
The proof here is based on repeated application of L'Hôpital's rule. Note that, for each ${\textstyle j=0,1,...,k-1}$, $f^{(j)}(a)=P^{(j)}(a)$. Hence each of the first ${\textstyle k-1}$ derivatives of the numerator in $h_{k}(x)$ vanishes at $x=a$, and the same is true of the denominator. Also, since the condition that the function ${\textstyle f}$ be ${\textstyle k}$ times differentiable at a point requires differentiability up to order ${\textstyle k-1}$ in a neighborhood of said point (this is true, because differentiability requires a function to be defined in a whole neighborhood of a point), the numerator and its ${\textstyle k-2}$ derivatives are differentiable in a neighborhood of ${\textstyle a}$. Clearly, the denominator also satisfies said condition, and additionally, doesn't vanish unless ${\textstyle x=a}$, therefore all conditions necessary for L'Hôpital's rule are fulfilled, and its use is justified. So
Let $f_{1}$ and $g_{1}$ be continuous functions on $[a,b]$. Since $a<x<b$ so we can work with the interval $[a,x]$. Let $f_{1}$ and $g_{1}$ be differentiable on $(a,x)$. Assume $g_{1}'(x)\neq 0$ for all $x\in (a,b)$.
Then there exists $c_{1}\in (a,x)$ such that
Derivation for the mean value forms of the remainderEdit
Let G be any real-valued function, continuous on the closed interval between ${\textstyle a}$ and ${\textstyle x}$ and differentiable with a non-vanishing derivative on the open interval between ${\textstyle a}$ and ${\textstyle x}$, and define
for some ${\textstyle \xi }$ on the open interval between ${\textstyle a}$ and ${\textstyle x}$. Note that here the numerator ${\textstyle F(x)-F(a)=R_{k}(x)}$ is exactly the remainder of the Taylor polynomial for ${\textstyle y=f(x)}$. Compute
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 $G(t)=(x-t)^{k+1}$ and the Cauchy form by choosing $G(t)=t-a$.
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^{(k)} 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 remainderEdit
Substituting this into the formula in (★★★★) 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 polynomialsEdit
We prove the special case, where f : R^{n} → R 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.^{[17]} Parametrize the line segment between a and x by u(t) = a + t(x − a). We apply the one-variable version of Taylor's theorem to the function g(t) = f(u(t)):
Padé approximant – 'Best' approximation of a function by a rational function of given order
Newton series – Discrete analog of a derivativePages displaying short descriptions of redirect targets
FootnotesEdit
^(2013). "Linear and quadratic approximation" Retrieved December 6, 2018
^Taylor, Brook (1715). Methodus Incrementorum Directa et Inversa [Direct and Reverse Methods of Incrementation] (in Latin). London. p. 21–23 (Prop. VII, Thm. 3, Cor. 2). Translated into English in Struik, D. J. (1969). A Source Book in Mathematics 1200–1800. Cambridge, Massachusetts: Harvard University Press. pp. 329–332.
^Genocchi, Angelo; Peano, Giuseppe (1884), Calcolo differenziale e principii di calcolo integrale, (N. 67, pp. XVII–XIX): Fratelli Bocca ed.{{citation}}: CS1 maint: location (link)
^Spivak, Michael (1994), Calculus (3rd ed.), Houston, TX: Publish or Perish, p. 383, ISBN 978-0-914098-89-8
^This follows from iterated application of the theorem that if the partial derivatives of a function f exist in a neighborhood of a and are continuous at a, then the function is differentiable at a. See, for instance, Apostol 1974, Theorem 12.11.