Taylor Polynomials, Lagrange Error, and Power Series
AP Calculus BC · Unit 10 — Infinite Sequences and Series
Taylor polynomials and the Lagrange remainder
The $n$th-degree Taylor polynomial of $f$ about $x=c$ is
$$T_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(c)}{k!}\left(x-c\right)^{k}$$It is the unique polynomial of degree $\le n$ matching $f$ and its first $n$ derivatives at $c$. With $c=0$ it is called a Maclaurin polynomial.
If $\left|f^{(n+1)}(t)\right|\le M$ for all $t$ between $c$ and $x$, the Lagrange error bound gives
$$\left|f(x)-T_n(x)\right|\le\frac{M}{(n+1)!}\left|x-c\right|^{\,n+1}$$Every ingredient matters: the bound uses the $(n+1)$st derivative, the factorial $(n+1)!$, and the $(n+1)$st power of the distance.
Series to memorise
$$e^{x}=\sum_{n=0}^{\infty}\frac{x^{n}}{n!},\qquad \sin x=\sum_{n=0}^{\infty}\frac{(-1)^{n}x^{2n+1}}{(2n+1)!},\qquad \cos x=\sum_{n=0}^{\infty}\frac{(-1)^{n}x^{2n}}{(2n)!}$$$$\frac{1}{1-x}=\sum_{n=0}^{\infty}x^{n}\ \ (|x|<1),\qquad \ln(1+x)=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^{n}}{n}\ \ (-1<x\le 1)$$Worked example: transforming a familiar series instead of differentiating repeatedly
Find the first four terms (not equal to $0$) of the Maclaurin series for $f(x)=x^{2}\cos\left(3x\right)$, then deduce $f^{(4)}(0)$.
Solution
Start from the familiar series $\cos u=1-\dfrac{u^{2}}{2!}+\dfrac{u^{4}}{4!}-\dfrac{u^{6}}{6!}+\cdots$ with $u=3x$:
$$\cos(3x)=1-\frac{9x^{2}}{2}+\frac{81x^{4}}{24}-\frac{729x^{6}}{720}+\cdots$$Multiply $x^{2}$ into each term:
$$f(x)=x^{2}-\frac{9x^{4}}{2}+\frac{27x^{6}}{8}-\frac{81x^{8}}{80}+\cdots$$To get $f^{(4)}(0)$, use the relation for Maclaurin coefficients: the coefficient of $x^{4}$ equals $\dfrac{f^{(4)}(0)}{4!}$.
$$\frac{f^{(4)}(0)}{24}=-\frac92\;\Longrightarrow\;f^{(4)}(0)=-108$$Differentiating the expression $x^{2}\cos(3x)$ four times directly gives the same result, but takes about ten times as long and has four places to make a sign error.