# Taylor's Theorem and The Lagrange Remainder Examples 2

Recall from the Taylor's Theorem and The Lagrange Remainder page that Taylor's Theorem says that if $f$ is $n + 1$ times differentiable on some interval containing the center of convergence $c$ and $x$, and let $P_n(x) = f(c) + \frac{f^{(1)}(c)}{1!}(x - c) + \frac{f^{(2)}(c)}{2!}(x - c)^2 + ... + \frac{f^{(n)}(c)}{n!}(x - c)^n$ be the $n^{\mathrm{th}}$ order Taylor polynomial of $f$ at $x = c$. Then $f(x) = P_n(x) + E_n(x)$ where $E_n(x)$ is the error term of $P_n(x)$ from $f(x)$ and for $\xi$ between $c$ and $x$, the **Lagrange Remainder** form of the error $E_n$ is given by the formula $E_n(x) = \frac{f^{(n+1)}(\xi)}{(n + 1)!}(x - c)^{n+1}$.

We will now look at some more examples of applying the Taylor's Theorem.

## Example 1

**Prove that $f(x) = \cos x$ is analytic by showing that the Maclaurin series for $\cos x$ represents $\cos x$ for all $x \in \mathbb{R}$.**

Since we're dealing with the Maclaurin series for $\cos x$, we have that the center of convergence $c = 0$. The Lagrange remainder is given for some $\xi$ between $0$ and $x$ by:

(1)Note that $f^{(n+1)} = \pm \sin x$ or $f^{(n+1)} = \pm \cos x$ depending on $n$. In either case, we see that $\mid f^{(n+1)} (\xi ) \mid ≤ 1$. Therefore:

(2)Note that $\lim_{n \to \infty} \frac{\mid x \mid^{n+1}}{(n+1)!} = 0$. By the Squeeze theorem, we have that then $\lim_{n \to \infty} E_n(x) = 0$, and so, $\lim_{n \to \infty} P_n(x) = f(x)$ and so $f(x) = \sin x$ is analytic.

## Example 2

**Prove that $f(x) = \ln (1 + x)$ is analytic for $\mid x \mid < 1$ by showing that the Maclaurin series represents $\ln x$ for $-1 < x < 1$.**

Once again, since we're dealing with the Maclaurin series for $\ln (1 + x)$, we have that the center of convergence is $c = 0$. The Lagrange remainder for some $\xi$ between $0$ and $x$ is given by:

(3)Let's compute some of the derivatives of $\ln ( 1 + x)$. We have that:

(4)Therefore we have that:

(5)There are two cases to consider. First consider the case when $0 ≤ \xi < x < 1$. Then $1 + \xi > x$ and so then:

(6)By the Squeeze theorem, this implies that $\lim_{n \to \infty} E_n(x) = 0$ and so $\lim_{n \to \infty} P_n(x) = f(x)$ for $0 ≤ x < 1$.

Now consider the case when $-1 < x < \xi < 0$. Then $x < 1 + \xi < 1$. Dividing both sides of this inequality by $1 + \xi$ gives us $\frac{x}{1 + \xi} < 1$. Therefore, we have once again that:

(7)By the Squeeze theorem yet again, this implies that $\lim_{n \to \infty} E_n(x) = 0$ and so $\lim_{n \to \infty} P_n(x) = f(x)$ for $-1 < x < 0$.