8.8
Use the Taylor series given in Key Idea 32 to create the Taylor series of the given function.
- f(x) = cos(x^2)
Start with the expansion of cos(x) under idea 32:
\(cos(x)\ =\ \sum _{ n=0 }^{ \infty }{ { (-1) }^{ n } } \frac { { x }^{ 2n } }{ (2n)! }\)
Then substitute x^2 to get the new series. Voila!
\(cos(x)\ =\ 1-\ \frac { { x }^{ 2 } }{ 2! } +\frac { { x }^{ 4 } }{ 4! } +\frac { { x }^{ 6 } }{ 6! } +\ ...\)
\(cos({ x }^{ 2 })\ =\ 1-\ \frac { { ({ x }^{ 2 } })^{ 2n } }{ 2! } +\frac { { ({ x }^{ 2 } })^{ 2n } }{ 4! } +\frac { { ({ x }^{ 2 } })^{ 2n } }{ 6! } +\ ...\)
\(cos({ x }^{ 2 })\ =\ 1-\ \frac { { { x }^{ 4 } } }{ 2! } +\frac { { { x }^{ 8 } } }{ 4! } +\frac { { { x }^{ 12 } } }{ 6! } +\ ...\)
f <- makeFun(cos(x^2) ~ x)
plotFun(f(x) ~ x, x.lim = range(-10,10), lwd=5)