Navigation

Concept Review

Differential Calculus

Higher-Degree Approximations and Taylor Polynomials

The linearisation L(x)=f(a)+f(a)(xa)L(x)=f(a)+f'(a)(x-a) is the best straight line at aa: it gets the value and the slope right and everything else wrong. A Taylor polynomial simply keeps going — match the second derivative too, then the third, then the nn-th — and the approximation improves dramatically near aa. This topic supplies the formula, the standard Maclaurin polynomials worth knowing cold, and the piece that turns an approximation into mathematics rather than optimism: the Lagrange remainder, which converts "close" into a guaranteed numerical error bound.

Why go beyond linear

Fix aa and write h=xah=x-a. Linearisation has error of size roughly Ch2Ch^{2}; the degree-nn Taylor polynomial has error of size roughly Chn+1Ch^{n+1}. So halving the distance to the centre divides the error of TnT_n by about 2n+12^{\,n+1}, not by 22. Concretely, for f(x)=exf(x)=e^{x} at a=0a=0, approximating e0.5=1.6487212707e^{0.5}=1.6487212707\dots:

nnTn(0.5)T_n(0.5)error
111.51.51.49×1011.49\times 10^{-1}
221.6251.6252.37×1022.37\times 10^{-2}
331.64583331.6458333\dots2.89×1032.89\times 10^{-3}
441.64843751.64843752.84×1042.84\times 10^{-4}
551.64869791.6486979\dots2.34×1052.34\times 10^{-5}

Each extra degree buys close to another decimal digit of accuracy here. That is the whole motivation.

Definition

Definition. Suppose ff is nn times differentiable at aa. The nn-th degree Taylor polynomial of ff centred at aa is

Tn(x)=f(a)+f(a)(xa)+f(a)2!(xa)2++f(n)(a)n!(xa)n,T_n(x)=f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^{2}+\cdots+\frac{f^{(n)}(a)}{n!}(x-a)^{n},

i.e. Tn(x)=c0+c1(xa)++cn(xa)nT_n(x)=c_0+c_1(x-a)+\cdots+c_n(x-a)^n with ck=f(k)(a)k!c_k=\dfrac{f^{(k)}(a)}{k!}. When a=0a=0 it is called the Maclaurin polynomial.

Three immediate remarks. (i) T0T_0 is the constant f(a)f(a) and T1T_1 is exactly the linearisation. (ii) TnT_n has degree at most nn — it can be lower, since f(n)(a)f^{(n)}(a) may be 00. (iii) The variable in the powers is xax-a, never xx, unless a=0a=0.

The matching-derivatives characterisation

Theorem. If ff is nn times differentiable at aa, then TnT_n is the unique polynomial PP of degree at most nn satisfying

P(k)(a)=f(k)(a)for k=0,1,2,,n.P^{(k)}(a)=f^{(k)}(a)\quad\text{for } k=0,1,2,\dots,n.

Why. Write P(x)=c0+c1(xa)++cn(xa)nP(x)=c_0+c_1(x-a)+\cdots+c_n(x-a)^n. Differentiating kk times kills every term of lower degree and, at x=ax=a, kills every term of higher degree, leaving P(k)(a)=k!ckP^{(k)}(a)=k!\,c_k. Setting k!ck=f(k)(a)k!\,c_k=f^{(k)}(a) forces ck=f(k)(a)/k!c_k=f^{(k)}(a)/k!, and the coefficients are therefore determined.

Run this backwards to read derivatives off coefficients: if you know TnT_n, then f(k)(a)=k!ckf^{(k)}(a)=k!\,c_k.

Theorem (order of contact). With the same hypothesis,

limxaf(x)Tn(x)(xa)n=0,\lim_{x\to a}\frac{f(x)-T_n(x)}{(x-a)^{n}}=0,

and TnT_n is the only polynomial of degree at most nn with this property. This is what licenses the shortcuts below: if any legitimate algebra produces a polynomial PP of degree n\le n whose difference from ff vanishes faster than (xa)n(x-a)^n, then PP is TnT_n — no need to differentiate nn times.

Standard Maclaurin polynomials

f(x)f(x)Maclaurin polynomial (centre 00)general termnotes
exe^{x}1+x+x22!++xnn!1+x+\dfrac{x^{2}}{2!}+\cdots+\dfrac{x^{n}}{n!}xkk!\dfrac{x^{k}}{k!}, k0k\ge 0every derivative is 11 at 00
sinx\sin xxx33!+x55!x-\dfrac{x^{3}}{3!}+\dfrac{x^{5}}{5!}-\cdots(1)mx2m+1(2m+1)!\dfrac{(-1)^{m}x^{2m+1}}{(2m+1)!}, m0m\ge 0odd powers only; T2m+1=T2m+2T_{2m+1}=T_{2m+2}
cosx\cos x1x22!+x44!1-\dfrac{x^{2}}{2!}+\dfrac{x^{4}}{4!}-\cdots(1)mx2m(2m)!\dfrac{(-1)^{m}x^{2m}}{(2m)!}, m0m\ge 0even powers only; T2m=T2m+1T_{2m}=T_{2m+1}
ln(1+x)\ln(1+x)xx22+x33+(1)n1xnnx-\dfrac{x^{2}}{2}+\dfrac{x^{3}}{3}-\cdots+\dfrac{(-1)^{n-1}x^{n}}{n}(1)k1xkk\dfrac{(-1)^{k-1}x^{k}}{k}, k1k\ge 1needs x>1x>-1; no constant term
11x\dfrac{1}{1-x}1+x+x2++xn1+x+x^{2}+\cdots+x^{n}xkx^{k}, k0k\ge 0error is exactly xn+11x\dfrac{x^{n+1}}{1-x} for x1x\ne 1
(1+x)k(1+x)^{k}1+kx+k(k1)2!x2+k(k1)(k2)3!x3+1+kx+\dfrac{k(k-1)}{2!}x^{2}+\dfrac{k(k-1)(k-2)}{3!}x^{3}+\cdotsk(k1)(kj+1)j!xj\dfrac{k(k-1)\cdots(k-j+1)}{j!}x^{j}, j1j\ge 1 (here kk is the exponent, jj the term index)needs 1+x>01+x>0 if kk is not a whole number; terminates if kk is a non-negative integer

