Math ClubMath Club
v1 · padrão canônico

Lesson 65 — Taylor Polynomials

Local approximation of smooth functions by polynomials: Taylor/Maclaurin series, Lagrange remainder, and classic series for e^x, sin x, cos x.

Used in: 2nd year advanced HS · Japanese Equiv. Math III · German Equiv. Leistungskurs Analysis · University Calculus I

Pn(x)=k=0nf(k)(a)k!(xa)kP_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x - a)^k

The Taylor polynomial of degree nn centered at aa is the best local polynomial approximation of degree nn to ff. Each coefficient f(k)(a)/k!f^{(k)}(a)/k! ensures that the polynomial and the function have the *same value, same slope, same curvature*—up to the kk-th derivative—at point aa. When a=0a = 0, it is called the Maclaurin series.

Choose your door

Rigorous notation, full derivation, hypotheses

Rigorous Definition and Properties

Taylor Polynomial

"If ff has nn derivatives at x=ax = a, then the nnth-order Taylor polynomial of ff centered at aa is pn(x)=k=0nf(k)(a)k!(xa)kp_n(x) = \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}(x-a)^k." — APEX Calculus §8.6

Lagrange Remainder

"Let ff have n+1n + 1 derivatives on an open interval II and let aIa \in I. For each xIx \in I there exists a value cc between aa and xx such that Rn(x)=f(n+1)(c)(n+1)!(xa)n+1R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}." — OpenStax Calculus Vol. 2 §6.3

Classic Maclaurin Series

FunctionMaclaurin SeriesRadius
exe^x1+x+x22!+x33!+=k=0xkk!1 + x + \tfrac{x^2}{2!} + \tfrac{x^3}{3!} + \cdots = \displaystyle\sum_{k=0}^\infty \tfrac{x^k}{k!}\infty
sinx\sin xxx33!+x55!=k=0(1)kx2k+1(2k+1)!x - \tfrac{x^3}{3!} + \tfrac{x^5}{5!} - \cdots = \displaystyle\sum_{k=0}^\infty \tfrac{(-1)^k x^{2k+1}}{(2k+1)!}\infty
cosx\cos x1x22!+x44!=k=0(1)kx2k(2k)!1 - \tfrac{x^2}{2!} + \tfrac{x^4}{4!} - \cdots = \displaystyle\sum_{k=0}^\infty \tfrac{(-1)^k x^{2k}}{(2k)!}\infty
ln(1+x)\ln(1+x)xx22+x33=k=1(1)k+1xkkx - \tfrac{x^2}{2} + \tfrac{x^3}{3} - \cdots = \displaystyle\sum_{k=1}^\infty \tfrac{(-1)^{k+1} x^k}{k}(1,1](-1,1]
11x\dfrac{1}{1-x}1+x+x2+x3+=k=0xk1 + x + x^2 + x^3 + \cdots = \displaystyle\sum_{k=0}^\infty x^k(1,1)(-1,1)
arctanx\arctan xxx33+x55=k=0(1)kx2k+12k+1x - \tfrac{x^3}{3} + \tfrac{x^5}{5} - \cdots = \displaystyle\sum_{k=0}^\infty \tfrac{(-1)^k x^{2k+1}}{2k+1}[1,1][-1,1]

Solved Examples

Exercise list

40 exercises · 10 with worked solution (25%)

