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 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 terms of a Taylor series is a polynomial of degree that is called the th Taylor polynomial of the function. Taylor polynomials are approximations of a function, which become generally more accurate as 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 if it is equal to the sum of its Taylor series in some open interval (or open disk in the complex plane) containing . 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 , that is infinitely differentiable at a real or complex number , is the power series

Here, denotes the factorial of . The function denotes the th derivative of evaluated at the point . The derivative of order zero of is defined to be itself and and are both defined to be . This series can be written by using sigma notation, as in the right side formula. The corresponding Taylor polynomial of degree is

When , the series is also called a Maclaurin series and takes the form:

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 . Compositions of functions having Taylor series likewise have Taylor series, obtained by substituting one convergent power series into another when the substitution is valid.

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.

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.

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. 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. 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.

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.

+ Common Maclaurin series 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.

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

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

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 and . 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:

Since the cosine is an even function, the coefficients for all the odd powers are zero.

Division Given that the Taylor series at of the function . 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 and then expanding it as a series yields

Comparing the coefficients of with the coefficients of ,

The coefficients of the series for can thus be computed one at a time, amounting to long division of the series for and :

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

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.

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 incurred in approximating a function by its degree Taylor polynomial is called the remainder and is denoted by the function . Taylor's theorem can be used to obtain a bound on the size of the remainder.

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 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.

One generalization of the Taylor series that does converge to the value of the function itself for any bounded continuous function on , and this can be done by using the calculus of finite differences. Specifically, the following theorem, due to Einar Hille, that for any ,

Here is the th finite difference operator with step size . The series is precisely the Taylor series, except that divided differences appear in place of differentiation. When the function is analytic at , 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 , the following power series identity holds:

So in particular,

The series on the right is the expected value of , where is a Poisson-distributed random variable that takes the value with probability . Hence,

The law of large numbers implies that the identity holds.

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.

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.

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. 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.

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 . 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.

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.

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 .

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 .