# Taylor Series with Examples

In this lesson we will learn about taylor series and with some examples of deriving **taylor series **of functions.

## What is Taylor series ?

Taylor series is a representation of function as infinite sum of derivatives at a point.

With the help of taylor series we could write a function as sum of its derivates at a point.

Suppose we have a function f(x) then we can write it as :

In general way taylor series formula can be written as:

$ \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n !}(x-a)^{n} $

## Taylor Series Examples

### Taylor series of sinx

To find the taylor series of sinx we find the nth derivative of sinx which is :

$ f^{(n)}(x)=\sin \left(x+\frac{n \pi}{2}\right) $

Evaluating the function and its derivatives at x = 0 we obtain

$ \begin{aligned} f(0) &=\sin 0=0 \\ f^{\prime}(0) &=\sin (\pi / 2)=1 \\ f^{\prime \prime}(0) &=\sin \pi=0 \\ f^{\prime \prime \prime}(0) &=\sin (3 \pi / 2)=-1 \end{aligned} $

And So therefore expension of sinx at x=0 which also know as **Maclaurin expension** is given by :

$ \sin x=x-\frac{x^{3}}{3 !}+\frac{x^{5}}{5 !}-\cdots $

### Taylor series of cosx at $ x=\pi / 3 $

As in above example the nth derivative of cosx is given by

$ f^{(n)}(x)=\cos \left(x+\frac{n \pi}{2}\right) $

Evaluating the function and its derivatives at $ x=\pi / 3 $ we obtain

$ \begin{aligned} f(\pi / 3) &=\cos (\pi / 3)=1 / 2 \\ f^{\prime}(\pi / 3) &=\cos (5 \pi / 6)=-\sqrt{3} / 2 \\ f^{\prime \prime}(\pi / 3) &=\cos (4 \pi / 3)=-1 / 2 \end{aligned} $

Thus the **taylor expension** of cosx at $ x=\pi / 3 $ is given by :

$ \sin x=x-\frac{x^{3}}{3 !}+\frac{x^{5}}{5 !}-\cdots $

$ \cos x=\frac{1}{2}-\frac{\sqrt{3}}{2}(x-\pi / 3)-\frac{1}{2} \frac{(x-\pi / 3)^{2}}{2 !}+\cdots $

## Maclaurin series examples

Maclaurin series is a special case of taylor series when taylor series expension done at a=0 .

## Maclaurin series examples

Maclaurin series is a special case of taylor series when taylor series expension done at a=0 .

### Maclaurin series expension of sinx

$ \sin x=x-\frac{x^{3}}{3 !}+\frac{x^{5}}{5 !}-\frac{x^{7}}{7 !}+\cdots $ for $ -\infty \lt x \lt -\infty $

### Maclaurin series expension of cosx

$ \cos x=1-\frac{x^{2}}{2 !}+\frac{x^{4}}{4 !}-\frac{x^{6}}{6 !}+\cdots $ for $ -\infty \lt x \lt -\infty $

### Maclaurin series expension of tanx

$ \tan ^{-1} x=x-\frac{x^{3}}{3}+\frac{x^{5}}{5}-\frac{x^{7}}{7}+\cdots $ for $ -1 \lt x \lt 1 $

### Maclaurin series expension of e^{x}

$ e^{x}=1+x+\frac{x^{2}}{2 !}+\frac{x^{3}}{3 !}+\frac{x^{4}}{4 !}+\cdots $ for $ -\infty \lt x \lt -\infty $