22 8 4 2 4
  1. Ex. 65.1

    Write the Maclaurin polynomial for f(x)=exf(x) = e^x up to x4x^4.

    Show solution
    All derivatives of exe^x at x=0x=0 equal 11. Therefore P4(x)=1+x+x2/2+x3/6+x4/24P_4(x) = 1 + x + x^2/2 + x^3/6 + x^4/24.
  2. Ex. 65.2Answer key

    Write the Maclaurin polynomial for f(x)=sinxf(x) = \sin x up to x7x^7.

    Show solution
    Using alternating derivatives of sin\sin and cos\cos at 0: P7(x)=xx3/6+x5/120x7/5040P_7(x) = x - x^3/6 + x^5/120 - x^7/5040.
  3. Ex. 65.3Answer key

    Write the Maclaurin polynomial for f(x)=cosxf(x) = \cos x up to x6x^6.

    Show solution
    P6(x)=1x2/2+x4/24x6/720P_6(x) = 1 - x^2/2 + x^4/24 - x^6/720. The odd derivatives of cos\cos at 0 are zero.
  4. Ex. 65.4Answer key

    Write the Maclaurin polynomial for f(x)=ln(1+x)f(x) = \ln(1+x) up to x4x^4.

    Show solution
    f(k)(0)/k!=(1)k+1/kf^{(k)}(0)/k! = (-1)^{k+1}/k for k1k \geq 1. Thus P4(x)=xx2/2+x3/3x4/4P_4(x) = x - x^2/2 + x^3/3 - x^4/4.
    Show step-by-step (with the why)
    1. Derivatives: f=ln(1+x)f = \ln(1+x), f=1/(1+x)f' = 1/(1+x), f=1/(1+x)2f'' = -1/(1+x)^2, f=2/(1+x)3f''' = 2/(1+x)^3, f=6/(1+x)4f'''' = -6/(1+x)^4.
    2. At x=0x=0: f(0)=0f(0)=0, f(0)=1f'(0)=1, f(0)=1f''(0)=-1, f(0)=2f'''(0)=2, f(0)=6f''''(0)=-6.
    3. Divide by k!k!: coefficients 0,1,1/2,1/3,1/40, 1, -1/2, 1/3, -1/4.
    4. Assemble: P4(x)=xx2/2+x3/3x4/4P_4(x) = x - x^2/2 + x^3/3 - x^4/4.
    5. Trick: the coefficients follow the pattern (1)k+1/k(-1)^{k+1}/k—recognizing this avoids calculating high derivatives.
  5. Ex. 65.5

    Maclaurin for f(x)=1/(1x)f(x) = 1/(1-x) up to x5x^5—it's simply the geometric series.

  6. Ex. 65.6

    Maclaurin for f(x)=(1+x)1/2f(x) = (1+x)^{1/2} up to x3x^3. Calculate ff', ff'', ff''' at x=0x = 0.

    Show solution
    Using binomial with α=1/2\alpha = 1/2: P3(x)=1+x/2x2/8+x3/16P_3(x) = 1 + x/2 - x^2/8 + x^3/16.
  7. Ex. 65.7

    Maclaurin for arctanx\arctan x up to x5x^5 (via integration of 1/(1+x2)1/(1+x^2)).

  8. Ex. 65.8Answer key

    Maclaurin for sinhx\sinh x and coshx\cosh x up to x5x^5.

    Show solution
    sinhx=x+x3/6+x5/120\sinh x = x + x^3/6 + x^5/120 and coshx=1+x2/2+x4/24\cosh x = 1 + x^2/2 + x^4/24. These are the series for sin\sin and cos\cos without the alternating signs.
  9. Ex. 65.9

    Maclaurin for exe^{-x} up to x4x^4 (direct substitution into exe^x).

  10. Ex. 65.10

    Maclaurin for tanx\tan x up to x5x^5 using sin/cos\sin/\cos.

    Show solution
    Write tanx=sinx/cosx\tan x = \sin x / \cos x and divide the series: P5(x)=x+x3/3+2x5/15P_5(x) = x + x^3/3 + 2x^5/15.
  11. Ex. 65.11

    Maclaurin for cos(2x)\cos(2x) up to x4x^4 via substitution.

  12. Ex. 65.12Answer key

    Maclaurin for ex2e^{x^2} up to x6x^6.

    Show solution
    Substitute xx2x \to x^2 into the series for exe^x: P6(x)=1+x2+x4/2+x6/6P_6(x) = 1 + x^2 + x^4/2 + x^6/6.
    Show step-by-step (with the why)
    1. Series for eu=1+u+u2/2+u3/6+e^u = 1 + u + u^2/2 + u^3/6 + \cdots.
    2. Substitute u=x2u = x^2: ex2=1+x2+x4/2+x6/6+e^{x^2} = 1 + x^2 + x^4/2 + x^6/6 + \cdots.
    3. Up to order 6: P6(x)=1+x2+x4/2+x6/6P_6(x) = 1 + x^2 + x^4/2 + x^6/6.
    4. Trick: composition by direct substitution avoids explicitly differentiating ex2e^{x^2}—much faster.
  13. Ex. 65.13

    Maclaurin for cos(x2)\cos(x^2) up to x8x^8.

  14. Ex. 65.14

    Maclaurin for ln(1x2)\ln(1 - x^2) up to x6x^6.

    Show solution
    ln(1x2)=ln(1+(x2))\ln(1 - x^2) = \ln(1 + (-x^2)). Substitute u=x2u = -x^2 into the series for ln(1+u)\ln(1+u): P6(x)=x2x4/2x6/3P_6(x) = -x^2 - x^4/2 - x^6/3.
  15. Ex. 65.15

    Maclaurin for 1/(1+x2)1/(1+x^2) up to x6x^6 (geometric series with u=x2u = -x^2).

  16. Ex. 65.16

    Maclaurin for exsinxe^x \sin x up to x4x^4.

    Show solution
    Product: (1+x+x2/2+)(xx3/6+)(1 + x + x^2/2 + \cdots)(x - x^3/6 + \cdots). Collecting up to x4x^4: P4(x)=x+x2+x3/3x4/6P_4(x) = x + x^2 + x^3/3 - x^4/6.
  17. Ex. 65.17

    Maclaurin for sinxcosx\sin x \cos x up to x5x^5 (or use sin(2x)/2\sin(2x)/2).

  18. Ex. 65.18

    Maclaurin for xexx e^{-x} up to x4x^4.

    Show solution
    xex=x(1x+x2/2x3/6+)x e^{-x} = x(1 - x + x^2/2 - x^3/6 + \cdots). Multiplying: P4(x)=xx2+x3/2x4/6P_4(x) = x - x^2 + x^3/2 - x^4/6.
  19. Ex. 65.19

    Taylor for lnx\ln x around a=1a = 1, order 4.

    Show solution
    f(x)=lnxf(x) = \ln x. Derivatives at a=1a=1: f(1)=0f(1)=0, f(1)=1f'(1)=1, f(1)=1f''(1)=-1, f(1)=2f'''(1)=2, f(1)=6f''''(1)=-6. Thus P4(x)=(x1)(x1)2/2+(x1)3/3(x1)4/4P_4(x) = (x-1) - (x-1)^2/2 + (x-1)^3/3 - (x-1)^4/4.
    Show step-by-step (with the why)
    1. Calculate derivatives: f=1/x,f=1/x2,f=2/x3,f=6/x4f'=1/x, f''=-1/x^2, f'''=2/x^3, f''''=-6/x^4.
    2. Evaluate at a=1a=1: 0,1,1,2,60, 1, -1, 2, -6.
    3. Divide by k!k!: coefficients 0,1,1/2,1/3,1/40, 1, -1/2, 1/3, -1/4.
    4. Assemble with (x1)k(x-1)^k.
    5. Curiosity: this is exactly the expansion of ln(1+u)\ln(1+u) with u=x1u = x-1—verify by substitution.
  20. Ex. 65.20

    Taylor for x\sqrt{x} around a=1a = 1, order 3.

  21. Ex. 65.21Answer key

    Taylor for 1/x1/x around a=1a = 1, order 3.

    Show solution
    Taylor for 1/x1/x at a=1a=1: f(k)(1)=(1)kk!f^{(k)}(1) = (-1)^k k!, so P3(x)=1(x1)+(x1)2(x1)3P_3(x) = 1 - (x-1) + (x-1)^2 - (x-1)^3.
  22. Ex. 65.22

    Taylor for cosx\cos x around a=π/4a = \pi/4, order 4.

  23. Ex. 65.23

    Calculate limx0ex1xx2\displaystyle\lim_{x \to 0} \frac{e^x - 1 - x}{x^2} using Taylor.

  24. Ex. 65.24

    Calculate limx0sinxxx3\displaystyle\lim_{x \to 0} \frac{\sin x - x}{x^3} using Taylor.

  25. Ex. 65.25

    Calculate limx0cosx1+x2/2x4\displaystyle\lim_{x \to 0} \frac{\cos x - 1 + x^2/2}{x^4}.

    Show solution
    Series for cosx=1x2/2+x4/24\cos x = 1 - x^2/2 + x^4/24 - \cdots. Numerator: cosx1+x2/2=x4/24\cos x - 1 + x^2/2 = x^4/24 - \cdots. Divided by x4x^4: limit is 1/241/24.
  26. Ex. 65.26

    Calculate limx0sinxtanxx3\displaystyle\lim_{x \to 0} \frac{\sin x - \tan x}{x^3}.

    Show solution
    sinx=xx3/6+\sin x = x - x^3/6 + \cdots, tanx=x+x3/3+\tan x = x + x^3/3 + \cdots. Numerator: sinxtanx=x3/2+\sin x - \tan x = -x^3/2 + \cdots. Divided by x3x^3: limit is 1/2-1/2.
  27. Ex. 65.27

    Estimate ln(1.1)\ln(1.1) with error less than 10410^{-4} using the Maclaurin series. State the order needed.

  28. Ex. 65.28Answer key

    Approximate sin(0.1)\sin(0.1) with error less than 10610^{-6}. State the order used.

    Show solution
    P5(0.1)=0.10.13/6+0.15/1200.099833P_5(0.1) = 0.1 - 0.1^3/6 + 0.1^5/120 \approx 0.099833. Estimated error via Lagrange: R5(0.1)7/50402×1010|R_5| \leq (0.1)^7/5040 \approx 2 \times 10^{-10}. 6 digits of precision with order 5.
    Show step-by-step (with the why)
    1. Series: sinx=xx3/6+x5/120x7/5040+\sin x = x - x^3/6 + x^5/120 - x^7/5040 + \cdots.
    2. At x=0.1x = 0.1: 0.10.000167+0.00000008330.0998330.1 - 0.000167 + 0.0000000833 \approx 0.099833.
    3. Error via Leibniz (alternating series): next term x7/50402×1011|{-x^7/5040}| \approx 2 \times 10^{-11}.
    4. Order 5 guarantees 6 decimal places. ✓
    5. Trick: for a decreasing alternating series, the error is less than the absolute value of the first omitted term.
  29. Ex. 65.29

    Approximate 1.1\sqrt{1.1} using Taylor of 1+x\sqrt{1+x} at a=0a = 0 up to order 2.

  30. Ex. 65.30

    Relativistic energy: E=mc2/1v2/c2E = mc^2/\sqrt{1 - v^2/c^2}. Expand in powers of v/cv/c and identify the terms E0=mc2E_0 = mc^2 and Ek=12mv2E_k = \frac{1}{2}mv^2.

    Show solution
    In physics: E=mc2(1v2/c2)1/2E = mc^2(1 - v^2/c^2)^{-1/2}. Binomial series with u=v2/c2u = v^2/c^2: (1u)1/2=1+u/2+3u2/8+(1-u)^{-1/2} = 1 + u/2 + 3u^2/8 + \cdots. Thus Emc2+12mv2+E \approx mc^2 + \frac{1}{2}mv^2 + \cdots. The first term is rest energy, the second is classical kinetic.
  31. Ex. 65.31

    What makes PnP_n the "best polynomial approximation of degree nn" at aa?

    Select the correct option
    Select an option first
    Show solution
    The characteristic property is that Pn(k)(a)=f(k)(a)P_n^{(k)}(a) = f^{(k)}(a) for k=0,1,,nk = 0, 1, \ldots, n. No other polynomial of degree nn satisfies all these equalities simultaneously.
  32. Ex. 65.32

    Show that if ff is a polynomial of degree n\leq n, then Pn=fP_n = f exactly (not just an approximation).

    Show solution
    If $f$ is a polynomial of degree $\leq n$, then f(k)f^{(k)} is identical for $k \leq n$. Thus $P_n$ and $f$ have the same coefficients—they are equal.
  33. Ex. 65.33Answer key

    Justify that exe^x has an infinite radius of convergence using Lagrange remainder estimation.

    Show solution
    For exe^x: Rn(x)exxn+1/(n+1)!|R_n(x)| \leq e^{|x|}|x|^{n+1}/(n+1)!. Since xn+1/(n+1)!0|x|^{n+1}/(n+1)! \to 0 for every fixed xx (factorial grows faster than power), the remainder goes to zero. Infinite radius.
  34. Ex. 65.34

    In finance, (1+r/n)ner(1 + r/n)^n \to e^r as nn \to \infty (continuous compounding). Use Taylor expansion of ere^r to estimate the annual growth factor with r=12%r = 12\% and compare with simple interest.

    Show solution
    Exchange rate: er1+r+r2/2e^r \approx 1 + r + r^2/2. For r=0.12r = 0.12 (12% p.a.): e0.121.1275e^{0.12} \approx 1.1275. For simple interest: 1.121.12. Difference of 0.7%\approx 0.7\%—relevant in long-term calculations.
  35. Ex. 65.35

    Derive Euler's formula eix=cosx+isinxe^{ix} = \cos x + i\sin x by separating even and odd terms from the series for eze^z.

    Show solution
    eix=(ix)k/k!e^{ix} = \sum (ix)^k/k!. Terms with even kk: (1)k/2xk/(k!)(-1)^{k/2} x^k/(k!), which is the series for cosx\cos x. Odd terms: i(1)(k1)/2xk/(k!)i(-1)^{(k-1)/2} x^k/(k!), which is isinxi \sin x. Thus eix=cosx+isinxe^{ix} = \cos x + i \sin x.
  36. Ex. 65.36

    Show that f(x)=e1/x2f(x) = e^{-1/x^2} (with f(0)=0f(0) = 0) has all derivatives zero at 00—thus Pn=0P_n = 0 for all nn, but fPnf \neq P_n.

    Show solution
    See the referenced source for the detailed solution.
  37. Ex. 65.37Answer key

    Prove that the Maclaurin series for exe^x converges to exe^x for all xRx \in \mathbb{R} (use Lagrange remainder estimation).

    Show solution
    Lagrange remainder: Rn(x)Mxn+1/(n+1)!|R_n(x)| \leq M|x|^{n+1}/(n+1)! where M=maxf(n+1)M = \max|f^{(n+1)}| on the interval. For exe^x, M=exM = e^{|x|} (fixed). Since xn+1/(n+1)!0|x|^{n+1}/(n+1)! \to 0, the remainder goes to zero. Therefore PnfP_n \to f for all xx.
  38. Ex. 65.38Answer key

    Prove the multivariate Taylor expansion of order 2 (with Hessian) by reducing it to a 1D Taylor expansion along a parametric line.

    Show solution
    Apply 1D Taylor to g(t)=f(a+th)g(t) = f(\vec a + t\vec h) for t[0,1]t \in [0,1]. Then g(t)=fhg'(t) = \nabla f \cdot \vec h and g(t)=hTHhg''(t) = \vec h^T H \vec h. Taylor expansion of gg at t=0t=0 up to order 2, evaluated at t=1t=1, yields the multivariate result.
  39. Ex. 65.39

    Prove the Lagrange form of the remainder using the Generalized Mean Value Theorem.

    Show solution
    By Lagrange remainder: there exists ξ\xi between aa and xx such that Rn(x)=f(n+1)(ξ)(xa)n+1/(n+1)!R_n(x) = f^{(n+1)}(\xi)(x-a)^{n+1}/(n+1)!. This is the Generalized Mean Value Theorem—prove it by applying the MVT to the remainder RnR_n as a function of aa.
  40. Ex. 65.40

    Integrate the series 1/(1+t2)=(1)kt2k1/(1+t^2) = \sum (-1)^k t^{2k} to obtain arctanx\arctan x as a series. Use this to derive Leibniz's formula: π/4=11/3+1/51/7+\pi/4 = 1 - 1/3 + 1/5 - 1/7 + \cdots

    Show solution
    Integrate the series for 1/(1+t2)=(1)kt2k1/(1+t^2) = \sum (-1)^k t^{2k} from 00 to xx: arctanx=(1)kx2k+1/(2k+1)\arctan x = \sum (-1)^k x^{2k+1}/(2k+1). At x=1x=1: π/4=11/3+1/51/7+\pi/4 = 1 - 1/3 + 1/5 - 1/7 + \cdots (Leibniz series). Thus π=4(11/3+1/5)\pi = 4(1 - 1/3 + 1/5 - \cdots).

Sources

  • Active Calculus — Boelkins · 2024 · §8.5 Taylor Polynomials and Taylor Series · CC-BY-NC-SA. Primary source.
  • Calculus Volume 2 — OpenStax · 2016 · §6.3 Taylor and Maclaurin Series · CC-BY-NC-SA.
  • APEX Calculus — Hartman et al. · 2024 · v5.0 · §8.6 Taylor Polynomials · CC-BY-NC.

Updated on 2024-07-27 · Author(s): Clube da Matemática

Found an error? Open an issue on GitHub or submit a PR — open source forever.