# How do you find the Taylor's formula for f(x)=sinx for x-pi?

Jun 21, 2017

$f \left(\pi\right) = \pi - x + {\left(x - \pi\right)}^{3} / 6 - {\left(x - \pi\right)}^{5} / 120 + \ldots$

#### Explanation:

I will assume that you mean a Taylor's series centered around $\pi$, when you say $x - \pi$. Also, I used enough derivatives to construct a Taylor series with at least three non-zero terms, but it continues indefinitely.

The Taylor approximation of a function involves using its derivatives to generate a series that is approximate to the function at a given point. Each term $\left\{{u}_{n}\right\}$ follows a general form: (f^(n-1)(a)(x-a)^(n-1))/((n-1)!), where $a$ is the centre of the series.

We start by finding the derivatives of different degrees of the function:
$f \left(x\right) = \sin x$
$f ' \left(x\right) = \cos x$
${f}^{2} \left(x\right) = - \sin x$
${f}^{3} \left(x\right) = - \cos x$
${f}^{4} \left(x\right) = \sin x$
${f}^{5} \left(x\right) = \cos x$
and so on.

Now, we find the values of the derivatives at $x = \pi$.
$f \left(\pi\right) = \sin \pi = 0$
$f ' \left(\pi\right) = \cos \pi = - 1$
${f}^{2} \left(\pi\right) = - \sin \pi = 0$
${f}^{3} \left(\pi\right) = - \cos \pi = 1$
${f}^{4} \left(\pi\right) = \sin \pi = 0$
${f}^{5} \left(\pi\right) = \cos \pi = - 1$
and so on.

We can now construct the Taylor approximation for $f \left(x\right) = \sin x$ centered around $\pi$.
f(x)=f(pi)/(0!)+(f'(pi)(x-pi))/(1!)+(f^2(pi)(x-pi)^2)/(2!)+(f^3(pi)(x-pi)^3)/(3!)+(f^4(pi)(x-pi)^4)/(4!)+(f^5(pi)(x-pi)^5)/(5!)+...
$= 0 + \left(- 1\right) \left(x - \pi\right) + 0 + \frac{\left(1\right) {\left(x - \pi\right)}^{3}}{6} + 0 + \frac{\left(- 1\right) {\left(x - \pi\right)}^{5}}{120} + \ldots$
$= \pi - x + {\left(x - \pi\right)}^{3} / 6 - {\left(x - \pi\right)}^{5} / 120 + \ldots$