Taylor series
Mathematical approximation of a function
From Wikipedia, the free encyclopedia
In mathematical analysis, the Taylor series or Taylor expansion of a function is an infinite sum of terms that are expressed in terms of the function's derivatives at a single point. For most common functions, the function and the sum of its Taylor series are equal near this point. Taylor series are named after Brook Taylor, who introduced them in 1715. A Taylor series is also called a Maclaurin series when 0 is the point where the derivatives are considered, after Colin Maclaurin, who made extensive use of this special case of Taylor series in the 18th century.

The partial sum formed by the first n + 1 terms of a Taylor series is a polynomial of degree n that is called the nth Taylor polynomial of the function. Taylor polynomials are approximations of a function, which become generally more accurate as n increases. Taylor's theorem gives quantitative estimates on the error introduced by the use of such approximations. If the Taylor series of a function is convergent, its sum is the limit of the infinite sequence of the Taylor polynomials. A function may differ from the sum of its Taylor series, even if its Taylor series is convergent. A function is analytic at a point x if it is equal to the sum of its Taylor series in some open interval (or open disk in the complex plane) containing x. This implies that the function is analytic at every point of the interval (or disk).
Definition
The Taylor series of a real or complex-valued function f(x), that is infinitely differentiable at a real or complex number a, is the power series Here, n! denotes the factorial of n. The function f(n)(a) denotes the nth derivative of f evaluated at the point a. The derivative of order zero of f is defined to be f itself and (x − a)0 and 0! are both defined to be 1. This series can be written by using sigma notation, as in the right side formula.[1] The corresponding Taylor polynomial of degree n is With a = 0, the Maclaurin series takes the form:[2]
Basic properties
Taylor series inherit the basic properties of power series. Taylor series can also be combined algebraically. Sums, differences, products, and scalar multiples of Taylor series are obtained by the corresponding operations on power series. In particular, the Taylor series of around a point is the Cauchy product of the Taylor series of and about .[3] Compositions of functions having Taylor series likewise have Taylor series, obtained by substituting one convergent power series into another when the substitution is valid.[4]
A Taylor series may be differentiated and integrated term by term. Thus and The differentiated and integrated series have the same radius of convergence as the original power series, although the convergence behavior at the boundary may be different.[5][6]
These properties sometimes allow the Taylor series of functions, such as the arctangent, to be computed in terms of simpler series, such as the geometric series.[3]
Calculation of Taylor series
Several methods can be used to calculate Taylor series. One may apply the definition directly, although this often requires first identifying a general formula for the derivatives or coefficients.[7] In many cases, Taylor series can also be obtained from known expansions by algebraic manipulations of power series, such as substitution, multiplication, division, addition, or subtraction, as well as termwise differentiation and integration of known Taylor series.[8] In some cases, they may also be derived by repeated integration by parts. In practice, Taylor series are often computed with the aid of computer algebra systems.[9][10]
A number of standard Maclaurin series are frequently used as starting points for calculating other Taylor series. Some fundamental examples are listed below; a more comprehensive listing appears later in the article.
| Function | Maclaurin series | Convergence |
|---|---|---|
| All | ||
| All | ||
| All | ||
Examples
Term-by-term differentiation
Inside the region of convergence, a Taylor series can be differentiated term-by-term. For example, differentiating the geometric series one gets Thus This process can be iterated, giving and so forth.[11]
Term-by-term integration
Inside the region of convergence, a Taylor series can be integrated term-by-term. For example, integrating the geometric series one gets This gives the Maclaurin series[11] valid for .
Substitution
Taylor series can be composed, for example if the Taylor series of is known, then the Taylor series of is obtained by evaluating at term by term. For instance, the geometric series evaluated at gives This last series can be integrated term-by-term to give[11] for .
Composition
In order to compute the 7th-degree Maclaurin polynomial for the function one may first rewrite the function as the composition of two functions x ↦ ln(1 + x) and x ↦ cos x − 1. The Taylor series for the natural logarithm is (using big O notation) and for the cosine function
The first several terms from the second series can be substituted into each term of the first series. Because the first term in the second series has degree 2, three terms of the first series suffice to give a polynomial of degree 7:[12]
Since the cosine is an even function, the coefficients for all the odd powers are zero.
Division
Given that the Taylor series at 0 of the function g(x) = ex/cos x. The Taylor series for the exponential function is and the series for cosine is
Assume the series for their quotient is Multiplying both sides by the denominator cos x and then expanding it as a series yields
Comparing the coefficients of g(x) cos x with the coefficients of ex,
The coefficients ci of the series for g(x) can thus be computed one at a time, amounting to long division of the series for ex and cos x:
Non-elementary integrals
Term-by-term integration of Taylor series can be used to find the Taylor series of non-elementary integrals. For example, the Fresnel integral is and cannot be expressed in terms of elementary functions. Its Maclaurin series can be determined by termwise integration of the series giving[13]
Differential equations
Taylor series can also be used to solve some ordinary differential equations. The method is to assume that the solution has a power series expansion, differentiate the series term by term, substitute the resulting series into the differential equation, and then determine the coefficients by equating like powers of the variable.[14]
For example, to solve suppose that Then Substitution into the differential equation gives Since power series expansions are unique, each coefficient must vanish, so The even and odd coefficients are therefore determined separately by the arbitrary constants and : Thus or equivalently .
Approximation error and Taylor's theorem
The error in this approximation is no more than |x|9 / 9!. For a full cycle centered at the origin (−π < x < π), the error is less than 0.08215. In particular, for −1 < x < 1, the error is less than 0.000003.
In contrast, also shown is a picture of the natural logarithm function ln(1 + x) and some of its Taylor polynomials around a = 0. These approximations converge to the function only in the region −1 < x ≤ 1. Outside of this region, the higher-degree Taylor polynomials are worse approximations for the function.The error incurred in approximating a function by its degree n Taylor polynomial is called the remainder and is denoted by the function Rn(x). Taylor's theorem can be used to obtain a bound on the size of the remainder.[15]
In particular, Taylor's theorem writes a function, where the hypotheses of the theorem are satisfied, in the form The behavior of the remainder as n tends to infinity determines whether the Taylor series represents the original function, which are questions of convergence and analyticity.
Generalization in finite differences
One form of the Gregory–Newton interpolation formula can be written as which interpolates a polynomial in terms of its finite differences evaluated at a single point , and where is the falling factorial. For a polynomial, this series terminates and gives the polynomial exactly; more generally, a function admits a Gregory–Newton development under suitable analytic hypotheses, classically formulated by Niels Erik Nørlund in terms of holomorphy in a half-plane together with an exponential type growth condition.[16][17][18]
One generalization of the Taylor series that does converge to the value of the function itself for any bounded continuous function on (0, ∞), and this can be done by using the calculus of finite differences. Specifically, the following theorem, due to Einar Hille, that for any t > 0,[19]
Here Δn
h is the nth finite difference operator with step size h. The series is precisely the Taylor series, except that divided differences appear in place of differentiation. When the function f is analytic at a, the terms in the series converge to the terms of the Taylor series, and in this sense generalizes the usual Taylor series.
In general, for any infinite sequence ai, the following power series identity holds:[20] So in particular,[20]
The series on the right is the expected value of f(a + X), where X is a Poisson-distributed random variable that takes the value jh with probability e−t/h·(t/h)j/j!. Hence,[21]
The law of large numbers implies that the identity holds.[20]
Convergence and analyticity
A Taylor series is formed from the values of all derivatives of a function at a single point, but this does not by itself imply that the series converges to the function. In general, a Taylor series may fail to converge, or it may converge to a function different from the original one.
For example, the function is infinitely differentiable at , and all of its derivatives at are equal to zero. Its Taylor series at is therefore the zero series, even though the function itself is not identically zero. This gives a standard example of a non-analytic smooth function.[22]

