example of Taylor polynomials for sinx


In this entry we compute several Taylor polynomialsMathworldPlanetmath for the function sinx around x=0 and we produce graphs to compare the function with the corresponding Taylor polynomial. Recall that for a given function y=f(x) (here we suppose f is infinitely differentiableMathworldPlanetmathPlanetmath) and a point x=a, the Taylor polynomial of degree n (n0) is given by:

Tn(x)=f(a)+f(a)(x-a)+f′′(a)2!(x-a)2++f(n)(a)n!(x-a)n

where f(n) denotes the nth derivativeMathworldPlanetmath of f(x).

From now on we assume f(x)=sinx and a=0. Notice that the derivatives of sinx are cyclic:

f(x)=cosx,f′′(x)=-sinx,f′′′(x)=-cosx,f(4)(x)=sinx=f(x).

Therefore, the Taylor polynomials are easy to compute. In fact:

f(2n)(0)=0,f(2n+1)(0)=(-1)n

Thus, the first Taylor polynomial is given by:

T1(x)=0+1x=x

In the following graph one can compare the function T1(x)=x and sinx.

The function y=sinx and the first Taylor polynomial.

Notice that T2(x)=T1(x). More generally, T2n(x)=T2n-1(x) so we will not compute any other even order Taylor polynomials. However, the third degree Taylor polynomial is given by the formula:

T3(x)=x-x33!=x-x36

The function y=sinx and the third Taylor polynomial.

The Taylor polynomial of degree 5 is given by:

T5(x)=x-x33!+x55!

The function y=sinx and the fifth Taylor polynomial.

Next, we compute some Taylor polynomials of higher degree. In particular, the Taylor polynomial of degree 15 has the form:

T15(x)=x-x36+x5120-x75040+x9362880-x1139916800+x136227020800-x151307674368000

The function y=sinx and the Taylor polynomial of degree 15.

Finally, we produce a detailed view of the Taylor polynomial of degree 99. In particular, notice that the graphs are very close until x=34 or so, but after that T99(x) behaves rather jittery and wildly.


A detail of the Taylor polynomial of degree 99 (the interval (34,39)).

Title example of Taylor polynomials for sinx
Canonical name ExampleOfTaylorPolynomialsForsinX
Date of creation 2013-03-22 15:03:43
Last modified on 2013-03-22 15:03:43
Owner alozano (2414)
Last modified by alozano (2414)
Numerical id 7
Author alozano (2414)
Entry type Example
Classification msc 41A58
Related topic ComplexSineAndCosine
Related topic HigherOrderDerivativesOfSineAndCosine