Note lnx\ln x has no Maclaurin polynomial: it is not defined at 00. Use ln(1+x)\ln(1+x), or centre at a=1a=1.

Building new ones from old. Substituting u=g(x)u=g(x), where gg is a polynomial with g(0)=0g(0)=0 (if gg is not already one, replace it by its own Maclaurin polynomial first), into a known Maclaurin polynomial, or multiplying two known ones together — and in both cases discarding every power above xnx^{n} — produces TnT_n of the composite/product, by the uniqueness theorem above. Keep enough terms of the outer polynomial that nothing of degree n\le n can be lost. Example: from eu1+u+u22+u36e^{u}\approx 1+u+\frac{u^{2}}{2}+\frac{u^{3}}{6} with u=x2u=-x^{2},

ex2:T6(x)=1x2+x42x66.e^{-x^{2}}:\quad T_6(x)=1-x^{2}+\frac{x^{4}}{2}-\frac{x^{6}}{6}.

Reading off the coefficient of x4x^{4}: f(4)(0)4!=12\dfrac{f^{(4)}(0)}{4!}=\dfrac12, so f(4)(0)=12f^{(4)}(0)=12 — obtained without ever differentiating four times.

Worked Example 1 — approximate and bound

Estimate e0.1e^{0.1} with T3T_3 and give a rigorous error bound.

For f(x)=exf(x)=e^{x}, every derivative is exe^{x}, so f(k)(0)=1f^{(k)}(0)=1 and T3(x)=1+x+x22+x36T_3(x)=1+x+\frac{x^{2}}{2}+\frac{x^{3}}{6}. Then

T_3(0.1)&=1+0.1+\frac{0.01}{2}+\frac{0.001}{6}\\ &=1+0.1+0.005+0.00016667\\ &=1.10516667. \end{aligned}$$ Bound: $f^{(4)}(t)=e^{t}$, which is increasing, so on $[0,0.1]$ we have $|f^{(4)}(t)|\le e^{0.1}<1.2$. Take $M=1.2$: $$|R_3(0.1)|\le \frac{M\,|0.1-0|^{4}}{4!}=\frac{1.2\times 10^{-4}}{24}=5\times 10^{-6}.$$ So $e^{0.1}=1.105167\pm 0.000005$, i.e. $1.105161<e^{0.1}<1.105172$. (True value $1.1051709\dots$; true error $4.25\times10^{-6}$ — the bound holds and is realistic.) ### Taylor's Theorem — the Lagrange remainder Define the **remainder** $R_n(x)=f(x)-T_n(x)$. **Theorem (Taylor, Lagrange form).** Let $n\ge 0$. Suppose $f^{(n)}$ is continuous on the closed interval with endpoints $a$ and $x$, and $f^{(n+1)}$ exists at every point of the corresponding **open** interval. Then there exists a number $c$ **strictly between** $a$ and $x$ with $$R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}\,(x-a)^{n+1}.$$ The case $n=0$ is exactly the Mean Value Theorem: $f(x)=f(a)+f'(c)(x-a)$. The number $c$ depends on both $x$ and $n$ and is essentially never computable — which is fine, because we only ever bound $f^{(n+1)}(c)$. **Corollary (Taylor's Inequality).** If in addition $|f^{(n+1)}(t)|\le M$ for **all** $t$ in an interval $I$ containing $a$, then for every $x$ in $I$, $$|R_n(x)|\le \frac{M}{(n+1)!}\,|x-a|^{n+1}.$$ Procedure: (1) fix $n$ and the interval $I$; (2) compute $f^{(n+1)}$; (3) find $M=\max_{t\in I}|f^{(n+1)}(t)|$ — over the *whole* interval, not just at $a$; (4) insert the largest $|x-a|$ occurring in $I$ for a bound valid throughout $I$. **Sign information is free too.** Since $c$ lies between $a$ and $x$, the *sign* of $R_n$ is often decidable. E.g. for $x>0$ there is a $c$ with $0<c<x$ and $e^{x}=1+x+\frac{x^{2}}{2}+\frac{e^{c}x^{3}}{6}$; here $e^{c}x^{3}/6>0$, so $e^{x}>1+x+\frac{x^{2}}{2}$. (At $x=0$ no such $c$ exists — Taylor's Theorem needs $x\ne a$ — but both sides equal $1$ there, so $e^{x}\ge 1+x+\frac{x^{2}}{2}$ for all $x\ge0$.) ### Worked Example 2 — bounding the error over an interval *How accurate is $\cos x\approx 1-\frac{x^{2}}{2}+\frac{x^{4}}{24}$ on $[-0.5,0.5]$?* Naive route, $n=4$: $f^{(5)}(t)=-\sin t$, so $M=\max_{|t|\le 0.5}|\sin t|=\sin 0.5<0.48$, and $$|R_4(x)|\le \frac{0.48\,(0.5)^{5}}{5!}=\frac{0.48\times 0.03125}{120}=1.25\times 10^{-4}.$$ Better route: for $\cos$, $T_4=T_5$ (the $x^{5}$ coefficient is $0$), so the *same* polynomial is also the degree-$5$ Taylor polynomial and we may use $n=5$. Now $f^{(6)}(t)=-\cos t$ and $M=1$: $$|R_5(x)|\le \frac{1\cdot (0.5)^{6}}{6!}=\frac{0.015625}{720}=2.17\times 10^{-5}.$$ Nearly six times sharper, for free. (Check at the worst point: $T_4(0.5)=0.87760417$, $\cos 0.5=0.8775825619\dots$, true error $2.160\times10^{-5}$ — just under the bound.) ### Common mistakes | Wrong | Right | |---|---| | $T_3(x)=f(a)+f'(a)(x-a)+f''(a)(x-a)^{2}+f'''(a)(x-a)^{3}$ | Divide by $k!$: the coefficients are $f''(a)/2$ and $f'''(a)/6$. | | Centring at $a=2$ but writing powers of $x$. | Every power must be $(x-2)^{k}$. Do **not** expand and re-collect in powers of $x$ unless asked. | | Leaving $x$ in the coefficients: "$T_2(x)=e^{x}+e^{x}x+\frac{e^{x}}{2}x^{2}$". | Derivatives are evaluated **at the centre**: $T_2(x)=1+x+\frac{x^{2}}{2}$ for $a=0$. Coefficients are numbers. | | Given $T_3(x)=2-5(x-1)+4(x-1)^{2}$, concluding $f''(1)=4$. | $f''(1)=2!\cdot 4=8$. Multiply the coefficient by $k!$. | | Taking $M=\lvert f^{(n+1)}(a)\rvert$ at the centre only. | $M$ must dominate on the *entire* interval. For $\ln(1+x)$, $n=3$, on $[-0.2,0.2]$: $M=6$ gives the bound $4.0\times10^{-4}$, but the true error at $x=-0.2$ is $4.77\times 10^{-4}$ — the "bound" is false. Correct $M=6/(0.8)^{4}=14.65$. | | "The error equals the next term $\dfrac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1}$." | The next term is a *heuristic*. Lagrange has $f^{(n+1)}(c)$ with $c$ unknown between $a$ and $x$; only that gives a proof. | | Expecting $T_4$ of $\sin x$ to have an $x^{4}$ term. | $\sin$ is odd: $T_3=T_4=x-\frac{x^{3}}{6}$. Exploit this to get a better remainder bound. | | Writing a Maclaurin polynomial for $\ln x$ or $\sqrt{x}$. | Neither is differentiable at $0$ ($\ln x$ is not even defined there). Use $\ln(1+x)$, $(1+x)^{1/2}$, or a different centre. | | Assuming more terms always means a better answer at a fixed $x$. | For $f(x)=\frac{1}{1-x}$ at $x=2$: $f(2)=-1$ but $T_n(2)=1+2+\cdots+2^{n}\to+\infty$. Accuracy is guaranteed only where the remainder tends to $0$. | | Using $c=x$ or $c=a$ "to be safe". | $c$ is strictly between them and unknown; bound $\lvert f^{(n+1)}\rvert$ over the closed interval instead. |

