The Taylor series is a representation of a function $f$ as an infinite sum of terms. These terms are determined using derivatives of $f$ evaluated at $x_0$.
where $f^{(k)}(x_0)$ is the $k^{th}$ derivative of $f$ at $x_0$ (which we assume exists) and $\frac{f^{(k)}(x_0)}{k!}$ are the coefficients of the polynomial.
Taylor Polynomial
The Taylor Polynomial of degree $n$ of $f : \mathbb{R} \mapsto \mathbb{R}$ at $x_0$ is defined as
$T_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(x_0)}{k!} (x-x_0)^k$
Taylor Series
For a smooth function $f \in C^\infty, f: \mathbb{R} \mapsto \mathbb{R}$, the Taylor series of $f$ at $x_0$ is defined as
$T_\infty(x) = \sum_{k=0}^{\infty} \frac{f^{(k)}(x_0)}{k!} (x-x_0)^k$
At $x_0=0$, we obtain the Maclaurin series as a special instance of the Taylor series.If $f(x)=T_\infty(x)$, then $f$ is called analytic.
In general, a Taylor polynomial of degree $n$ is an approximation of a function, which does not need to be a polynomial. The Taylor polynomial is similar to $f$ in a neighborhood around $x_0$. However, a Taylor polynomial of degree $n$ is an exact representation of a polynomial $f$ of degree $k <=n$ since all derivatives $f(i), i > k $ vanish.
Example Taylor Polynomial:
Lets consider a function $f(x)=x^4$
We will Find the Taylor Polynomial $T_6$, evaluated at $x_0=1$
$f(x)=x^4=f(1)=1$
$f'(x)=4x^3=f'(1)=4$
$f''(x)=12x^2=f''(1)=12$
$f^3(x)=24x^1=f^3(1)=24$
$f^4(x)=24=f^4(1)=24$
$f^5(x)=0=f^5(1)=0$
$f^6(x)=0=f^6(1)=0$
Therefore the Taylor polynomial is
$T_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(x_0)}{k!} (x-x_0)^k$
$=1+ \frac{4}{1!}(x-1)+ \frac{12}{2!}(x-1)^2+\frac{24}{3!}(x-1)^3+\frac{24}{4!}(x-1)^4+\frac{0}{5!}(x-1)^5+\frac{0}{1!}(x-1)^6$
$=1+4(x-1)+6(x^2+1-2x)+4(x^3-3x^2+3x-1)+(x^4-4x^3+6x^2-4x+1)$
$=1+4x-4+6x^2+6-12x+4x^3-12x^2+12x-4+x^4-4x^3+6x^2-4x+1$
$=x^4$
ie; we obtain the exact representation of the original function.
Example Taylor Series:
Consider the function given by
$f(x)=sin(x)+cos(x) \in C ^\infty$
Lets find a Taylor series expansion of $f$ at $x_0=0$, which is the Maclaurian series expansion of $f$.
$f(x)=sin(x)+cos(x)=f(0)=1$
$f'(x)=cos(x)-sin(x)=f'(0)=1$
$f''(x)=-sin(x)-cos(x)=f''(0)=-1$
$f^3(x)=-cos(x)+sin(x)=f^3(0)=-1$
$f^4(x)=sin(x)+cos(x)=f^4(0)=1$
$ \vdots$
The Taylor series expansion of $f$ at $x_0=0$ is given by
$T_\infty(x) = \sum_{k=0}^{\infty} \frac{f^{(k)}(x_0)}{k!} (x-x_0)^k$
$=1+x-\frac{x^2}{2!}-\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}- \ldots$
$=1-\frac{x^2}{2!}+\frac{x^4}{4!}-+\frac{x^6}{6!}+x-\frac{x^3}{3!}+\frac{x^5}{5!}$
$=\sum_{k=0}^{\infty} (-1)^k \frac{1}{(2k)!}x^{2k}+\sum_{k=0}^{\infty} (-1)^k \frac{1}{(2k+1)!)}x^{2k+1}$
$=cos(x)+sin(x)$
Here we used the power series expansion
$cos(x)=\sum_{k=0}^{\infty} (-1)^k \frac{1}{(2k)!}x^{2k}$
$sin(x)=\sum_{k=0}^{\infty} (-1)^k \frac{1}{(2k+1)!)}x^{2k+1}$
Remark: A Taylor series is a special case of a power series
$f(x)=\sum_{k=0}^{\infty}a_k(x-c)^k$
Where $a_k$ are coefficients and $c$ is a constant, which has the special form.
Example:
Compute the Taylor polynomial $T_n,n=0,\ldots,5$ of $f(x)=sin(x)+cos(x)$ at $x_0=0$
$f^0(0)=sin(0)+cos(0)=1$
$f^1(0)=cos(0)-sin(0)=1$
$f^2(0)=-sin(0)-cos(0)= -1$
$f^3(0)=-cos(0)+sin(0)= -1$
$f^4(0)=sin(0)+cos(0)= 1$
$f^5(0)=cos(0)-sin(0)= 1$
Taylor polynomial at $x_0=0$ is
$T_n(x)=\sum_{k=0}^{n}\frac{f^k(0)}{k!} x^k$
$T_0(x)=\frac{f^0(0)}{0!}x^0=\frac{1}{1}.1=1$
$T_1(x)=T_0(x)+\frac{f^1(0)}{1!}x^1=1+1.x=1+x$
$T_2(x)=T_1(x)+\frac{f^2(0)}{2!}x^2=1+x-\frac{1}{2!}x^2$
$T_3(x)=T_2(x)+\frac{f^3(0)}{3!}x^3=1+x-\frac{1}{2!}x^2-\frac{1}{3!}x^3$
$T_4(x)=T_3(x)+\frac{f^4(0)}{4!}x^4=1+x-\frac{1}{2!}x^2-\frac{1}{3!}x^3+\frac{1}{4!}x^4$
$T_5(x)=T_4(x)+\frac{f^5(0)}{5!}x^5=1+x-\frac{1}{2!}x^2-\frac{1}{3!}x^3+\frac{1}{4!}x^4+\frac{1}{5!}x^5$
Find the nth Maclaurin polynomial for $f(x)=e^x, n=5$ (University question)
The Maclaurin polynomial
$f(x)=\sum_{k=0}^n f^k(0) x^k/k!$
$f^0(0)=e^x=e^0=1$
$f^1(0)=e^x=e^0=1$
$f^2(0)=e^x=e^0=1$
$f^3(0)=e^x=e^0=1$
$f^4(0)=e^x=e^0=1$
$f^5(0)=e^x=e^0=1$
$f(x)=1.x^0/0!+1.x^1/1!+1.x^2/2!+1.x^3/3!+1.x^4/4!+1.x^5/5!$
$f(x)=1+x+x^2/2!+x^3/3!+x^4/4!+x^5/5!$
Comments
Post a Comment