# Calculus/Taylor series

## Contents

## Taylor Series[edit]

The **Taylor series** of an infinitely, often differentiable real, (or complex) function *f* defined on an open interval (*a*-*r*, *a*+*r*) is the power series

Here, *n*! is the factorial of *n* and *f* ^{(n)}(*a*) denotes the *n*th derivative of *f* at the point *a*. If this series converges for every *x* in the interval (*a*-*r*, *a*+*r*) and the sum is equal to *f*(*x*), then the function *f*(*x*) is called **analytic**. To check whether the series converges towards *f*(*x*), one normally uses estimates for the remainder term of Taylor's theorem. A function is analytic if and only if a power series converges to the function; the coefficients in that power series are then necessarily the ones given in the above Taylor series formula.

If *a* = 0, the series is also called a **Maclaurin series**.

The importance of such a power series representation is threefold. First, differentiation and integration of power series can be performed term by term and is hence particularly easy. Second, an analytic function can be uniquely extended to a holomorphic function defined on an open disk in the complex plane, which makes the whole machinery of complex analysis available. Third, the (truncated) series can be used to approximate values of the function near the point of expansion.

Note that there are examples of infinitely often differentiable functions *f*(*x*) whose Taylor series converge, but are *not* equal to *f*(*x*). For instance, for the function defined piecewise by saying that *f*(*x*) = exp(−1/*x*²) if *x* ≠ 0 and *f*(0) = 0, all the derivatives are zero at *x* = 0, so the Taylor series of *f*(*x*) is zero, and its radius of convergence is infinite, even though the function most definitely is not zero. This particular pathology does not afflict complex-valued functions of a complex variable. Notice that exp(−1/*z*²) does not approach 0 as *z* approaches 0 along the imaginary axis.

Some functions cannot be written as Taylor series because they have a singularity; in these cases, one can often still achieve a series expansion if one allows also negative powers of the variable *x*; see Laurent series. For example, *f*(*x*) = exp(−1/*x*²) can be written as a Laurent series.

The Parker-Sockacki theorem is a recent advance in finding Taylor series which are solutions to differential equations. This theorem is an expansion on the Picard iteration.

### Derivation/why this works[edit]

If a function f(x) is written as a infinite power series, it will look like this:

f(x)=c_{0}(x-a)^{0}+c_{1}(x-a)^{1}+c_{2}(x-a)^{2}+c_{3}(x-a)^{3}+c_{4}(x-a)^{4}+c_{5}(x-a)^{5}+c_{6}(x-a)^{6}+c_{7}(x-a)^{7}+...

where a is half the radius of convergence and c_{0},c_{1},c_{2},c_{3},c_{4}... are coefficients. If we substitute a for x:

f(a)=c_{0}

If we differentiate:

f´(x)=1c_{1}(x-a)^{0}+2c_{2}(x-a)^{1}+3c_{3}(x-a)^{2}+4c_{4}(x-a)^{3}+5c_{5}(x-a)^{4}+6c_{6}(x-a)^{5}+7c_{7}(x-a)^{6}+...

If we substitute a for x:

f´(a)=1c_{1}

If we differentiate:

f´´(x)=2c_{2}+3*2*c_{3}(x-a)^{1}+4*3*c_{4}(x-a)^{2}+5*4*c_{5}(x-a)^{3}+6*5*c_{6}(x-a)^{4}+7*6*c_{7}(x-a)^{5}+...

If we substitute a for x:

f´´(a)=2c_{2}

Extrapolating:

n!c_{n}=f^{n}(a)

where f^{0}(x)=f(x) and f^{1}(x)=f´(x) and so on.We can actually go ahead and say that the power approximation of f(x) is:

f(x)=S_{n=0}^{¥}((f^{n}(a)/n!)*(x-a)^{n})

<this needs to be improved>

### List of Taylor series[edit]

Several important Taylor series expansions follow. All these expansions are also valid for complex arguments *x*.

Exponential function and natural logarithm:

The numbers *B*_{k} appearing in the expansions of tan(*x*) and tanh(*x*) are the Bernoulli numbers. The C(α,*n*) in the binomial expansion are the binomial coefficients. The *E*_{k} in the expansion of sec(*x*) are Euler numbers.

### Multiple dimensions[edit]

The Taylor series may be generalized to functions of more than one variable with

### History[edit]

The Taylor series is named for mathematician Brook Taylor, who first published the power series formula in 1715.

### Constructing a Taylor Series[edit]

Several methods exist for the calculation of Taylor series of a large number of functions. One can attempt to use the Taylor series as-is and generalize the form of the coefficients, or one can use manipulations such as substitution, multiplication or division, addition or subtraction of standard Taylor series (such as those above) to construct the Taylor series of a function, by virtue of Taylor series being power series. In some cases, one can also derive the Taylor series by repeatedly applying integration by parts. The use of computer algebra systems to calculate Taylor series is common, since it eliminates tedious substitution and manipulation.

#### Example 1[edit]

Consider the function

for which we want a Taylor series at 0.

We have for the natural logarithm

and for the cosine function

We can simply substitute the second series into the first. Doing so gives

Expanding by using multinomial coefficients gives the required Taylor series. Note that cosine and therefore are even functions, meaning that , hence the coefficients of the odd powers , , , and so on have to be zero and don't need to be calculated. The first few terms of the series are

The general coefficient can be represented using Faà di Bruno's formula. However, this representation does not seem to be particularly illuminating and is therefore omitted here.

#### Example 2[edit]

Suppose we want the Taylor series at 0 of the function

We have for the exponential function

and, as in the first example,

Assume the power series is

Then multiplication with the denominator and substitution of the series of the cosine yields

Collecting the terms up to fourth order yields

Comparing coefficients with the above series of the exponential function yields the desired Taylor series