MathematicsGrade 12–13 · University

Taylor polynomials

Term by term a polynomial hugs a function such as sin x ever more closely. That is pretty much how a calculator does it.

Loading simulation …

What is it about?

The Taylor polynomial Tn(x)=∑k=0nf(k)(a)k!(x−a)kT_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^k shares the value and the first nn derivatives with ff at aa: T0T_0 is the horizontal line y=f(a)y = f(a), T1T_1 the tangent, T2T_2 the osculating parabola. Differentiating (x−a)k(x-a)^k kk times gives k!k! – that is why ck=f(k)(a)k!c_k = \frac{f^{(k)}(a)}{k!}.

For sin, cos and exe^x the Lagrange bound ∣Rn(x)∣≤M∣x−a∣n+1(n+1)!|R_n(x)| \le M \frac{|x-a|^{n+1}}{(n+1)!} estimates the error. For ln⁡(1+x)\ln(1+x) and 11−x\frac{1}{1-x} the polynomials only converge within the interval of convergence ∣x−a∣<r|x - a| < r; outside they blow up and the error grows with nn.

Try it

  1. sin x about 0: press “Increase degree” several times. Why does every second step change nothing?
  2. Matching derivatives: which ticks are green? Tap the rows to compare f′′f'' and T2′′T_2''.
  3. Radius of convergence: run through all degrees – what happens to the right of x=1x = 1?
  4. Calculator: how many digits of ee are correct after each term?
  5. Pendulum: up to which angle is sin⁡φ≈φ\sin\varphi \approx \varphi good enough?

Tasks

Task 1: Computing e

Load task

Find T4(1)T_4(1) for exe^x about 00, the error and the Lagrange bound. How many terms give 6 correct decimals?

Show solution

1+1+12+16+124=6524≈2.7083331 + 1 + \frac12 + \frac16 + \frac1{24} = \frac{65}{24} \approx 2.708333, error ≈0.009948\approx 0.009948; bound e5!≈0.022652\frac{e}{5!} \approx 0.022652. Six decimals need ∣Rn(1)∣<5⋅10−7|R_n(1)| < 5 \cdot 10^{-7}: degree n=9n = 9, i.e. 1010 terms, T9(1)≈2.718282T_9(1) \approx 2.718282. Show

Task 2: sin 0.5

Load task

Use T3(x)=x−x36T_3(x) = x - \frac{x^3}{6} to approximate sin⁡0.5\sin 0.5 and bound the error.

Show solution

T3(0.5)≈0.479167T_3(0.5) \approx 0.479167, exact 0.4794260.479426. Lagrange: 0.544!≈0.002604\frac{0.5^4}{4!} \approx 0.002604; since T3=T4T_3 = T_4 even 0.555!≈0.000260\frac{0.5^5}{5!} \approx 0.000260. Show

Task 3: How far does “sin φ ≈ φ” go?

Load task

For which φ\varphi is ∣sin⁡φ−φ∣<0.01|\sin\varphi - \varphi| < 0.01?

Show solution

Estimate φ36<0.01⇒φ<0.39\frac{\varphi^3}{6} < 0.01 \Rightarrow \varphi < 0.39; exactly ∣φ∣<0.392493|\varphi| < 0.392493, about 22.5°22.5°. A relative error below 1 %1\,\% only holds up to about 14.0°14.0°. Show

Task 4: ln 2 from the series

Load task

Compute T5(1)T_5(1) for ln⁡(1+x)\ln(1+x) about 00 and compare with ln⁡2\ln 2.

Show solution

1−12+13−14+15≈0.7833331 - \frac12 + \frac13 - \frac14 + \frac15 \approx 0.783333, while ln⁡2≈0.693147\ln 2 \approx 0.693147: at the boundary point x=1x = 1 the series converges only slowly. For x=1.5x = 1.5 it diverges. Show

Ideas for the classroom

  • Start with the question “How does a calculator compute sin⁡0.5\sin 0.5?”; continue from the tangent to T2T_2 with the matching-derivatives view; link to the pendulum.
  • Common stumbling blocks: forgetting k!k!; writing xkx^k instead of (x−a)k(x-a)^k; expecting more terms to help outside the interval of convergence; confusing the Lagrange bound with the true error.