Key terms

  • Taylor polynomial
  • Maclaurin polynomial
  • centre (base point) a
  • linearisation as T_1
  • quadratic approximation
  • Taylor coefficient f^{(k)}(a)/k!
  • matching-derivatives characterisation
  • uniqueness of the Taylor polynomial
  • order of contact
  • standard Maclaurin polynomials
  • binomial polynomial (1+x)^k
  • remainder R_n(x)
  • Taylor's Theorem
  • Lagrange form of the remainder
  • Taylor's Inequality
  • error bound on an interval
  • bounding |f^{(n+1)}| by M
  • degree needed for a given accuracy
  • substitution shortcut
  • reading derivatives off coefficients

Practice Problems

Working directly from the definition (not by quoting a table), find the degree-44 Maclaurin polynomial T4T_4 of f(x)=cosxf(x)=\cos x, and use it to estimate cos(0.2)\cos(0.2).

Show hint

List f,f,f,f,f(4)f,f',f'',f''',f^{(4)} and evaluate each one at the centre a=0a=0 before you assemble anything.

Show answer

Step 1: derivatives at the centre a=0a=0.

f(x)&=\cos x, & f(0)&=1,\\ f'(x)&=-\sin x, & f'(0)&=0,\\ f''(x)&=-\cos x, & f''(0)&=-1,\\ f'''(x)&=\sin x, & f'''(0)&=0,\\ f^{(4)}(x)&=\cos x, & f^{(4)}(0)&=1. \end{aligned}$$ **Step 2: assemble.** With $c_k=f^{(k)}(0)/k!$, $$\begin{aligned} T_4(x)&=1+\frac{0}{1!}x+\frac{-1}{2!}x^{2}+\frac{0}{3!}x^{3}+\frac{1}{4!}x^{4}\\ &=1-\frac{x^{2}}{2}+\frac{x^{4}}{24}. \end{aligned}$$ **Step 3: evaluate at $x=0.2$.** $$\begin{aligned} T_4(0.2)&=1-\frac{(0.2)^{2}}{2}+\frac{(0.2)^{4}}{24}\\ &=1-\frac{0.04}{2}+\frac{0.0016}{24}\\ &=1-0.02+0.00006667\\ &=0.98006667. \end{aligned}$$ **$\cos(0.2)\approx 0.98006667$.** *Independent check.* $\cos$ is even, so the $x^{5}$ coefficient is $0$ and $T_4=T_5$; using $n=5$ in Taylor's Inequality with $|f^{(6)}(t)|=|-\cos t|\le 1$, $$|R_5(0.2)|\le\frac{1\cdot(0.2)^{6}}{6!}=\frac{0.000064}{720}=8.9\times10^{-8}.$$ The true value is $\cos(0.2)=0.9800665778\dots$, off by $8.9\times 10^{-8}$ — exactly at the size predicted.

The degree-33 Taylor polynomial of a function ff centred at a=1a=1 is

T3(x)=25(x1)+4(x1)2(x1)3.T_3(x)=2-5(x-1)+4(x-1)^{2}-(x-1)^{3}.

Find f(1)f(1), f(1)f'(1), f(1)f''(1) and f(1)f'''(1), and use T3T_3 to estimate f(1.2)f(1.2).

Show hint

Compare the given expression coefficient by coefficient with the general form c0+c1(xa)+c2(xa)2+c3(xa)3c_0+c_1(x-a)+c_2(x-a)^2+c_3(x-a)^3, and remember what each ckc_k is built from.

Show answer

Step 1: the coefficient formula. By definition ck=f(k)(1)k!c_k=\dfrac{f^{(k)}(1)}{k!}, so reading it backwards,

f(k)(1)=k!ck.f^{(k)}(1)=k!\,c_k .

