Skip to content
LeetQuant
F1 Mathematical Reasoning and Calculus

F1 · Mathematical Reasoning and Calculus · Lesson 2 of 6

Taylor Expansions and Approximation

First- and second-order expansions of the functions interviewers care about, how big the error is, and how to use them for fast estimates.

15 min

The idea

Near a point aa, a smooth function looks like its tangent line, and a little further out like a parabola. The Taylor expansion makes this precise:

f(a+h)=f(a)+f′(a)h+f′′(a)2h2+⋯+f(n)(a)n!hn+Rn,f(a + h) = f(a) + f'(a)h + \frac{f''(a)}{2}h^2 + \cdots + \frac{f^{(n)}(a)}{n!}h^n + R_n,

with the Lagrange remainder Rn=f(n+1)(ξ)(n+1)!hn+1R_n = \dfrac{f^{(n+1)}(\xi)}{(n+1)!}h^{n+1} for some ξ\xi between aa and a+ha + h. The practical reading: the error of an order-nn approximation is about the size of the first omitted term. If h=0.01h = 0.01, each extra order buys roughly two more decimal places.

The expansions to know by heart (around 0)

FunctionExpansionValid for
exe^x1+x+x22+x36+⋯1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdotsall xx
ln⁡(1+x)\ln(1 + x)x−x22+x33−⋯x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots−1<x≤1-1 < x \le 1
(1+x)a(1 + x)^a1+ax+a(a−1)2x2+⋯1 + ax + \frac{a(a - 1)}{2}x^2 + \cdots∣x∣<1\lvert x \rvert < 1
1+x\sqrt{1 + x}1+x2−x28+x316−⋯1 + \frac{x}{2} - \frac{x^2}{8} + \frac{x^3}{16} - \cdots∣x∣≤1\lvert x \rvert \le 1
11−x\frac{1}{1 - x}1+x+x2+⋯1 + x + x^2 + \cdots∣x∣<1\lvert x \rvert < 1
cos⁡x\cos x, sin⁡x\sin x1−x22+⋯1 - \frac{x^2}{2} + \cdots,  x−x36+⋯\ x - \frac{x^3}{6} + \cdotsall xx

1+x\sqrt{1 + x} is the case a=12a = \tfrac12 of the binomial series: 12⋅(−12)/2=−18\tfrac12 \cdot (-\tfrac12)/2 = -\tfrac18.

Error terms in practice

  • For an alternating series with terms shrinking in size (such as ln⁡(1+x)\ln(1 + x) or 1+x\sqrt{1 + x} for small x>0x > 0), the error is smaller than the first omitted term and has its sign.
  • For exe^x with x>0x > 0 every term is positive, so truncating always underestimates; the remainder is eξxn+1/(n+1)!e^{\xi}x^{n+1}/(n+1)! with ξ∈(0,x)\xi \in (0, x).
  • Rescale before expanding. 26\sqrt{26} is not "1+25\sqrt{1 + 25}"; it is 51+0.045\sqrt{1 + 0.04}. The expansion only works when the small quantity really is small.

Worked example

a square root to five figures

Estimate 26\sqrt{26} and bound the error.

Show solution

Factor out the nearest perfect square: 26=51+x\sqrt{26} = 5\sqrt{1 + x} with x=125=0.04x = \tfrac{1}{25} = 0.04. To second order,

5(1+x2−x28)=5(1+0.02−0.0002)=5.099.5\left(1 + \frac{x}{2} - \frac{x^2}{8}\right) = 5(1 + 0.02 - 0.0002) = 5.099 .

The series alternates with shrinking terms, so the error is below the next term, 5⋅x316=5×0.000004=0.000025 \cdot \tfrac{x^3}{16} = 5 \times 0.000004 = 0.00002, and positive. So 5.099<26<5.099025.099 < \sqrt{26} < 5.09902. (True value: 5.09901955.0990195.)

