## Taylor polynomial

Our objective is to approximate a function $f(x)$ about an interior point, say $x_0$. We show that their exists a polynomial, called the Taylor polynomial, $P_n(x)$: $f(x)=P_n(x)+R_n(x)$ Let $\delta=x-x_0$. If $f(x)$ is differentiable at $x_0$ then the equation of the tangent: $y=f(x_0) + \delta f^\prime(x_0)$ is a linear approximation of $f(x)$: $f(x)\approx f(x_0) + \delta f^\prime(x_0)$ A better approximation than a linear can be attained if we start with the following identity: $f(x)=f(x_0)+\int_{x_0}^x f^\prime(t)$ Let $\mathrm{d}t=-\mathrm{d}(x-t)$ (just a trick) and apply integration by parts to the integral: \begin{align*} \int_{x_0}^x f^\prime(t) \mathrm{d}t &= - \int_{x_0}^x f^\prime(t) \mathrm{d}(x-t) \\ &=\left[f^\prime(t)(x-t)\right]_{x_0}^x+\int_{x_0}^x f^{\prime\prime}(t)(x-t) \mathrm{d}t \\ &=\delta f^\prime(x_0) +\int_{x_0}^x f^{\prime\prime}(t)(x-t) \mathrm{d}t \end{align*} This results in: $f(x)=f(x_0)+\delta f^\prime(x_0) + \int_{x0}^x f''(t)(x-t) \mathrm{d}t$

If $f(x)$ is twice differentiable we can continue: \begin{align*} \int_{x0}^x f''(t)(x-t) dt&=-\left[f''(t)\frac{(x-t)^2}{2!}\right]_{x_0}^x+\int_{x0}^x f'''(t)\frac{(x-t)^2}{2!} dt \\ &=\frac{\delta^2}{2!}f''(x_0)+\int_{x0}^x f'''(t)\frac{(x-t)^2}{2!} dt \end{align*} This leads to the following identity: $f(x)=f(x_0)+\delta f'(x_0) + \frac{\delta^2}{2!}f''(x_0)+\int_{x0}^x f'''(t)\frac{(x-t)^2}{2!} dt$ As long as $f(x)$ is differentiable we can continue and achieve the following result: $f(x)=\sum \limits_{k=0}^n \frac{\delta^k}{k!}f^k(x_0)+R_n(x)$ with $R_n(x)=\int_{x0}^x f^{n+1}(t)\frac{(x-t)^n}{n!} dt$

### Taylor Polynomial

$P_n(x)=\sum \limits_{k=0}^n \frac{\delta^k}{k!}f^k(x_0), \; \delta=x-x_0$

## Taylor series

If for $f(x)$ we have $\lim_{n\rightarrow \infty} R_n(x)=0$ and also $P_n(x)$ converges then we can write $f(x)$ as a Taylor series: $f(x)=\sum \limits_{k=0}^\infty \frac{\delta^k}{k!}f^k(x_0), \; \delta=x-x_0$ We will now derive two forms of the remainder so that we are better able to determine whether this remainder converges. The first form is called Lagrange and the second Cauchy.

### Lagrange form of the remainder

Suppose $\delta>0$ and $x=x_o+\delta$, let $f^{n+1}$ be continuous on $[x_0,x]$. Since $f^{n+1}$ is continuous it follows that $f^{n+1}$ takes a minimum $m$ and a maximum $M$ on $[x_0,x]$. Therefore $\int_{x0}^x m\frac{(x-t)^n}{n!} dt \leq \int_{x0}^x f^{n+1}(t)\frac{(x-t)^n}{n!} dt \leq \int_{x0}^x M\frac{(x-t)^n}{n!} dt$ Notice: $\int_{x0}^x \frac{(x-t)^n}{n!} dt = \left[\frac{-(x-t)^{n+1}}{(n+1)!}\right]_{x_0}^x=\frac{\delta^{n+1}}{(n+1)!}$ Substitute this result in the previous equation to get: $m\frac{\delta^{n+1}}{(n+1)!} dt\leq \int_{x0}^x f^{n+1}(t)\frac{(x-t)^n}{n!} dt \leq M\frac{\delta^{n+1}}{(n+1)!}$ So, $R_n(\delta)=\frac{\delta^{n+1}}{(n+1)!}\lambda \;, \lambda \in [m,M]$ From the mean value theorem follows that fn+1 takes on each value between $m$ and $M$ on $(x_0,x)$, so there exists a $\xi \in (x0,x)$ such that $\lambda=f^{n+1}(\xi)$ this finally gives: $R_n(\delta)=\frac{\delta^{n+1}}{(n+1)!}f^{n+1}(\xi) \;, \xi \in (x_0,x)$

### Cauchy remainder

Let $F(t)$ defined by: $F'(t)=f^{n+1}(t)\frac{(x-t)^n}{n!}, \; x=x_0+\delta$ this gives: $R_n(\delta)=F(x)-F(x_0)$ then apply mean value theorem: $R_n(\delta)=\delta F'(\xi) \;, \xi \in (x_0,x)$ Substitute the definition for $F'(t)$: $R_n(\delta)=\delta f^{n+1}(\xi)\frac{(x-\xi)^n}{n!}$ Notice $\xi=x_0+\phi\delta,\;0< \phi <1$ and $x-\xi=\delta(1-\phi)$: $R_n(\delta)=f^{n+1}(\xi)\frac{\delta^{n+1}}{n!}(1-\phi)^n \;, 0< \phi <1$