04Taylor Series & Convexity
Chapter 3 ended with a burial and a promise. We wrote (x+h)³ = x³ + 3x²h + 3xh² + h³ — at x = 2 with h = 0.1 that reads 9.261 = 8 + 1.2 + 0.06 + 0.001 — divided by h, and watched everything past the first term die into the graveyard. Those terms were never zero. We killed them by dividing, and we did it on purpose. This chapter goes back and digs them up. Because if you stop dividing, the corpses turn out to be information — and the first term everyone throws away, the curvature term ½f''(a)h², is the one this whole chapter is about. Here's the ending, said first, because the ending is the reason to walk the road. Near a point, a smooth function is a polynomial, and its coefficients are nothing but its own derivatives, sieved out one at a time. That's Taylor. Stack the derivatives Chapter 3 taught you to build, all of them, at a single point, and the function reassembles itself in your hands. Then comes the payoff you'll spend for the rest of the course. Wiggle a curved function symmetrically, to one side and the other, and average the two answers. The linear part cancels. The curved part survives, and it survives with a fixed sign that never washes out. So the average of a curved function is not the function of the average — it misses, always, by ½f''(a)h². That single fact is why Gamma costs money, why log-growth drifts down by σ²/2, and the whole content of Jensen's inequality before probability even exists. We'll build it with your own hands, and with your own $300.
Part 0 is the gap zone, and this chapter is where Chapter 3's machinery pays off. Chapter 3 built f', then fed it back in to get f'', and nothing stopped us doing it again. So stack them all. That stack, read at one point, is enough to rebuild the whole function nearby — which is Taylor — and the sign of its second term is convexity. Click any downstream node and watch the road run back to here.
Chapter 3 built f′, fed it back in to get f″, and never stopped. Stack all four rungs at one point and the polynomial snaps onto f right where it stands — that's Taylor, and the sign of its second rung is convexity.
So let's stop dividing, and read the derivative's own definition forwards for once.
01The graveyard, reopened
Chapter 3 gave us the derivative as a rate: how fast is f changing right here. This chapter needs it as something else — a predictor. Where will f be, a hair to the right of where I'm standing? Those sound like different questions, but they're the same sentence read two ways, and the switch is the whole trick.
Here's the definition, unchanged from last chapter: f'(a) = limh→0 [f(a+h) − f(a)] / h. Read the words. It says that for small h, the fraction on the right is close to f'(a). And "close to" is a thing we can rearrange. Multiply through and you get a fortune-teller: f(a+h) ≈ f(a) + f'(a)h. Where you'll be equals where you are, plus your slope times how far you walked. At the anchor a = 1 on x², a step of h = 0.1 predicts 1.2 while the truth is 1.21.
But notice what just happened to the equals sign. It stopped being an equals sign. Somewhere in that rearrangement a real thing got traded away, and almost no book says what. So let's do it in slow motion and point at the exact instant the ≈ is born.
lim and the = becomes ≈: that deletion is the trade, and the chip is its receipt. Line 3 multiplies both sides by h (h≠0). Line 4 is the fortune-teller: f(a+h) ≈ f(a) + f′(a)h. Now drag h — the gold tangent races ahead of the blue curve f(x)=x², and the red gap, exactly h², opens wider the further you walk from the anchor. Tap why h²? and the reason shows itself: (1+h)² = 1 + 2h + h², the tangent keeps 1 + 2h and throws away exactly one term, h² — the dropped term is the gap.There it is, one line at a time. Line one is an exact equals sign, ours since Chapter 3. Line two drops the lim and accepts a small, non-zero h. That is the trade, and the ≈ is the receipt for it. We gave up the limit and got back a working formula. Everything else in this chapter is us measuring, exactly, what that receipt cost.
And name the two letters now, before they can start swapping jobs on you. a is the anchor — the place you're standing and know everything about. h is the knob — how far you're walking away from it. For this entire chapter, a is frozen and h is the only thing that moves. Every confusion in Taylor is these two letters trading places, so we nail them down here and we will not write x − a until the very end. The last beat of the stepper lets you grab the knob and drive it: close to the anchor the straight-line guess is nearly perfect, and as you walk h outward it drifts off the true curve. That drift is the whole subject. It has a name and a size, and we're going to measure both.
02The invoice: measuring the error
We bought that ≈ on credit. Now read the invoice. Define the error honestly, with no hoping: E₁(h) = f(a+h) − [f(a) + f'(a)h]. That's just the truth minus the straight-line guess. Two facts fall out of it, and the second one is the whole chapter.
The first fact is that E₁(h)/h → 0. And that isn't luck or hope. Unpack that statement and it is the definition of f'(a), rearranged. So the tangent isn't a good guess by accident. Being the one straight line whose error dies faster than h is literally what the word derivative means.
The second fact is the crack we prise the chapter open with. Dying faster than h is not the same as dying. The error doesn't just shrink — it shrinks like h². Halve the step and the error quarters. And "error" here is not a wart or a failure; it's an object with a shape, and a thing with a shape can be measured. So let's measure it, because this must be seen, not asserted.
Start with f(x) = x² at the anchor a = 1. The tangent guess is 1 + 2h, the truth is 1 + 2h + h², so the error is exactly h² — the graveyard term from Chapter 3, sitting there intact because this time we never divided it away. At h = 0.1 the error is 0.01; halve to h = 0.05 and it's 0.0025; halve again and it's 0.000625. Halve, quarter. Halve, quarter. The ratio of 4 in that last column is the fingerprint of a squared term, and you're reading it off the screen yourself.
Then kill the "that's just a polynomial trick" objection. Switch the function to √x, where nothing cancels cleanly, and then to eˣ, and the ratio still marches toward 4 as you shrink the step. The error is not noise and not our failing. It is second-order — h²-sized — and now that we know its size, we can go and get it.
Here's the one line that earns the first fact, and it takes no new machinery. Take the ≈ we bought, subtract its two sides, and name the leftover E₁. Divide that leftover by h and you are staring at Chapter 3's difference quotient minus f'(a) — which goes to zero by the definition of the derivative and nothing else.
So the tangent line is earned, not asserted. It is the unique straight line whose error is second-order. And that hands us the next move: if the leftover is h²-shaped, we can add an h² term and cancel it.
03★ The coefficient machine
Don't guess with a line — guess with a polynomial. Write p(h) = c₀ + c₁h + c₂h² + c₃h³ + … and choose the c's so that p agrees with f at the anchor in value, and slope, and curvature, and every higher derivative we care to match. Then ask the only real question. Given f, what are the c's?
Concrete before the name. Take p(h) = c₀ + c₁h + c₂h² + c₃h³ and just do it, one row at a time, greying out each term as it dies.
h that knife 2 hasn't killed yetk·(k−1)···1 it sheds on the way = k!p(h)=c₀+c₁h+c₂h²+c₃h³ one at a time: differentiating k times kills every term below it, and setting h=0 kills every term still carrying an h above it, so exactly one term survives both cuts. Predict the next multiplier before it reveals — it's 24 = 4×3×2, no coincidence. Drag k as high as you like and the countdown always lands on k!, because that's exactly what h^k has left after k knife-1 passes. Assemble it and you own c_k = f⁽ᵏ⁾(a)/k! for every function, every order — and T₁ is the same tangent line you met in Fig. 2.Watch the countdown fall out. Set h = 0 and p(0) = c₀. Differentiate once and set h = 0: p'(0) = c₁. Differentiate again: p''(0) = 2c₂ — there's the 2, and it came from the power rule, visibly. Once more: p'''(0) = 6c₃, and you can see it was 3 × 2. The next one is 24, which is 4 × 3 × 2. That product has a name you've had since Chapter 1.
The whole thing is two knives. Knife one: differentiate k times, and every term with a power below k is annihilated. Knife two: set h = 0, and every term with a power above k still has an h clinging to it, so it vanishes too. Exactly one term survives both — the k-th. And on its way through knife one, h^k gets differentiated k times, shedding the countdown k·(k−1)···1, which is k!. So p^(k)(0) = k!·c_k, which gives
c_k = f^(k)(a) / k!
The factorial was never a normaliser somebody chose to make the formula tidy. It is the debris that h^k sheds passing through k derivatives. That's the single most-printed, least-derived symbol in the topic, and now you've watched it hit the floor. One honesty note, because it's a fair objection: matching derivatives at one point is a bet that the polynomial will track f near that point. The derivative is the only local information there is, so it's the only thing we can use — but whether the bet pays off away from a is not yet claimed. That's what the remainder is for, and we'll settle it shortly.
Now the object has earned its name. The polynomial T_n(h) = f(a) + f'(a)h + ½f''(a)h² + … + f^(n)(a)/n!·hⁿ is the Taylor polynomial of order n at the anchor a. Run it on eˣ at a = 0: order two is 1 + h + h²/2, which at h = 0.1 gives 1.105 against a true 1.10517. When the anchor is 0, it gets its own name, Maclaurin — not a new idea, just Taylor with a = 0. And look at T₁: it's the tangent line from the start of the chapter. Taylor doesn't replace the tangent. The tangent was Taylor all along, truncated at order one. So n is a dial. Turn it up and the polynomial hugs f further and further out.
Turn the order up and watch a line become a parabola gripping the bend, become a fifth-order curve tracking sin x almost clear across the screen. Each term you add buys more reach. Now do the other thing, and drag the anchor along the curve.
The whole polynomial picks up its skirts and follows, always gripping tightest right where it stands and drifting off as you look further away. That word is local. Taylor doesn't approximate a function, it approximates a function near a place, and the place is a thing you chose. Only now, with the object understood, do we write the line the textbooks open with: h = x − a. That's "how far you walked" equals "where you are" minus "where you started." The famous (x−a)ⁿ form is a substitution you just performed, not an axiom handed down.
04One word, two objects
Time to settle the debt from the machine. The bet was that matching derivatives at a would make the polynomial track f near a. The receipt is the remainder: R_n(h) = f(a+h) − T_n(h). It's just truth minus guess, so it's defined, not hoped for, and it makes T_n(h) + R_n(h) = f(a+h) an exact equation. Nothing is approximate. We simply have a term we haven't evaluated, and it's small in the way we learned to measure: roughly f^(n+1)(a)/(n+1)! · h^(n+1). Keeping two terms of eˣ at a = 0, a step of h = 0.1 leaves 0.001/6 ≈ 0.00017, and the true miss, 1.10517 − 1.105, is 0.00017. Every term you keep buys one more power of h of accuracy.
Now the honesty that this section exists for. The word Taylor is worn by two different objects. A Taylor approximation is finite: n terms plus a remainder you can bound. Always honest, always local, and the only one quants ever use. A Taylor series is what happens if you let n → ∞: an infinite series, which, as Chapter 2 taught us, means a limit of partial sums — and limits are allowed to not exist. One word, two objects, and the collision does real damage. So let's defuse it, starting with a shock you already own the answer to.
Run the machine on f(x) = 1/(1−x) at a = 0. Every derivative works out to n!, so c_n = n!/n! = 1, and the Taylor series is 1 + x + x² + …. You have held this before. It's Chapter 2's geometric series. And Chapter 2 didn't hand it over naked — it came with a warranty, |r| < 1. So "radius of convergence" is not a new terror. It's the warranty sticker you've had on this exact series since Chapter 2, now with a name on it. At x = 0.5 the series is happy and sums to 2. At x = 2 it's gibberish, even though the function itself is a perfectly well-behaved −1. The series isn't broken there. It's out of warranty.
Now the deepest crack, the one first courses hide because it's "advanced." Which is exactly why you should see it.
Take f(x) = eˣ^(−1/x²), with f(0) = 0. It is perfectly smooth, and every single one of its derivatives at 0 is zero. So its Taylor series is 0 + 0 + 0 + …. That series converges everywhere — and it equals the function at exactly one point, the origin. The function isn't zero. It just tiptoed away from the origin so quietly that no derivative there heard it leave. This is precisely why we work with n terms plus a remainder, and not with infinite series. A remainder is a receipt you can read. An infinite series is a promise you have to verify. Quants take receipts.
05Three expansions you already own
Now run the machine three times and walk away owning the only three expansions this course will ever ask you for. It's the same three moves every time — list the derivatives at the anchor, divide by k!, stack. What you remember is the rhythm, not a boxed table.
First, eˣ at a = 0. Every derivative of eˣ is eˣ, so every f^(k)(0) = 1, so c_k = 1/k!, and eˣ = 1 + x + x²/2! + x³/3! + …. Look carefully: it is exactly the series Chapter 2 handed us with an asterisk. Back then, getting it that way meant swapping a limit past an infinite sum — a licence we didn't have. We just got the same answer by a route that swaps nothing. The asterisk comes off. Second, ln(1+x): its derivatives at 0 run 1, −1, 2, −6, …, and dividing by k! gives ln(1+x) = x − x²/2 + x³/3 − x⁴/4 + …. Pocket x − x²/2 specifically — at x = 0.1 it gives 0.1 − 0.005 = 0.095, against a true ln(1.1) of 0.0953. In Chapter 5 that expression explains why nobody on a desk quotes plain returns, and in Chapter 26 the −½ walks in wearing that exact face. The alternating signs aren't arbitrary — they're the chain rule chewing on 1/(1+x).
Third, the binomial. This one is a gift, because Chapter 1's binomial theorem turns out to have been a lucky special case.
cₖ = α(α−1)···(α−k+1)/k! is the exact machine that built Chapter 1's C(n,k) — an integer α just happens to zero one factor, and the series quietly stops. That stop was never a rule of the binomial theorem, only an accident of which α you fed it. Dial α=½ or α=−1 and no factor is ever zero, so the same machine keeps handing out terms forever — the binomial theorem, unshackled.
For (1+x)^α the machine gives c_k = α(α−1)···(α−k+1)/k!. If α is a positive integer, those coefficients are Chapter 1's C(n,k), and the series terminates — the binomial theorem is a Taylor series that happens to stop. Set α = 3 and watch C(3,k) fall out and the series die after four terms. But set α = 1/2, or −1, and it never stops. Taylor has just handed you a binomial theorem for the fractional and negative powers Chapter 1 couldn't touch. And the first two terms, (1+x)^α ≈ 1 + αx, are the linear approximation you'll reach for constantly. With α = ½ and x = 0.04 that reads √1.04 ≈ 1 + 0.02 = 1.02, against a true 1.0198. I don't remember these three. I rebuild them, and it's faster than remembering.
06★ The survivor — the keystone
We've been treating the h² term as a correction — an accuracy nicety, a better hug. It is not. It is a different kind of thing, and one asymmetry proves it. Wiggle the input symmetrically: go to a+h and to a−h, and average the two results.
Stack the two Taylor lines and read them term by term. On top, f(a+h) = f(a) + f'(a)h + ½f''(a)h² + …. Below it, f(a−h) = f(a) − f'(a)h + ½f''(a)h² − …. The linear term shows up once with a plus and once with a minus, so it annihilates. The quadratic term shows up twice with the same sign — because h² doesn't care that h went negative — so it survives, at double strength. On x² at a = 1 with h = 0.1 the sides give 1.21 and 0.81, averaging 1.01 — a hundredth above f(1) = 1.
Read that slowly, because it is the chapter. The average of a curved function is not the function of the average. It misses, always, by ½f''(a)h². Odd terms cancel under a symmetric wiggle. Even terms accumulate. Curvature is the part of a function that averaging cannot wash out. And the widget just took your $300 to prove it: you bought $150 of a stock at $50 and $150 at $150, the average price was $100, and your actual cost per share came out to $75 — $25 better than the average, with no forecast, no edge, no skill. The shares-per-dollar function 1/S is convex, so the survivor term is positive, so you got more shares per dollar than the average price predicted. Not luck. Arithmetic that could not have come out any other way.
Keep this sentence for the rest of the course. Your gut computed the first-order term and stopped. It isn't wrong about the world — it is a Taylor series truncated at order one. The $25 was sitting in the term it threw away. Every single thing downstream that looks like free money hiding in plain sight — Gamma, the −σ²/2, Jensen, the volatility drag — is this exact term, and you've now met it with your own hands.
07Convexity: a global promise from a local sign
That surviving term deserves its name, and now the name costs nothing, because you've felt the thing. When f'' ≥ 0 — when the gap comes out positive, when averaging hands you more than you predicted — the function is convex. When f'' ≤ 0 it's concave, and the gap runs against you.
One honest warning about the word. In everyday English, and in the optics most of us met first, "convex" means bulging out, like a lens or the back of a spoon. A hill looks convex to the eye. It is concave. The everyday word points the wrong way, and we can't fix mathematics, so use the cup instead: convex holds water. y = x² is a cup — pour water in and it stays. Concave spills. That anchor maps to the sign correctly every time. And here's the single picture that holds every version of the word at once: a convex curve is sandwiched. It lies above every one of its tangent lines, and below every one of its chords. The tangent-below is the local view — stand anywhere, look along your slope, and you always underestimate. The chord-above is the averaging view — it's the keystone gap, drawn as a line. Two inequalities, one shape.
But I've now told you f'' ≥ 0 and drawn you a sandwich, and I have not shown you those are the same statement. One is about a single point. The other is about the whole curve. That's a real gap, and I'm not going to step over it. So let's pay it, with nothing but Chapter 3.
Two moves. First: f'' ≥ 0 says the rate of f' is never negative, and by Chapter 3's Mean Value Theorem, a function whose rate is never negative can never come down. So f' is non-decreasing — the slope only ever turns left. Second, the whole proof in one picture: by the Fundamental Theorem, f(y) − f(a) = ∫ₐ^y f'(t) dt, so the change in f is the area under its own slope graph. Now compare two areas. The true one, under the rising f'. And the tangent's one, under a flat line at height f'(a) — because walking in a straight line means pretending your slope never changed. For every t past a, f'(t) ≥ f'(a), so the real area beats the rectangle: ∫ₐ^y f'(t)dt ≥ f'(a)(y−a). Therefore f(y) ≥ f(a) + f'(a)(y−a). The curve sits above its tangent. On x² from a = 1 out to y = 2 the curve delivers 4 where the tangent promised only 1 + 2×1 = 3. Done, and the shaded gap you dragged open upstairs is the extra area downstairs — no remainder theorem in fancy dress, no "it can be shown."
That's the moment a local sign became a global guarantee. "Global guarantee" is precisely why optimisers, risk managers and option traders all reach for this one word. Now the other half of the sandwich falls out for free, in two lines.
Pick any two points a and b, and any blend z = λa + (1−λ)b between them, with λ a weight between 0 and 1. Tangent-below at z, aimed once at a and once at b, gives two inequalities. Multiply the first by λ and the second by 1−λ — both non-negative, so both survive — and add. The derivative terms collect into f'(z)·[λa + (1−λ)b − z], and that bracket is z − z = 0. It vanishes, leaving λf(a) + (1−λ)f(b) ≥ f(λa + (1−λ)b). The chord is above the curve. Take x² with a = 1, b = 3 and λ = ½: the chord gives ½×1 + ½×9 = 5, the curve at the midpoint gives 4, and 5 ≥ 4. So there is one definition here — the local sign f'' ≥ 0 — and everything else is a consequence we derived. Not four facts. One fact, two theorems, one picture. Hold this lightly, as a promise: in Chapter 11 those weights λ and 1−λ get renamed probabilities, and this exact inequality becomes Jensen's inequality, E[f(X)] ≥ f(E[X]), with not one symbol of the algebra changed. You'll just be renaming λ.
08Flat spots, and what a quant means by "order"
A rule you were probably taught years ago as a spell turns out to be a one-line corollary of everything above. At a stationary point, where f'(a) = 0, the linear term of the Taylor polynomial is gone, so f(a+h) = f(a) + ½f''(a)h² + …. The first-order story has nothing to say, so the second-order term is the entire story, and its sign decides the verdict alone. If f''(a) > 0, every direction you step sends h² positive and f up — a local minimum. If f''(a) < 0, every step goes down — a local maximum. On x² at a = 0, where f'' = 2, a step of h = 0.1 either way lifts you by 0.01. That's the second-derivative test, and it isn't a rule to memorise. It's Taylor's second term, standing alone because the first one left.
But the test can honestly run out of information, and here's the case that proves it. Three curves pass through the origin with f'(0) = 0: x², x³, x⁴. Your gut says the test decides all three. It doesn't. Both x³ and x⁴ have f''(0) = 0, so the test returns the same non-answer for a curve with a minimum there and a curve without one. It isn't broken — it's telling you the truth, which is that the h² term is empty and you must go read the next term in the series. Which you can, because you own the series.
Now the bigger one, the slide almost no calculus course names out loud. Everything so far has been local. Setting f' = 0 finds a flat spot, not a minimum.
Drop a marble in a cup and it finds the same bottom no matter where you release it. Drop it on a mountain range and it finds a different bottom depending on where it started, and it will never know a deeper valley sits two ridges over. What makes a flat spot the minimum is a global property: convexity. If f is convex everywhere, tangent-below hands you f(y) ≥ f(a) + f'(a)(y−a) for every y, and at a stationary point that second term is 0, so f(y) ≥ f(a) for every y in the world. Not a local minimum. THE minimum. That's what turns "I found a flat spot" into "I found the answer," and it's exactly why one word keeps reappearing in Chapter 8's gradient descent, Chapter 22's loss surfaces and Chapter 30's efficient frontier.
One last thing, and it's a decoder ring. Quants say "to first order" and "second-order effects" constantly, and it isn't vague hedging — it's this chapter, spoken aloud.
That's all "to first order" and "second-order effects" have ever meant — this chapter's own vocabulary, said out loud on a trading floor.
f(x)=eʰ at anchor a=0, so f(a)=f′(a)=f″(a)=1. "To first order" is the violet tangent T₁=1+h — the h²-and-up gap thrown away on purpose. "Second-order effect" is the gold gap between T₁ and the parabola T₂ — exactly ½h². Drag h: near the anchor the three dots sit on top of each other and the gold bar is a sliver; keep dragging and the meter shows why — the first-order term only grows like h, the second-order term grows like h², and at h=2 the race is a dead heat. Past it, "second-order" is no longer the small correction — it's the story."To first order" means: I kept f(a) + f'(a)h and I know I threw away something h²-sized. "Second-order effects" means: the term I threw away, small until it isn't. That's all those phrases have ever meant. So when the last formula of this chapter arrives, you won't be learning it. You'll be recognising it.
Δ·ΔS drifts off V, and the gold gap it's missing is ½Γ·ΔS² — §3's f″(a)/2! wearing a Greek costume.When you eventually meet a thing called V whose value depends on a price S, and you see the market's own working written as ΔV ≈ Δ·ΔS + ½Γ·(ΔS)² — you are looking at T₂. Nothing else. Delta is the first Taylor coefficient, dV/dS. Gamma is the second derivative, and the ½ in front of it is the 1/2! off the coefficient machine — the debris h² sheds. With a Delta of 0.5, a Gamma of 0.02 and a $2 move, that reads 0.5×2 + ½×0.02×4 = 1 + 0.04 = $1.04 — a dollar from Delta, four cents from Gamma. I'm not teaching you options today, and I'm not pretending you can price one. But when Chapter 28 hands you the Greeks and calls them "the Taylor expansion of the option price," that sentence will be literally true, and you'll already own every symbol in it. Three seeds are now planted: ln(1+x) ≈ x − x²/2 is why Chapter 5 says nobody quotes plain returns; the ½f''h² gap is where Chapter 26's −σ²/2 drift comes from, because the logarithm is concave; and the weights λ, 1−λ are Chapter 11's Jensen, waiting.
Chapter 3 buried the h² term and told you someone would climb out of the graveyard. This was them. And the road out leads straight to the one function equal to its own derivative — eˣ, where Taylor and continuous growth meet. That's the language money is written in, and it's Chapter 5. In Chapter 26 you'll meet a wiggle so violent that its square refuses to die even after you divide by h — and that one exception is where the whole of modern finance comes from.