The first-order answer 5.15.1 is already good to 0.0010.001, which is what most interviewers want; giving the second-order correction shows you know where the error is.

Large powers: go through the exponential

(1+x)n≈1+nx(1 + x)^n \approx 1 + nx only works when nxnx is small. When nn is large and xx is small but nxnx is not, write

(1+x)n=enln⁡(1+x)≈enx−nx2/2.(1 + x)^n = e^{n\ln(1 + x)} \approx e^{nx - nx^2/2} .

The classic case is (1−1/n)n≈e−1(1−12n)(1 - 1/n)^n \approx e^{-1}\left(1 - \tfrac{1}{2n}\right). With n=100n = 100 this gives 0.36600.3660, and the true value is 0.366030.36603. This is the probability that a specific one of nn items is never picked in nn uniform draws, so it appears all over probability questions.

Where this shows up in finance

Every "Greek" is a Taylor coefficient. A position worth V(S)V(S) changes by

ΔV≈Δ⋅ΔS+12Γ(ΔS)2,\Delta V \approx \Delta \cdot \Delta S + \tfrac12\Gamma(\Delta S)^2,

and a bond price by ΔP/P≈−D Δy+12C(Δy)2\Delta P/P \approx -D\,\Delta y + \tfrac12 C(\Delta y)^2 with modified duration DD and convexity CC. The first-order term is the hedge; the second-order term is what is left after hedging.

Worked example

two compounding estimates

Estimate (a) 1.02101.02^{10} to four decimal places and (b) 0.991000.99^{100} to three.

Show solution

(a) ln⁡1.02=0.02−0.0002+0.0000027=0.0198027\ln 1.02 = 0.02 - 0.0002 + 0.0000027 = 0.0198027, so 10ln⁡1.02=0.19802710\ln 1.02 = 0.198027. Then

e0.198027≈1+0.198027+0.019607+0.001294+0.000064=1.21899.e^{0.198027} \approx 1 + 0.198027 + 0.019607 + 0.001294 + 0.000064 = 1.21899 .

The true value is 1.2189941.218994. The first-order guess 1+10×0.02=1.21 + 10 \times 0.02 = 1.2 is off by almost 2%, because nx=0.2nx = 0.2 is not small; that is the binomial (102)(0.02)2=0.018\binom{10}{2}(0.02)^2 = 0.018 term it misses.

(b) ln⁡0.99=−0.01−0.00005=−0.01005\ln 0.99 = -0.01 - 0.00005 = -0.01005, so 0.99100=e−1.005=e−1e−0.005≈0.36788×0.995=0.36600.99^{100} = e^{-1.005} = e^{-1}e^{-0.005} \approx 0.36788 \times 0.995 = 0.3660. The true value is 0.366030.36603. Here 1+nx=01 + nx = 0 would be absurd, which is the clearest sign that you must go through the exponential.

Knowledge check

Which is the best estimate of ln⁡(1.05)\ln(1.05)?

Knowledge check

To five decimal places, what is the second-order Taylor estimate of 0.98\sqrt{0.98}?

Knowledge check

Approximately how large is the error when e0.1e^{0.1} is replaced by 1.11.1?

Key takeaways

  • The error of a truncated Taylor series is about the first omitted term; for alternating series it is bounded by it.
  • Rescale so the small quantity is genuinely small: 26=51.04\sqrt{26} = 5\sqrt{1.04}.
  • Know exe^x, ln⁡(1+x)\ln(1 + x), (1+x)a(1 + x)^a and 1+x\sqrt{1 + x} to second order without thinking.
  • For large powers use (1+x)n=enln⁡(1+x)(1 + x)^n = e^{n\ln(1 + x)}; 1+nx1 + nx fails once nxnx is not small.
  • Delta–gamma and duration–convexity are first- and second-order Taylor expansions.

Practice problems

Finished reading?

Answer the 3 knowledge checks to complete this lesson (0 done).