More generally, the Taylor series of a function represents the function at a point precisely when the remainder terms in Taylor's theorem tend to zero at that point. If then the Taylor series converges to exactly when
A function is called analytic at a point if it is equal to the sum of its Taylor series in some open interval around that point, or, in the complex case, in some open disk. Equivalently, a function is analytic in a region if it is locally given by a convergent power series. Thus, if near , then differentiating the series term by term and setting gives Thus the power series expansion of an analytic function is its Taylor series.[23][24]
In real analysis, infinite differentiability does not imply analyticity, as the example above shows. Borel's lemma implies that every power series is the Taylor series of some smooth function. In complex analysis, however, every holomorphic function is analytic.[25] A function whose Taylor series converges to the function throughout the whole complex plane is called an entire function. Polynomials, the exponential function, and the sine and cosine functions are entire functions.[26]
Radius of convergence
For any power series there is a number , called the radius of convergence, such that the series converges absolutely for and diverges for .[27][28] The radius may be zero, finite and positive, or infinite. It is given by the Cauchy–Hadamard formula with the usual conventions for and . When the limit exists, the ratio test often gives
Thus, when a Taylor series converges, it does so in an open interval centered at in the real case, or in an open disk centered at in the complex case. The behavior at the boundary points may vary: the series may converge at some, all, or none of them.[29]
For a complex analytic function, the radius of convergence of the Taylor series at is the distance from to the nearest point where the function cannot be continued holomorphically. In many common examples this is the distance to the nearest singularity in the complex plane.[30]
This explains the different radii of convergence for familiar Taylor series. The series for , , and have infinite radius of convergence because these functions are entire. By contrast, the Taylor series for at has radius of convergence , because the nearest singularity is at .[31]
Complex singularities can determine the radius of convergence even for functions that are smooth on the real line. For example, is smooth for every real , but its Taylor series at has radius of convergence , because the corresponding complex function has singularities at and .[30]
The radius of convergence should not be confused with the quality of approximation by a low-degree Taylor polynomial. A Taylor polynomial may approximate a function accurately near the center even if the full Taylor series has a small radius of convergence. Conversely, near the boundary of the interval or disk of convergence, the Taylor series may converge slowly. Outside the radius of convergence, the Taylor series does not represent the function.[27][32]
Generalizations near singularities
A Taylor series cannot be centered at a point where the function is not analytic. Some singularities, namely poles, can be accounted for by a Laurent series. If has a pole of order at , then near it has a Laurent series of the form A meromorphic function is a function which is analytic except at isolated poles; near each pole it has a Laurent series with only finitely many negative-power terms.[33]
More generally, a function analytic in an annulus has a convergent Laurent series of the form in that annulus.[34]
Other types of singularities, namely branch points, can occur for algebraic functions. If is an algebraic function of a complex variable and is a branch point, then need not have a Taylor series based at . However, after a change of variables where is a positive integer called the ramification index, a branch of the function becomes analytic as a function of . The resulting expansion in fractional powers of is known as a Puiseux series.[35]
Taylor series in multiple variables
The Taylor series may also be generalized to functions of more than one variable with[36] The last expression is the multivariate Taylor series in terms of multi-index notation with a full analogy to the single variable case.
For example, for a function f(x, y) that depends on two variables, x and y, the Taylor series to second order about the point (a, b) is where the subscripts denote the respective partial derivatives.
Second-order Taylor series in several variables
A second-order Taylor series expansion of a scalar-valued function of more than one variable can be written compactly as where D f(a) is the gradient of f evaluated at x = a and D2 f(a) is the Hessian matrix.
Example

