Ernstfalld

2021-09-07

What are the taylor polynomials ${p}_{4}$ and ${p}_{5}$ centered at $\frac{\pi }{6}$ for $f\left(x\right)=\mathrm{cos}\left(x\right)$

Maciej Morrow

The general formula for the Taylor series is as follow:
$\sum _{n=0}^{N}\frac{{f}^{n}\left(a\right)}{n!}{\left(x-a\right)}^{n}$
Where ${f}^{n}\left(a\right)$ being the ${n}^{th}$ derivative of f(x) at $x\to a$
Let us go to n=4
${f}^{0}\left(x\right)=f\left(x\right)=\mathrm{cos}x$
${f}^{\prime }\left(x\right)=-\mathrm{sin}x$
$f{}^{″}\left(x\right)=-\mathrm{cos}x$
$f{}^{‴}\left(x\right)=\mathrm{sin}x$
$f{}^{⁗}\left(x\right)=\mathrm{cos}x$
Now, writing it out, we get:
$\frac{f\left(a\right)}{0!}{\left(x-a\right)}^{0}+\frac{{f}^{\prime }\left(a\right)}{1!}{\left(x-a\right)}^{1}+\frac{f{}^{″}\left(a\right)}{2!}{\left(x-a\right)}^{2}+\frac{f{}^{‴}\left(a\right)}{3!}{\left(x-a\right)}^{3}+\dots$
$=\frac{\mathrm{cos}a}{0!}{\left(x-a\right)}^{0}+\frac{-\mathrm{sin}a}{1!}{\left(x-a\right)}^{1}+\frac{-\mathrm{cos}a}{2!}{\left(x-a\right)}^{2}+\frac{\mathrm{sin}a}{3!}{\left(x-a\right)}^{3}+\dots$
At $a=\frac{\pi }{6}$ the fifth ${p}_{5}$ degree Taylor polynomial will be
$=\mathrm{cos}\left(\frac{\pi }{6}\right)-\mathrm{sin}\left(\frac{\pi }{6}\right)\left(x-\frac{\pi }{6}\right)-\frac{\mathrm{cos}\left(\frac{\pi }{6}\right)}{2}{\left(x-\frac{\pi }{6}\right)}^{2}+\frac{\mathrm{sin}\left(\frac{\pi }{6}\right\}\left\{3!\right\}{\left(x-\frac{\pi }{6}\right)}^{3}+\frac{\mathrm{cos}\left(\frac{\pi }{6}\right)}{4!}{\left(x-\frac{\pi }{6}\right)}^{4}-\frac{\mathrm{sin}\left(\frac{\pi }{6}\right)}{5!}{\left(x-\frac{\pi }{6}\right)}^{5}+\dots }{}$

Do you have a similar question?