Maclaurin Series for Sine and Cosine
Recall that a Maclaurin series of a function $f$ is Taylor series centered about $x = 0$ and that has the form $\sum_{n=0}^{\infty} f^{(n)}(0) \frac{x^n}{n!} = f(0) + f'(0)\frac{x}{1!} + f''(0)\frac{x^2}{2!} + ...$. We will now verify the Maclaurin series for the sine function $f(x) = \sin x$.
First take a look at the following table containing the derivatives of $f$ and the derivatives of $f$ evaluated at $x = 0$:
 $f(x) = \sin x$ $f(0) = \sin (0) = 0$ $f'(x) = \cos x$ $f'(0) = \cos (0) = 1$ $f''(x) = -\sin x$ $f''(0) = -\sin (0) = 0$ $f'''(x) = -\cos x$ $f'''(0) = -\cos(0) = -1$ $f^{(4)}(x) = \sin x$ f^{(4)}(0) = \sin (0) = 0 ]] Applying this to the formula of a Maclaurin series we get that: (1) \begin{align} \quad \sin x \sim \frac{x}{1!} - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + ... \\ \sin x \sim \sum_{n=0}^{\infty} \frac{(-1)^{n}x^{2n+1}}{(2n+1)!} \end{align} Now let's find the radius of convergence of this Maclaurin series using the ratio test as follows: (2) \begin{align} \quad \lim_{n \to \infty} \biggr \rvert \frac{(-1)^{n+1}}{(2n + 3)!} \cdot \frac{(2n+1)!}{(-1)^n} \biggr \rvert = \lim_{n \to \infty} \frac{(2n+1)!}{(2n+3)!} = \lim_{n \to \infty} \frac{1}{(2n+2)(2n+3)} = 0 \end{align} Therefore the radius of convergence isR = \infty$and so this series converges for all$x \in \mathbb{R}$. We now need to show that this Maclaurin series converges to$\sin x$. We will do this utilizing differential equations. Let$g(x)be the sum of the Maclaurin series given above, that is: (3) \begin{align} g(x) = \frac{x}{1!} - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + ... \end{align} Notice that if we differentiate this equation twice we get that: (4) \begin{align} g''(x) = -\frac{x}{1!} + \frac{x^3}{3!} - \frac{x^5}{5!} + \frac{x^7}{7!} - ... \end{align} Thereforeg(x)$satisfies the differential equation$g(x) = -g''(x)$, and so$g(x) + g''(x) = 0. The general solution to this equation is in the form: (5) \begin{align} g(x) = A \cos x + B \sin x \end{align} Notice that ifx = 0$, then$0 = g(0) = A$and so$A = 0$. Furthermore if we differentiate both sides of this equation we get$g'(x) = -A \sin x + B \cos x$, and$g'(0) = 1 = B$and so$B = 1, therefore we have that: (6) \begin{align} g(x) = 0 \cos x + 1 \sin x \\ g(x) = \sin x \end{align} Therefore\sin x = \sum_{n=0}^{\infty} \frac{(-1)^{n}x^{2n+1}}{(2n+1)!}$for all$x \in \mathbb{R}. Now if we differentiate both sides of this equation we have that: (7) \begin{align} \cos x = \sum_{n=0}^{\infty} \frac{(-1)^nx^{2n}}{(2n)!} \end{align} This is satisfied for allx \in \mathbb{R}\$.