In order to compute a second-order Taylor series expansion around the point (a, b) = (0, 0) of the function one first computes all the necessary partial derivatives:
Evaluating these derivatives at the origin gives the Taylor coefficients
Substituting these values in to the general formula produces
Since ln(1 + y) is analytic in |y| < 1, we have
Applications
Taylor polynomials are used to approximate functions near a point. Keeping only the first nonzero terms often gives a simpler model of a more complicated expression. For example, the small-angle approximation comes from the first term of the Taylor series for sine, and higher-order approximations are obtained by retaining more terms. This approximation is widely used: for example, in Gaussian optics where the behavior of light rays making small angles with an axis is studied by replacing the sine function with its linear approximation.
Such approximations are used throughout mathematics, physics, and engineering. In perturbation theory, a complicated quantity is often expanded in powers of a small parameter, and the first few terms are used as an approximate solution. Taylor expansions also occur in the analysis of the simple pendulum and in numerical methods for approximating functions.[37][38]
History
The ancient Greek philosopher Zeno of Elea considered the problem of summing an infinite series to achieve a finite result, but rejected it as an impossibility; the result was Zeno's paradox.[39] Later, Aristotle proposed a philosophical resolution of the paradox, but the mathematical content was apparently unresolved until taken up by Archimedes, as it had been prior to Aristotle by the Presocratic Atomist Democritus. It was through Archimedes's method of exhaustion that an infinite number of progressive subdivisions could be performed to achieve a finite result.[40] Liu Hui independently employed a similar method a few centuries later.[41]
In the 14th century, the earliest examples of specific Taylor series (but not the general method) were given by the Indian mathematician Madhava of Sangamagrama.[42] Though no record of his work survives, writings of his followers in the Kerala school of astronomy and mathematics suggest that he found the Taylor series for the trigonometric functions of sine, cosine, and arctangent; see Madhava series. During the following two centuries, his followers developed further series expansions and rational approximations.[43]
In late 1670, James Gregory was shown in a letter from John Collins several Maclaurin series (sin x, cos x, arcsin x, and x cot x) derived by Isaac Newton, and told that Newton had developed a general method for expanding functions in series. Newton had in fact used a cumbersome method involving long division of series and term-by-term integration, but Gregory did not know it and set out to discover a general method for himself. In early 1671 Gregory discovered something like the general Maclaurin series and sent a letter to Collins including series for arctan x, tan x, sec x, ln sec x (the integral of tan), ln tan 1/2(1/2π + x) (the integral of sec, the inverse Gudermannian function), arcsec(√2 ex), and 2 arctan ex − 1/2π (the Gudermannian function). However, thinking that he had merely redeveloped a method by Newton, Gregory never described how he obtained these series, and it can only be inferred that he understood the general method by examining scratch work he had scribbled on the back of another letter from 1671.[44]
In 1691–1692, Newton wrote down an explicit statement of the Taylor and Maclaurin series in an unpublished version of his work De Quadratura Curvarum. It was the earliest explicit formulation of the general Taylor series.[45] However, this work by Newton was never completed and the relevant sections were omitted from the portions published in 1704 under the title Tractatus de Quadratura Curvarum.[46]
It was not until 1715 that a general method for constructing these series for all functions for which they exist was finally published by Brook Taylor, after whom the series are now named.[47]
The Maclaurin series was named after Colin Maclaurin, a Scottish mathematician, who published a special case of the Taylor result in the mid-18th century.[48]
List of Maclaurin series of some common functions
Several important Maclaurin series expansions follow. All these expansions are valid for complex arguments x. For multivalued complex functions, such as logarithms, fractional powers, and inverse trigonometric functions, a principal branch is understood.
Exponential function

