# example of Taylor polynomials for $\mathop{sin}\nolimits x$

In this entry we compute several Taylor polynomials for the function $\sin x$ 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 differentiable) and a point $x=a$, the Taylor polynomial of degree $n$ ($n\geq 0$) is given by:

 $T_{n}(x)=f(a)+f^{\prime}(a)(x-a)+\frac{f^{\prime\prime}(a)}{2!}(x-a)^{2}+% \ldots+\frac{f^{(n)}(a)}{n!}(x-a)^{n}$

where $f^{(n)}$ denotes the $n$th derivative of $f(x)$.

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

 $f^{\prime}(x)=\cos x,\quad f^{\prime\prime}(x)=-\sin x,\quad f^{\prime\prime% \prime}(x)=-\cos x,\quad f^{(4)}(x)=\sin x=f(x).$

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

 $f^{(2n)}(0)=0,\quad f^{(2n+1)}(0)=(-1)^{n}$

Thus, the first Taylor polynomial is given by:

 $T_{1}(x)=0+1\cdot x=x$

In the following graph one can compare the function $T_{1}(x)=x$ and $\sin x$.

The function $y=\sin x$ and the first Taylor polynomial.

Notice that $T_{2}(x)=T_{1}(x)$. More generally, $T_{2n}(x)=T_{2n-1}(x)$ so we will not compute any other even order Taylor polynomials. However, the third degree Taylor polynomial is given by the formula:

 $T_{3}(x)=x-\frac{x^{3}}{3!}=x-\frac{x^{3}}{6}$

The function $y=\sin x$ and the third Taylor polynomial.

The Taylor polynomial of degree $5$ is given by:

 $T_{5}(x)=x-\frac{x^{3}}{3!}+\frac{x^{5}}{5!}$

The function $y=\sin x$ 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:

 $T_{15}(x)=x-\frac{x^{3}}{6}+\frac{x^{5}}{120}-\frac{x^{7}}{5040}+\frac{x^{9}}{% 362880}-\frac{x^{11}}{39916800}+\frac{x^{13}}{6227020800}-\frac{x^{15}}{130767% 4368000}$

The function $y=\sin x$ 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 $T_{99}(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 $\mathop{sin}\nolimits x$ ExampleOfTaylorPolynomialsForsinX 2013-03-22 15:03:43 2013-03-22 15:03:43 alozano (2414) alozano (2414) 7 alozano (2414) Example msc 41A58 ComplexSineAndCosine HigherOrderDerivativesOfSineAndCosine