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)$$
-ππ0T1 = xT3T5y = sin x (bold)the farther from the origin, the more every Taylor polynomial departs from the function — higher degree only postpones the departure
Where Taylor polynomials are good and where they fail. The three dashed curves and the bold curve cling very closely near $x=0$: $T_1$ matches only the slope, $T_3$ already tracks across half a period, and $T_5$ tracks most of the plotted range. But all three leave $\sin x$ when $\left|x\right|$ is large enough, and they leave in the direction of their highest-degree term. This is exactly the picture of the factor $\left|x-c\right|^{\,n+1}$ in the Lagrange bound: raising the degree only pushes the departure farther out, it does not remove it.

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.

Common mistake

The central trap: confusing the series coefficient with the derivative value. The coefficient of $x^{k}$ is $\frac{f^{(k)}(0)}{k!}$, so to get $f^{(k)}(0)$ you must multiply back by $k!$. Safeguard: each time the problem asks for $f^{(k)}(0)$, write the line 'coefficient times $k!$' before substituting numbers. The second trap: finding the interval of convergence and forgetting to examine the two endpoints — the ratio test gives $L=1$ at an endpoint, so you must substitute the value and test again with a different test; skipping this step loses points on almost every free-response question about power series.

Key takeaway

Coefficients divide by $k!$, derivatives multiply by $k!$. The Lagrange bound uses the $(n+1)$th derivative, the factorial $(n+1)!$, and the distance raised to the power $n+1$. The interval of convergence must always end by checking the two endpoints separately.

← Alternating Series, Absolute Convergence, and Error Bounds · All AP Calculus BC lessons · Practice AP Calculus BC questions (free, instant scoring)