Step 2: match coefficients. From the given polynomial, c0=2c_0=2, c1=5c_1=-5, c2=4c_2=4, c3=1c_3=-1. Hence

f(1)&=0!\cdot 2=2,\\ f'(1)&=1!\cdot(-5)=-5,\\ f''(1)&=2!\cdot 4=8,\\ f'''(1)&=3!\cdot(-1)=-6. \end{aligned}$$ Note especially $f''(1)=8$, **not** $4$: the coefficient is $f''(1)/2!$. **Step 3: estimate $f(1.2)$.** Here $x-1=0.2$: $$\begin{aligned} T_3(1.2)&=2-5(0.2)+4(0.2)^{2}-(0.2)^{3}\\ &=2-1+4(0.04)-0.008\\ &=2-1+0.16-0.008\\ &=1.152 . \end{aligned}$$ **$f(1)=2$, $f'(1)=-5$, $f''(1)=8$, $f'''(1)=-6$, and $f(1.2)\approx 1.152$.** *Check.* Differentiating $T_3$ directly: $T_3'(x)=-5+8(x-1)-3(x-1)^{2}$ gives $T_3'(1)=-5$; $T_3''(x)=8-6(x-1)$ gives $T_3''(1)=8$; $T_3'''(x)=-6$. Since $T_3$ matches $f$'s derivatives through order $3$ at $x=1$, these are $f'(1),f''(1),f'''(1)$.

Find the degree-33 Taylor polynomial of f(x)=1xf(x)=\dfrac{1}{x} centred at a=1a=1, use it to approximate 11.1\dfrac{1}{1.1}, and compute the exact error.

Show hint

Write f(x)=x1f(x)=x^{-1} and use the power rule repeatedly; watch the alternating signs and the factorials that appear.

Show answer

Step 1: derivatives at a=1a=1.

f(x)&=x^{-1}, & f(1)&=1,\\ f'(x)&=-x^{-2}, & f'(1)&=-1,\\ f''(x)&=2x^{-3}, & f''(1)&=2,\\ f'''(x)&=-6x^{-4}, & f'''(1)&=-6. \end{aligned}$$ **Step 2: assemble.** $$\begin{aligned} T_3(x)&=1+\frac{-1}{1!}(x-1)+\frac{2}{2!}(x-1)^{2}+\frac{-6}{3!}(x-1)^{3}\\ &=1-(x-1)+(x-1)^{2}-(x-1)^{3}. \end{aligned}$$ (Sanity check: this is the geometric pattern $1-u+u^{2}-u^{3}$ with $u=x-1$, which is what you expect from $\frac{1}{x}=\frac{1}{1+u}$.) **Step 3: approximate.** At $x=1.1$, $u=x-1=0.1$: $$\begin{aligned} T_3(1.1)&=1-0.1+(0.1)^{2}-(0.1)^{3}\\ &=1-0.1+0.01-0.001\\ &=0.909 . \end{aligned}$$ **Step 4: exact error.** The true value is $\dfrac{1}{1.1}=\dfrac{10}{11}$, so $$\begin{aligned} R_3(1.1)&=\frac{10}{11}-\frac{909}{1000}\\ &=\frac{10000-9999}{11000}\\ &=\frac{1}{11000}\\ &=9.0909\times10^{-5}. \end{aligned}$$ **$\dfrac{1}{1.1}\approx 0.909$, with exact error $\dfrac{1}{11000}\approx 9.09\times10^{-5}$ (the approximation is too small).** *Second, independent route to the same error.* Algebraically, $\dfrac{1}{1+u}-\left(1-u+u^{2}-u^{3}\right)=\dfrac{u^{4}}{1+u}$; with $u=0.1$ this is $\dfrac{0.0001}{1.1}=\dfrac{1}{11000}$ — agreeing exactly.

Let f(x)=exf(x)=e^{x} with centre a=0a=0. Compute the errors f(h)T1(h)|f(h)-T_1(h)| and f(h)T2(h)|f(h)-T_2(h)| at h=0.1h=0.1 and at h=0.05h=0.05 (to three significant figures), and explain the two ratios you observe. Use e0.1=1.10517092e^{0.1}=1.10517092 and e0.05=1.05127110e^{0.05}=1.05127110.

Show hint

Taylor's Inequality says the error of TnT_n is at most a constant times hn+1h^{n+1}. Ask what happens to hn+1h^{n+1} when hh is halved.

Show answer

Step 1: the polynomials. T1(x)=1+xT_1(x)=1+x and T2(x)=1+x+x22T_2(x)=1+x+\dfrac{x^{2}}{2}.

Step 2: at h=0.1h=0.1.

T_1(0.1)&=1.1, & |R_1|&=1.10517092-1.1=5.17\times10^{-3},\\ T_2(0.1)&=1+0.1+0.005=1.105, & |R_2|&=1.10517092-1.105=1.71\times10^{-4}. \end{aligned}$$ **Step 3: at $h=0.05$.** $$\begin{aligned} T_1(0.05)&=1.05, & |R_1|&=1.05127110-1.05=1.27\times10^{-3},\\ T_2(0.05)&=1+0.05+0.00125=1.05125, & |R_2|&=1.05127110-1.05125=2.11\times10^{-5}. \end{aligned}$$ **Step 4: the ratios.** $$\frac{5.17\times10^{-3}}{1.27\times10^{-3}}\approx 4.07,\qquad \frac{1.71\times10^{-4}}{2.11\times10^{-5}}\approx 8.10 .$$ **Step 5: explanation.** By Taylor's Theorem, $R_n(h)=\dfrac{e^{c}}{(n+1)!}h^{n+1}$ for some $c$ between $0$ and $h$. Since $e^{c}\to 1$ as $h\to 0$, the error behaves like a constant times $h^{n+1}$. Halving $h$ therefore multiplies the error by $\left(\frac12\right)^{n+1}$: - $n=1$: factor $\frac14$, so the ratio of errors is $\approx 4$. Observed $4.07$. ✔ - $n=2$: factor $\frac18$, so the ratio is $\approx 8$. Observed $8.10$. ✔ **Conclusion: linearisation is second-order accurate ($O(h^{2})$) while $T_2$ is third-order ($O(h^{3})$); each extra degree gains one more power of $h$, which is precisely why one goes beyond linear.** The ratios exceed $4$ and $8$ slightly because $e^{c}$ is a little larger at the bigger $h$.

