Calculus Taylor Series
library(pracma)
Key Idea 32 gives the nth term of the Taylor series of common funcons. In Exercises 3 – 6, verify the formula given in the Key Idea by finding the first few terms of the Taylor series of the given function and idtifying a ptarteen�fy.
\[f(x)=sinx; c=0\]
\[\begin{equation} \sin x = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n+1}}{(2n + 1)!} \end{equation}\] \[\begin{equation} f(x) = 1 * \frac{x^{1}}{(1)!} + -1 * \frac{x^{3}}{(3)!} + 1 * \frac{x^{5}}{(5)!} + -1 * \frac{x^{7}}{(7)!} + ... \end{equation}\]
\[\begin{equation} f(x) = x - \frac{x^3}{6} + \frac{x^5}{120} - \frac{x^7}{5040} + ... \end{equation}\]
taylor(sin, 0, 7)
## [1] -0.0001983869 0.0000000000 0.0083332754 0.0000000000 -0.1666666439
## [6] 0.0000000000 1.0000000000 0.0000000000