Borui Academy

Chapter 6

Taylor & Maclaurin Series

Coefficients $c_n = f^{(n)}(a)/n!$

Chapter 6 — Taylor & Maclaurin Series

By the end of this chapter you will:

  1. Derive the Taylor coefficient formula cn=f(n)(a)n!c_n = \frac{f^{(n)}(a)}{n!}
  2. Write the Taylor / Maclaurin series of a function
  3. Use Taylor polynomials (partial sums) for numerical estimation
  4. Understand why the coefficients take exactly that form

6.1 Motivation — Approximating Functions with Polynomials

Problem: can a polynomial P(x)=c0+c1x+c2x2+P(x) = c_0 + c_1 x + c_2 x^2 + \cdots approximate a complicated function f(x)f(x) — and grow more accurate with more terms?

Why we care: polynomials are easy to compute (just add, subtract, multiply). sinx\sin x, exe^x, lnx\ln x are not. Approximation lets us replace difficult functions with quick polynomial computations.

Taylor's idea: force the polynomial and ff to agree on all derivatives at a chosen point aa. The two then track each other very closely near aa.

🎵 Audio 1 — Why polynomial approximation?audio/ch6_01_motivation.mp3


6.2 Deriving the Taylor Coefficients

Suppose
f(x)=c0+c1(xa)+c2(xa)2+c3(xa)3+f(x) = c_0 + c_1(x-a) + c_2(x-a)^2 + c_3(x-a)^3 + \cdots

Set x=ax = a:
f(a)=c0c0=f(a)f(a) = c_0 \Rightarrow c_0 = f(a)

Differentiate both sides:
f(x)=c1+2c2(xa)+3c3(xa)2+f'(x) = c_1 + 2c_2(x-a) + 3c_3(x-a)^2 + \cdots

Set x=ax = a: f(a)=c1c1=f(a)f'(a) = c_1 \Rightarrow c_1 = f'(a).

Differentiate again:
f(x)=2c2+6c3(xa)+f''(x) = 2c_2 + 6 c_3(x-a) + \cdots

Set x=ax = a: f(a)=2c2c2=f(a)2f''(a) = 2 c_2 \Rightarrow c_2 = \frac{f''(a)}{2}.

After nn differentiations and setting x=ax = a:

f(n)(a)=n!cncn=f(n)(a)n!f^{(n)}(a) = n! \cdot c_n \Rightarrow \boxed{c_n = \frac{f^{(n)}(a)}{n!}}

🎵 Audio 2 — Coefficient derivationaudio/ch6_02_derivation.mp3


6.3 Definitions

Taylor series of ff centered at aa:

T(x)=n=0f(n)(a)n!(xa)nT(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x - a)^n

Taylor polynomial of degree nn (partial sum):

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

Maclaurin series: a Taylor series centered at a=0a = 0:

M(x)=n=0f(n)(0)n!xnM(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} x^n

🔑 Caution: a Taylor series can converge but not to f(x)f(x). Equality requires the Lagrange remainder to vanish (Chapter 8).

🎵 Audio 3 — Taylor / Maclaurin definitionsaudio/ch6_03_definitions.mp3

Taylor polynomial approximations of sin(x), increasing degree


6.4 Maclaurin Series from the Definition

Example 1: f(x)=exf(x) = e^x

All derivatives equal exe^x, so f(n)(0)=1f^{(n)}(0) = 1.

M(x)=n=01n!xn=1+x+x22!+x33!+M(x) = \sum_{n=0}^{\infty} \frac{1}{n!} x^n = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots

Radius of convergence R=R = \infty (verified in Ch. 7).

Example 2: f(x)=sinxf(x) = \sin x

Derivatives cycle with period 4: sin,cos,sin,cos\sin, \cos, -\sin, -\cos.

At x=0x = 0: 0,1,0,1,0,1,0, 1, 0, -1, 0, 1, \dots

Only odd-order coefficients survive, and signs alternate:

M(x)=xx33!+x55!x77!+=n=0(1)nx2n+1(2n+1)!M(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!}

Example 3: f(x)=cosxf(x) = \cos x

Cycle: cos,sin,cos,sin\cos, -\sin, -\cos, \sin. At 0: 1,0,1,0,1,1, 0, -1, 0, 1, \dots.

M(x)=1x22!+x44!=n=0(1)nx2n(2n)!M(x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!}

🎵 Audio 4 — Three classics: exe^x, sin\sin, cos\cosaudio/ch6_04_three_classics.mp3


6.5 Expanding About a0a \ne 0

Find the Taylor series of f(x)=lnxf(x) = \ln x at a=1a = 1.

f(1)=0f(1) = 0, f(x)=1xf'(x) = \frac{1}{x} so f(1)=1f'(1) = 1, f(x)=1x2f''(x) = -\frac{1}{x^2} so f(1)=1f''(1) = -1, f(x)=2x3f'''(x) = \frac{2}{x^3} so f(1)=2f'''(1) = 2.

In general f(n)(1)=(1)n1(n1)!f^{(n)}(1) = (-1)^{n-1}(n-1)! for n1n \ge 1.

T(x)=n=1(1)n1(n1)!n!(x1)n=n=1(1)n1n(x1)nT(x) = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}(n-1)!}{n!}(x-1)^n = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n}(x-1)^n

🔑 Strategy: compute the first 3–4 derivatives until you spot the pattern, then write the closed form.


6.6 Numerical Estimation with Taylor Polynomials

Example

Estimate sin(0.1)\sin(0.1) using the 4th-degree Maclaurin polynomial.

P4(x)=xx36P_4(x) = x - \frac{x^3}{6}

(Note: sin\sin has zero even-order coefficients, so degree 4 is effectively the cubic.)

P4(0.1)=0.10.00160.0998333P_4(0.1) = 0.1 - \frac{0.001}{6} \approx 0.0998333.

True value sin(0.1)0.0998334\sin(0.1) \approx 0.0998334, error <106< 10^{-6}. ✅

🎵 Audio 5 — Numerical estimationaudio/ch6_05_approximation.mp3


6.7 Trap Alerts ⚠️

  1. Don't drop the n!n! in the coefficient f(n)(a)n!\frac{f^{(n)}(a)}{n!}.
  2. "Degree-nn Taylor polynomial" means the highest power is nn — but functions like sin\sin may have zero coefficients on even powers.
  3. Convergence ≠ equality with ff. You need the Lagrange remainder to vanish.
  4. The center aa is not always 0. AP loves a=1a = 1 or a=π/4a = \pi/4.
  5. First few derivatives are easy to miscompute — slow down on the first 3–4, then generalize.

6.8 Mnemonic

"Function = polynomial sum, coefficients are f(n)(a)/n!f^{(n)}(a)/n!"

  • Maclaurin = Taylor at a=0a = 0
  • Memorize three classics: exe^x, sin\sin, cos\cos
  • Compute first 3–4 derivatives, then generalize

🎵 Audio 6 — Recap + mnemonicaudio/ch6_06_recap.mp3

Taylor coefficient summary card


Media Inventory

File Purpose
audio/ch6_01_motivation.mp3 Why approximate?
audio/ch6_02_derivation.mp3 Coefficient derivation
audio/ch6_03_definitions.mp3 Taylor / Maclaurin
audio/ch6_04_three_classics.mp3 exe^x, sin\sin, cos\cos
audio/ch6_05_approximation.mp3 Estimation
audio/ch6_06_recap.mp3 Recap
images/ch6_approximation.png Polynomial vs. sinx\sin x
images/ch6_formula.png Coefficient summary

End of chapter. Next: common Maclaurin expansions and operations.