Find the degree-66 Maclaurin polynomial of f(x)=ex2f(x)=e^{-x^{2}} without differentiating six times, and hence find f(4)(0)f^{(4)}(0) and f(6)(0)f^{(6)}(0).

Show hint

Start from the Maclaurin polynomial of eue^{u} and substitute — but first check that the substitution sends 00 to 00, and work out how many terms of eue^u you need.

Show answer

Step 1: known polynomial. For eue^{u} centred at u=0u=0,

eu1+u+u22!+u33!.e^{u}\approx 1+u+\frac{u^{2}}{2!}+\frac{u^{3}}{3!}.

Step 2: substitute u=x2u=-x^{2}. This is legal for building a Maclaurin polynomial because u=0u=0 when x=0x=0. Each power uju^{j} becomes x2jx^{2j}, so three terms past the constant reach degree 66 — exactly what is needed:

P(x)&=1+(-x^{2})+\frac{(-x^{2})^{2}}{2}+\frac{(-x^{2})^{3}}{6}\\ &=1-x^{2}+\frac{x^{4}}{2}-\frac{x^{6}}{6}. \end{aligned}$$ **Step 3: why $P=T_6$.** $P$ has degree $\le 6$, and $\dfrac{e^{u}-\left(1+u+\frac{u^2}{2}+\frac{u^3}{6}\right)}{u^{3}}\to 0$ as $u\to0$; putting $u=-x^{2}$ turns this into $\dfrac{f(x)-P(x)}{x^{6}}\to 0$ as $x\to0$. By the uniqueness (order-of-contact) theorem, $P$ is the degree-$6$ Maclaurin polynomial: $$T_6(x)=1-x^{2}+\frac{x^{4}}{2}-\frac{x^{6}}{6}.$$ **Step 4: extract the derivatives.** Since $c_k=f^{(k)}(0)/k!$, we have $f^{(k)}(0)=k!\,c_k$: $$\begin{aligned} c_4&=\frac12 &&\Rightarrow&& f^{(4)}(0)=4!\cdot\frac12=24\cdot\frac12=12,\\ c_6&=-\frac16 &&\Rightarrow&& f^{(6)}(0)=6!\cdot\left(-\frac16\right)=-\frac{720}{6}=-120. \end{aligned}$$ **$T_6(x)=1-x^{2}+\dfrac{x^{4}}{2}-\dfrac{x^{6}}{6}$, $\;f^{(4)}(0)=12$, $\;f^{(6)}(0)=-120$.** *Check of $f^{(4)}(0)$ the long way.* $f'=-2xe^{-x^{2}}$; $f''=(4x^{2}-2)e^{-x^{2}}$; $f'''=\left(8x+(4x^{2}-2)(-2x)\right)e^{-x^{2}}=(12x-8x^{3})e^{-x^{2}}$; $f^{(4)}=\left(12-24x^{2}+(12x-8x^{3})(-2x)\right)e^{-x^{2}}=(12-48x^{2}+16x^{4})e^{-x^{2}}$. At $x=0$ this is $12$. ✔ *Also note* $c_3=c_5=0$, so $f'''(0)=f^{(5)}(0)=0$ — as it must be, since $f$ is even.

Find the degree-33 Maclaurin polynomial of f(x)=excosxf(x)=e^{x}\cos x in two ways: (a) by multiplying known Maclaurin polynomials and discarding terms of degree above 33, and (b) by differentiating ff three times.

Show hint

For (a) you only need each factor accurate to degree 33; for (b) the second derivative of excosxe^x\cos x simplifies dramatically — do the algebra before evaluating.

Show answer

(a) By multiplication.

ex1+x+x22+x36,cosx1x22e^{x}\approx 1+x+\frac{x^{2}}{2}+\frac{x^{3}}{6},\qquad \cos x\approx 1-\frac{x^{2}}{2}

(the next cos\cos term is x4/24x^{4}/24, already beyond degree 33). Multiply and keep only degrees 00 through 33:

\left(1+x+\frac{x^{2}}{2}+\frac{x^{3}}{6}\right)\left(1-\frac{x^{2}}{2}\right) &=1+x+\frac{x^{2}}{2}+\frac{x^{3}}{6}-\frac{x^{2}}{2}-\frac{x^{3}}{2}-\cdots\\ &=1+x+\left(\frac12-\frac12\right)x^{2}+\left(\frac16-\frac12\right)x^{3}+\cdots\\ &=1+x+0\cdot x^{2}-\frac{x^{3}}{3}+\cdots \end{aligned}$$ so $T_3(x)=1+x-\dfrac{x^{3}}{3}$. **(b) By differentiating.** $$\begin{aligned} f(x)&=e^{x}\cos x, & f(0)&=1,\\ f'(x)&=e^{x}\cos x-e^{x}\sin x=e^{x}(\cos x-\sin x), & f'(0)&=1,\\ f''(x)&=e^{x}(\cos x-\sin x)+e^{x}(-\sin x-\cos x)=-2e^{x}\sin x, & f''(0)&=0,\\ f'''(x)&=-2e^{x}\sin x-2e^{x}\cos x=-2e^{x}(\sin x+\cos x), & f'''(0)&=-2. \end{aligned}$$ Hence $$T_3(x)=1+\frac{1}{1!}x+\frac{0}{2!}x^{2}+\frac{-2}{3!}x^{3}=1+x-\frac{x^{3}}{3}.$$ **Both methods give $T_3(x)=1+x-\dfrac{x^{3}}{3}$.** *Numerical check.* At $x=0.1$: $T_3(0.1)=1+0.1-0.00033333=1.09966667$, while $e^{0.1}\cos(0.1)=1.10517092\times 0.99500417=1.09964967$. So $f(0.1)-T_3(0.1)=-1.70\times10^{-5}$, consistent with a degree-$4$ error term $\dfrac{f^{(4)}(0)}{24}x^{4}$: here $f^{(4)}(x)=-4e^{x}\cos x$, so $f^{(4)}(0)=-4$ and the predicted next term is $-\dfrac{4}{24}(0.1)^{4}=-1.67\times10^{-5}$. ✔

Find the degree-33 Maclaurin polynomial of f(x)=(1+x)1/2f(x)=(1+x)^{1/2}, use it to approximate 1.1\sqrt{1.1}, and use Taylor's Inequality to bound the error.

Show hint

Use the binomial pattern with k=12k=\frac12 (or differentiate three times); for the bound you will need the fourth derivative and where it is largest on [0,0.1][0,0.1].

Show answer

Step 1: derivatives. With f(x)=(1+x)1/2f(x)=(1+x)^{1/2},

f'(x)&=\frac12(1+x)^{-1/2}, & f'(0)&=\frac12,\\ f''(x)&=-\frac14(1+x)^{-3/2}, & f''(0)&=-\frac14,\\ f'''(x)&=\frac38(1+x)^{-5/2}, & f'''(0)&=\frac38,\\ f^{(4)}(x)&=-\frac{15}{16}(1+x)^{-7/2}, & & \end{aligned}$$ and $f(0)=1$. **Step 2: assemble.** $$\begin{aligned} T_3(x)&=1+\frac{1/2}{1!}x+\frac{-1/4}{2!}x^{2}+\frac{3/8}{3!}x^{3}\\ &=1+\frac{x}{2}-\frac{x^{2}}{8}+\frac{x^{3}}{16}. \end{aligned}$$ (Same as the binomial pattern with $k=\frac12$: $1+\frac12 x+\frac{\frac12\left(-\frac12\right)}{2}x^{2}+\frac{\frac12\left(-\frac12\right)\left(-\frac32\right)}{6}x^{3}$.) **Step 3: approximate $\sqrt{1.1}$**, i.e. take $x=0.1$: $$\begin{aligned} T_3(0.1)&=1+0.05-\frac{0.01}{8}+\frac{0.001}{16}\\ &=1+0.05-0.00125+0.0000625\\ &=1.0488125 . \end{aligned}$$ **Step 4: bound the error.** On $[0,0.1]$, $$\left|f^{(4)}(t)\right|=\frac{15}{16}(1+t)^{-7/2}\le \frac{15}{16}(1+0)^{-7/2}=\frac{15}{16}=0.9375,$$ because $(1+t)^{-7/2}$ is decreasing. Take $M=\frac{15}{16}$: $$|R_3(0.1)|\le \frac{M\,(0.1)^{4}}{4!}=\frac{0.9375\times 10^{-4}}{24}=3.91\times10^{-6}.$$ **$\sqrt{1.1}\approx 1.0488125$, with error at most $3.91\times10^{-6}$; so $1.0488085<\sqrt{1.1}<1.0488165$ (endpoints rounded outward).** *Check.* $\sqrt{1.1}=1.0488088482\dots$, so the true error is $3.65\times10^{-6}$ — inside the bound. Squaring the estimate: $1.0488125^{2}=1.10000766\dots$, just above $1.1$, confirming the approximation is slightly too large (as the negative $f^{(4)}$ predicts).

Use the degree-44 Maclaurin polynomial of f(x)=ln(1+x)f(x)=\ln(1+x) to estimate ln(1.1)\ln(1.1), and use Taylor's Inequality to bound the error.

Show hint

Find the pattern in the derivatives of ln(1+x)\ln(1+x) — they are all of the form (constant)×(1+x)n\times(1+x)^{-n} — and remember you need the fifth derivative for the bound.

Show answer

Step 1: derivatives at 00.

f(x)&=\ln(1+x), & f(0)&=0,\\ f'(x)&=(1+x)^{-1}, & f'(0)&=1,\\ f''(x)&=-(1+x)^{-2}, & f''(0)&=-1,\\ f'''(x)&=2(1+x)^{-3}, & f'''(0)&=2,\\ f^{(4)}(x)&=-6(1+x)^{-4}, & f^{(4)}(0)&=-6,\\ f^{(5)}(x)&=24(1+x)^{-5}. & & \end{aligned}$$ (The pattern is $f^{(n)}(x)=(-1)^{n-1}(n-1)!\,(1+x)^{-n}$, valid for $x>-1$.) **Step 2: assemble $T_4$.** $$\begin{aligned} T_4(x)&=0+\frac{1}{1!}x+\frac{-1}{2!}x^{2}+\frac{2}{3!}x^{3}+\frac{-6}{4!}x^{4}\\ &=x-\frac{x^{2}}{2}+\frac{x^{3}}{3}-\frac{x^{4}}{4}. \end{aligned}$$ **Step 3: evaluate at $x=0.1$** (since $\ln(1.1)=\ln(1+0.1)$): $$\begin{aligned} T_4(0.1)&=0.1-\frac{0.01}{2}+\frac{0.001}{3}-\frac{0.0001}{4}\\ &=0.1-0.005+0.00033333-0.000025\\ &=0.09530833. \end{aligned}$$ **Step 4: bound.** On $[0,0.1]$, $\left|f^{(5)}(t)\right|=\dfrac{24}{(1+t)^{5}}\le \dfrac{24}{1^{5}}=24$, the maximum occurring at $t=0$. With $M=24$ and $n=4$: $$|R_4(0.1)|\le\frac{24\,(0.1)^{5}}{5!}=\frac{24\times 10^{-5}}{120}=2\times 10^{-6}.$$ **$\ln(1.1)\approx 0.09530833$ with error at most $2\times 10^{-6}$; hence $0.0953063<\ln(1.1)<0.0953104$ (endpoints rounded outward).** *Check.* $\ln(1.1)=0.0953101798\dots$, so the true error is $1.85\times10^{-6}$ — just inside the bound, and positive as expected (the omitted $x^{5}/5$ term is positive).

Show that the approximation sinxxx36\sin x\approx x-\dfrac{x^{3}}{6} has error at most 6.5×1046.5\times10^{-4} for every xx in [0.6,0.6][-0.6,0.6]. Then explain why the naive choice n=3n=3 gives a much weaker bound.

Show hint

sin\sin is an odd function — think about what its degree-44 Maclaurin polynomial is before choosing which nn to feed into Taylor's Inequality.

Show answer

Step 1: identify the polynomial's true degree label. For f(x)=sinxf(x)=\sin x the Maclaurin coefficients of even powers all vanish (f(0)=f(0)=f(4)(0)=0f(0)=f''(0)=f^{(4)}(0)=0), so

T3(x)=T4(x)=xx36.T_3(x)=T_4(x)=x-\frac{x^{3}}{6}.

The same polynomial is therefore also the degree-44 Taylor polynomial, and we are entitled to use n=4n=4 in Taylor's Inequality.

Step 2: bound the fifth derivative. Differentiating sin\sin five times returns f(5)(t)=costf^{(5)}(t)=\cos t, so for all real tt

f(5)(t)=cost1=:M.\left|f^{(5)}(t)\right|=|\cos t|\le 1=:M .

(The hypotheses of Taylor's Theorem hold everywhere: sin\sin is infinitely differentiable on (,)(-\infty,\infty).)

Step 3: apply Taylor's Inequality with n=4n=4, a=0a=0, x0.6|x|\le 0.6.

|R_4(x)|&\le \frac{M\,|x|^{5}}{5!}\\ &\le \frac{1\cdot (0.6)^{5}}{120}\\ &=\frac{0.07776}{120}\\ &=6.48\times10^{-4}. \end{aligned}$$ Since $6.48\times10^{-4}\le 6.5\times10^{-4}$, the claim holds for every $x$ with $|x|\le 0.6$. **Step 4: why $n=3$ is worse.** With $n=3$ we would need $f^{(4)}(t)=\sin t$, and on $[-0.6,0.6]$ the best bound is $M=\sin(0.6)=0.5646$. Then $$|R_3(x)|\le \frac{0.5646\,(0.6)^{4}}{4!}=\frac{0.5646\times 0.1296}{24}=3.05\times10^{-3},$$ about **five times** weaker. Going from $n=3$ to $n=4$ multiplies the bound by the extra factor $|x|/5=0.12$, which easily outweighs the increase in $M$ from $0.5646$ to $1$. Whenever $f$ has a parity (even or odd), check for this free upgrade. *Check that the bound is honest and sharp.* At the worst point $x=0.6$: $T_3(0.6)=0.6-\frac{0.216}{6}=0.564$, while $\sin(0.6)=0.5646424734\dots$. The true error is $6.4247\times10^{-4}$ — under $6.48\times10^{-4}$, and only $0.8\%$ below it.

How large must nn be so that the Maclaurin polynomial TnT_n of f(x)=exf(x)=e^{x} approximates exe^{x} to within 10510^{-5} for every xx in [1,1][-1,1]?

Show hint

Write down Taylor's Inequality for this ff and interval first, with the worst-case values of both f(n+1)(t)|f^{(n+1)}(t)| and x|x| inserted; then hunt for the smallest nn making the resulting number small enough.

Show answer

Step 1: set up Taylor's Inequality. All derivatives of f(x)=exf(x)=e^{x} are exe^{x}, so on I=[1,1]I=[-1,1]

f(n+1)(t)=ete1=e<3=:M,\left|f^{(n+1)}(t)\right|=e^{t}\le e^{1}=e<3=:M ,

since ete^{t} is increasing. Also x0=x1|x-0|=|x|\le 1 on II. Therefore, for every x[1,1]x\in[-1,1],

Rn(x)Mxn+1(n+1)!31n+1(n+1)!=3(n+1)!.|R_n(x)|\le \frac{M\,|x|^{n+1}}{(n+1)!}\le \frac{3\cdot 1^{n+1}}{(n+1)!}=\frac{3}{(n+1)!}.

Step 2: force this under 10510^{-5}. We need

3(n+1)!<105i.e.(n+1)!>3×105=300000.\frac{3}{(n+1)!}<10^{-5}\quad\text{i.e.}\quad (n+1)!>3\times10^{5}=300\,000 .

Step 3: search the factorials.

nn(n+1)!(n+1)!3/(n+1)!3/(n+1)!
66504050405.95×1045.95\times10^{-4}
774032040\,3207.44×1057.44\times10^{-5}
88362880362\,8808.27×1068.27\times10^{-6}

8!=40320<3000008!=40\,320<300\,000 but 9!=362880>3000009!=362\,880>300\,000, so the smallest admissible value is n+1=9n+1=9.

n=8n=8 suffices: exT8(x)8.27×106<105\left|e^{x}-T_8(x)\right|\le 8.27\times10^{-6}<10^{-5} for all x[1,1]x\in[-1,1].

Step 4: confirm the answer does not depend on the sloppy MM. Using the sharp M=e=2.71828M=e=2.71828 instead of 33 requires (n+1)!>e×105=271828(n+1)!>e\times 10^{5}=271\,828, and again 8!8! fails while 9!9! succeeds. Same conclusion, n=8n=8.

Check that n=7n=7 really is not enough (at least for our bound). The worst point is x=1x=1, where T7(1)=1+1+12+16+124+1120+1720+15040=2.7182539683T_7(1)=1+1+\frac12+\frac16+\frac1{24}+\frac1{120}+\frac1{720}+\frac1{5040}=2.7182539683, and e=2.7182818285e=2.7182818285, so the actual error is 2.79×105>1052.79\times10^{-5}>10^{-5}. So n=7n=7 genuinely fails, and n=8n=8 is truly the smallest degree that works. (At n=8n=8 the actual worst error is 3.06×1063.06\times10^{-6}.)

Use the degree-22 Taylor polynomial of f(x)=x1/3f(x)=x^{1/3} centred at a=8a=8 to approximate 8.53\sqrt[3]{8.5}, and bound the error with Taylor's Inequality.

Show hint

Choose the centre because 88 is a perfect cube; then be careful with the negative fractional exponents, and note that ff''' is decreasing in magnitude on [8,8.5][8,8.5].