The exponential function ex (with base e) has Maclaurin series[49] It converges for all x.
The exponential generating function of the Bell numbers is the exponential function of the predecessor of the exponential function:
Natural logarithm
The natural logarithm (with base e) has Maclaurin series[50]
The last series is known as Mercator series, named after Nicholas Mercator since it was published in his 1668 treatise Logarithmotechnia.[51] Both of these series converge for |x| < 1. In addition, the series for ln(1 − x) converges for x = −1, and the series for ln(1 + x) converges for x = 1.[50]
Geometric series
The geometric series and its derivatives have Maclaurin series
All are convergent for |x| < 1. These are special cases of the binomial series given in the next section.
Binomial series
The binomial series is the power series
whose coefficients are the generalized binomial coefficients[52]
(If n = 0, this product is an empty product and has value 1.) It converges for |x| < 1 for any real or complex number α.
When α = −1, this is essentially the infinite geometric series mentioned in the previous section. The special cases α = 1/2 and α = −1/2 give the square root function and its inverse:[53]
When only the linear term is retained, this simplifies to the binomial approximation.
Trigonometric functions
The usual trigonometric functions and their inverses have the following Maclaurin series:[54]
All angles are expressed in radians. The numbers Bk appearing in the expansions of tan x are the Bernoulli numbers. The Ek in the expansion of sec x are Euler numbers.[55]
Hyperbolic functions
The hyperbolic functions have Maclaurin series closely related to the series for the corresponding trigonometric functions:[56]
The numbers Bk appearing in the series for tanh x are the Bernoulli numbers.[56]
Polylogarithmic functions
The polylogarithms have these defining identities:
The Legendre chi functions are defined as follows:
And the formulas presented below are called inverse tangent integrals:
These formulas occur in statistical mechanics. Integrals encountered in Bose–Einstein and Fermi–Dirac statistics can be expressed in terms of polylogarithms.[57] The inverse tangent integral value appears in the per-site entropy of spanning trees on a large triangular lattice.[58]
Elliptic functions
The complete elliptic integrals of first kind K and of second kind E can be defined as follows:
The Jacobi theta functions describe the world of the elliptic modular functions and they have these Taylor series:
See also
- Asymptotic expansion
- Newton polynomial
- Padé approximant – best approximation by a rational function
- Puiseux series – power series with rational exponents
- Approximation theory
- Function approximation