# Taylor Polynomials

• May 28th 2007, 01:14 AM
behemoth100
Taylor Polynomials
Now that CaptainBlack and Jhevon have helped me out with Latex notation I can ask my question.

I was working on taylor polynomials and I ran into a little snag which has me stumped.

For the function $\displaystyle f(x) = \cos (x)$ we get the taylor series:
$\displaystyle \cos (x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - ... + \frac{(-1)^n f^{(n)} (0) x^{2n}}{(2n)!}$
So for $\displaystyle \cos (x^6)$ we get
$\displaystyle \cos (x^6) = 1 - \frac{x^{12}}{2!} + \frac{x^{24}}{4!} - ... + \frac{(-1)^n f^{(n)} (0) x^{12n}}{(2n)!}$

Yet if we construct the taylor polynomial for $\displaystyle \cos (x^6)$
from scratch:
$\displaystyle f (x) = \cos (x^6)$
$\displaystyle f^{'} (x) = -6x^5\sin (x^6)$
$\displaystyle f^{''} (x) = -30x^4\sin (x^6) - 36x^{10}\cos (x^6)$
$\displaystyle f^{'''} (x) = -120x^3\sin (x^6) - 180x^9\cos (x^6) - 360x^9\cos (x^6) + 216x^{15}\sin (x^6)$

for x= 0
$\displaystyle f (0) = \cos (0^6) = 1$
$\displaystyle f^{'} (0) = -6(0^5)\sin (0^6) = 0$
$\displaystyle f^{''} (0) = -30(0^4)\sin (0^6) - 36(0^{10})\cos (0^6) = 0$
$\displaystyle f^{'''} (0) = -120(0^3)\sin (0^6) - 180(0^9)\cos (0^6) - 360(0^9)\cos (0^6) + 216(0^{15})\sin (0^6)= 0$
in fact we dont see a non zero constant term until the 12th order differential:
Which looks quite crazy I've just realised. Some of the terms are $\displaystyle -36.10! - 18.10! - 8.10! - 3.10!$.
So if we get this, then the numerator on the second term of the taylor polynomial should be massive. So why does letting $\displaystyle x = x^6$ work? I understand the logic behind it I suppose, as the taylor polynomial work for any value of $\displaystyle x$ and $\displaystyle x^6$ is just a finite number (for any finite $\displaystyle x$ and for this $\displaystyle cos$ function, I know it doesn't hold for all functions). But why does the method of constructing the taylor polynomial from the formula:
$\displaystyle \sum_{a=0}^{\infty} \frac{f^{(a)} (0) x^{(a)}}{a!}$ fail?
• May 28th 2007, 01:30 AM
CaptainBlack
Quote:

Originally Posted by behemoth100
Now that CaptainBlack and Jhevon have helped me out with Latex notation I can ask my question.

I was working on taylor polynomials and I ran into a little snag which has me stumped.

For the function $\displaystyle f(x) = \cos (x)$ we get the taylor series:
$\displaystyle \cos (x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - ... + \frac{(-1)^n f^{(n)} (0) x^{2n}}{(2n)!}$
So for $\displaystyle \cos (x^6)$ we get
$\displaystyle \cos (x^6) = 1 - \frac{x^{12}}{2!} + \frac{x^{24}}{4!} - ... + \frac{(-1)^n f^{(n)} (0) x^{12n}}{(2n)!}$

Yet if we construct the taylor polynomial for $\displaystyle \cos (x^6)$
from scratch:
$\displaystyle f (x) = \cos (x^6)$
$\displaystyle f^{'} (x) = -6x^5\sin (x^6)$
$\displaystyle f^{''} (x) = -30x^4\sin (x^6) - 36x^{10}\cos (x^6)$
$\displaystyle f^{'''} (x) = -120x^3\sin (x^6) - 180x^9\cos (x^6) - 360x^9\cos (x^6) + 216x^{15}\sin (x^6)$

for x= 0
$\displaystyle f (0) = \cos (0^6) = 1$
$\displaystyle f^{'} (0) = -6(0^5)\sin (0^6) = 0$
$\displaystyle f^{''} (0) = -30(0^4)\sin (0^6) - 36(0^{10})\cos (0^6) = 0$
$\displaystyle f^{'''} (0) = -120(0^3)\sin (0^6) - 180(0^9)\cos (0^6) - 360(0^9)\cos (0^6) + 216(0^{15})\sin (0^6)= 0$
in fact we dont see a non zero constant term until the 12th order differential:
Which looks quite crazy I've just realised. Some of the terms are $\displaystyle -36.10! - 18.10! - 8.10! - 3.10!$.
So if we get this, then the numerator on the second term of the taylor polynomial should be massive. So why does letting $\displaystyle x = x^6$ work? I understand the logic behind it I suppose, as the taylor polynomial work for any value of $\displaystyle x$ and $\displaystyle x^6$ is just a finite number (for any finite $\displaystyle x$ and for this $\displaystyle cos$ function, I know it doesn't hold for all functions). But why does the method of constructing the taylor polynomial from the formula:
$\displaystyle \sum_{a=0}^{\infty} \frac{f^{(a)} (0) x^{(a)}}{a!}$ fail?

It does not fail, it gives exactly the same results as substituting $\displaystyle x^6$ into the expansion of $\displaystyle \cos(x)$.

Now the direct computation is long winded and it is error prone, and depends
on the cancellation of large factors, but it does give the same reslt.

RonL
• May 28th 2007, 01:53 AM
behemoth100
Hmmm... but from my working you have... oh wait are you saying that the numerator will equal $\displaystyle \frac{12!}{2!}$?
• May 28th 2007, 06:43 AM
CaptainBlack
Quote:

Originally Posted by behemoth100
Hmmm... but from my working you have... oh wait are you saying that the numerator will equal $\displaystyle \frac{12!}{2!}$?

When I run this on a Computer Algebra System, the coefficients of the term
in $\displaystyle x^{12}$ does indeed cancels down to $\displaystyle -1/2$

RonL