Show answer

Step 1: derivatives.

f(x)&=x^{1/3}, & f(8)&=2,\\ f'(x)&=\frac13x^{-2/3}, & f'(8)&=\frac13\cdot\frac{1}{4}=\frac{1}{12}\quad(8^{2/3}=4),\\ f''(x)&=-\frac29x^{-5/3}, & f''(8)&=-\frac29\cdot\frac{1}{32}=-\frac{1}{144}\quad(8^{5/3}=32),\\ f'''(x)&=\frac{10}{27}x^{-8/3}. & & \end{aligned}$$ **Step 2: assemble $T_2$.** $$\begin{aligned} T_2(x)&=2+\frac{1/12}{1!}(x-8)+\frac{-1/144}{2!}(x-8)^{2}\\ &=2+\frac{x-8}{12}-\frac{(x-8)^{2}}{288}. \end{aligned}$$ **Step 3: evaluate at $x=8.5$**, so $x-8=0.5$: $$\begin{aligned} T_2(8.5)&=2+\frac{0.5}{12}-\frac{0.25}{288}\\ &=2+\frac{1}{24}-\frac{1}{1152}\\ &=\frac{2304+48-1}{1152}=\frac{2351}{1152}\\ &=2.04079861. \end{aligned}$$ **Step 4: bound the error.** On $[8,8.5]$, $f'''(t)=\dfrac{10}{27}t^{-8/3}>0$ is decreasing, so its maximum is at $t=8$: $$M=\frac{10}{27}\cdot 8^{-8/3}=\frac{10}{27\cdot 256}=\frac{10}{6912}=1.4468\times10^{-3}\qquad (8^{8/3}=2^{8}=256).$$ With $n=2$ and $|x-a|=0.5$: $$|R_2(8.5)|\le \frac{M\,(0.5)^{3}}{3!}=\frac{1.4468\times10^{-3}\times 0.125}{6}=3.01\times10^{-5}.$$ **$\sqrt[3]{8.5}\approx 2.0407986$, with error at most $3.01\times10^{-5}$; hence $2.040768<\sqrt[3]{8.5}<2.040829$ (endpoints rounded outward).** *Check.* The true value is $\sqrt[3]{8.5}=2.0408275510\dots$, so the actual error is $2.89\times10^{-5}$ — inside the bound, and the estimate is too small, as the positive $f'''$ (hence positive $R_2$) predicts. Cubing the estimate: $2.0407986^{3}=8.4996\dots$, close to $8.5$. ✔

A student bounds the error of T3(x)=xx22+x33T_3(x)=x-\dfrac{x^{2}}{2}+\dfrac{x^{3}}{3} as an approximation to ln(1+x)\ln(1+x) on [0.2,0.2][-0.2,\,0.2] by writing "f(4)(t)=6(1+t)46|f^{(4)}(t)|=\dfrac{6}{(1+t)^{4}}\le 6, so R3(x)6(0.2)44!=4×104|R_3(x)|\le \dfrac{6(0.2)^{4}}{4!}=4\times10^{-4}." Explain precisely what is wrong, give the correct bound, and verify your criticism numerically at x=0.2x=-0.2.

Show hint

Ask where on the interval 6(1+t)4\dfrac{6}{(1+t)^{4}} is actually largest — is t=0t=0 the worst case, or is one endpoint worse?

Show answer

Step 1: locate the error in the argument. The inequality 6(1+t)46\dfrac{6}{(1+t)^{4}}\le 6 holds only when (1+t)41(1+t)^{4}\ge 1, i.e. only for t0t\ge 0. But Taylor's Inequality demands a bound MM valid at every tt between the centre a=0a=0 and the point xx, and the interval [0.2,0.2][-0.2,0.2] contains negative tt, where (1+t)4<1(1+t)^{4}<1 and the quotient is larger than 66. The student has bounded f(4)|f^{(4)}| only on the right half of the interval.

Step 2: the correct MM. On [0.2,0.2][-0.2,0.2] the function 6(1+t)4\dfrac{6}{(1+t)^{4}} is decreasing (the denominator increases), so its maximum is at the left endpoint t=0.2t=-0.2:

M=6(10.2)4=6(0.8)4=60.4096=14.6484375.M=\frac{6}{(1-0.2)^{4}}=\frac{6}{(0.8)^{4}}=\frac{6}{0.4096}=14.6484375 .

Step 3: the correct bound. With n=3n=3, a=0a=0 and x0.2|x|\le0.2,

|R_3(x)|&\le \frac{M\,|x|^{4}}{4!}\\ &\le\frac{14.6484375\times (0.2)^{4}}{24}\\ &=\frac{14.6484375\times 0.0016}{24}\\ &=\frac{0.0234375}{24}\\ &=9.7656\times10^{-4}. \end{aligned}$$ **Correct bound: $|R_3(x)|\le 9.77\times10^{-4}$ on $[-0.2,0.2]$.** **Step 4: numerical verification that the student's bound is actually false.** At $x=-0.2$, $$\begin{aligned} T_3(-0.2)&=-0.2-\frac{(-0.2)^{2}}{2}+\frac{(-0.2)^{3}}{3}\\ &=-0.2-0.02-0.00266667\\ &=-0.22266667, \end{aligned}$$ while $\ln(0.8)=-0.2231435513\dots$. Hence $$|R_3(-0.2)|=\left|-0.2231435513+0.2226666667\right|=4.769\times10^{-4}.$$ Compare: $4.769\times10^{-4}>4\times10^{-4}$, so the student's claimed bound is **violated by the actual error** — it is not merely loose, it is wrong. The correct bound $9.77\times10^{-4}$ does hold, with room to spare. **Moral: $M$ must dominate $|f^{(n+1)}|$ across the whole interval between the centre and every point considered — check the endpoints, not just the centre.** (For contrast, at $x=+0.2$ the error is only $3.45\times10^{-4}$; the left half of the interval is genuinely the bad side, which is exactly what the student's shortcut hid.)