Taylor Series and Local Approximation
Approximating a function near a point by a polynomial built from its derivatives - the workhorse behind linearization, duration, convexity, and Itô’s lemma.
Leads to: First- and second-order Taylor terms become delta/gamma hedging and the drift/diffusion split of Itô’s lemma.
Learning Objectives
Click a status chip to cycle: Not started → In progress → Studied → Practiced → Needs review → Mastered.
- Write the n-th order Taylor polynomial of a function about a point.
- Use the linear and quadratic approximations to estimate function values.
- Bound the approximation error with the Lagrange remainder.
- Apply a second-order Taylor expansion to bond price sensitivity (duration and convexity).
Key Vocabulary
- Taylor polynomial
- P_n(x)=∑_{k=0}^n f^{(k)}(a)(x−a)^k/k!, the best degree-n polynomial matching f and its derivatives at a.
- Linearization
- The degree-1 Taylor polynomial f(a)+f′(a)(x−a); the tangent-line approximation.
- Lagrange remainder
- R_n=f^{(n+1)}(ξ)(x−a)^{n+1}/(n+1)! for some ξ between a and x; the exact error.
- Maclaurin series
- A Taylor series centered at a=0.
- Duration
- −(1/P) dP/dy, the first-order sensitivity of a bond price to its yield.
- Convexity
- (1/P) d²P/dy², the second-order curvature correction to duration.
Building a local model from derivatives
Near a point \(a\), a smooth function looks like a polynomial whose coefficients are its derivatives at \(a\). The degree-\(n\) Taylor polynomial is
The degree-1 piece is the tangent line (linearization); the degree-2 piece adds curvature. Taylor’s theorem makes the error exact via the Lagrange remainder \(R_n=\frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1}\) for some \(\xi\) between \(a\) and \(x\).
Finance link: duration and convexity
A bond’s price \(P(y)\) as a function of yield \(y\) is smooth and convex. Expanding to second order about the current yield \(y_0\):
Dividing by \(P\), the first-order term defines (modified) duration \(D=-P'/P\) and the second the convexity \(C=P''/P\), giving the practitioner formula \(\Delta P/P\approx -D\,\Delta y+\tfrac12 C\,\Delta y^2\). Duration is the linear risk; convexity is the Taylor curvature correction that makes the estimate accurate for larger yield moves.
Interactive: Taylor polynomial explorer
- Treating a Taylor approximation as exact far from the center; accuracy is local and the remainder grows with |x−a|.
- Dropping the 1/k! factorial weights in the coefficients.
- Using only duration (linear term) for large yield moves and ignoring the convexity correction.
- Confusing a Taylor polynomial (finite, with remainder) with a convergent Taylor series (infinite, needs a convergence check).
- For quick mental estimates, e^x≈1+x, ln(1+x)≈x, and (1+x)^p≈1+px near 0.
- The remainder’s size is governed by the next derivative and the distance to the center - bound both.
- Second-order Taylor is exactly the delta-plus-gamma picture of option risk; the quadratic term is gamma/convexity.
- When a function equals its Taylor series (analytic), you may differentiate and integrate term by term.
Practice this in the Euler Lab
Computational problems that exercise exactly this technique. Each opens in the Euler Lab with a Python workbench, a progressive hint ladder, and answer checking. Tier A/B run at full scale in the browser.
Warm-up:
#24 Lexicographic Permutations (6%, tier A) #65 Convergents of $e$ (6%, tier A) #205 Dice Game (10%, tier A) #68 Magic 5-gon Ring (9%, tier B)
Applied:
#816 Shortest Distance Among Points (17%, tier B) #323 Bitwise-OR Operations on Random In (18%, tier B) #479 Roots on the Rise (19%, tier B)
Challenge:
#666 Polymorphic Bacteria (41%, tier C) #869 Prime Guessing (41%, tier C)
162 Project Euler problems in total are mapped to this lesson. Open the Euler Lab to filter them all.
Knowledge Check
Practical Exercise
(a) Find the third-order Taylor polynomial of \(\ln(1+x)\) about \(a=0\). (b) Use it to approximate \(\ln(1.2)\) and comment on the error using the next term.
(a) Derivatives at 0: \(f=\ln(1+x),\ f'=\tfrac{1}{1+x},\ f''=-\tfrac{1}{(1+x)^2},\ f'''=\tfrac{2}{(1+x)^3}\) give values \(0,1,-1,2\). So
(b) At \(x=0.2\): \(0.2-0.02+0.00267=0.18267\). True \(\ln1.2\approx0.18232\). The next term is \(-x^4/4=-4\times10^{-4}\), so the estimate should overshoot by roughly that much - and indeed the error is about \(3.5\times10^{-4}\). The alternating series has terms \((-1)^{k+1}x^k/k\).
Lesson Summary
Formula Sheet Additions
Retrieval Practice
Close the lesson and answer from memory before checking. This is deliberate, effortful recall - the single highest-yield study action.
A: f(x)≈f(a)+f′(a)(x−a)+½f″(a)(x−a)²: the linear term is the tangent-line slope (rate), the quadratic term is the curvature correction.
A: Expanding P(y) to second order about y0 gives ΔP/P≈−DΔy+½CΔy², where D=−P′/P (first order, duration) and C=P″/P (second order, convexity).
Completion Checklist
- I can explain the core ideas in my own words
- I worked the derivations/examples by hand
- I completed the interactive workbench(es)
- I passed the knowledge check
Source References
This lesson synthesizes and paraphrases concepts from the sources below. No copyrighted text, problem sets, or solutions are reproduced. Return to the originals for full depth.
- Calculus, Vol. I (Tom Apostol, 2nd ed., 1967) foundational - Vol. I, Ch. 7 - Taylor’s theorem with the Lagrange form of the remainder.
- Stochastic Calculus for Finance II (Steven Shreve, 2004) foundational - Ch. 3 motivation - Second-order (Taylor) expansions as the deterministic precursor to Itô’s lemma and hedging sensitivities.