Applied Mathematics · Section 3
Taylor Series
From a single point and a stack of derivatives to the whole curve — and how to catch it in a lie.
Here is one of the most audacious ideas in all of mathematics, and once you see it you can't unsee it: a smooth function is completely pinned down by what it's doing at a single point. Stand at one spot on a curve and write down its height, its slope, the rate the slope is changing, and the rate that is changing — keep going, derivative after derivative — and you have, locked in your hand, enough information to redraw the entire curve far away from where you're standing. That's the Taylor series, and it's the master machine of this whole book: every series we've met and every one we're about to meet is a special case of it. It's how your calculator finds a sine it was never told, why every pendulum and every bond and every bridge behaves like a simple spring when you nudge it gently, and how a learning machine knows which way is downhill. One point, a tower of derivatives, the whole function. The last chapter names the pattern; the one before it shows you the smooth functions sneaky enough to defeat it.
Chapter One — Theory
1. The Idea — Matching Derivatives
Let's build it up the way you'd actually discover it. Suppose you want to imitate some function $f$ near a point — call it $a$ — using nothing but a polynomial, because polynomials are the only things we really know how to compute (add and multiply, that's all a machine can do). How good an imitation can you make?
Match the height. The crudest copy is a flat line at the right level: $f(a)$. It agrees at $a$ and nowhere else. One point of contact.
Match the slope too. Better: tilt your line so it leaves $a$ heading the same direction the curve does. That's the tangent line, $f(a) + f'(a)(x-a)$ — and you've felt this one already; it's the linear approximation that ran the whole binomial section. Two things matched now: height and heading.
Match the bend. But the curve is curving, and a straight line isn't. So add a parabola that bends at exactly the curve's rate — that rate is the second derivative $f''(a)$. Keep the height, keep the slope, now match the curvature:
Do you see the program? Each new derivative you match buys you one more order of agreement — the copy clings to the original over a wider and wider stretch. Match all of them, infinitely many, and the polynomial stops being an imitation and becomes the function itself. That's the leap.
Chapter Two — Theory
2. The Formula — and Why the Factorial
Now let's nail down the coefficient on each power. Write the candidate polynomial as $\sum c_k (x-a)^k$ and ask: what must $c_k$ be so that the $k$-th derivative comes out right at $a$? Here's the slick part. Differentiate $(x-a)^k$ a total of $k$ times and set $x=a$: every term but one dies, and the survivor is $k!$. So when you take $k$ derivatives of the whole polynomial and stand at $a$, only the $c_k$ term lives, and it gives $c_k \cdot k!$. Matching that to $f^{(k)}(a)$ forces
That's where the factorial comes from — it's not decoration, it's the exact thing needed to undo the $k!$ that differentiation piles up. Put it together and you have the whole machine:
When you expand around $a=0$ — which is most of the time — it gets its own name, the Maclaurin series:
The greatest hits, in three lines
Turn the crank on a few famous functions and out fall the series the rest of this book is made of. For $e^x$, every derivative is $e^x$, worth $1$ at $0$:
And here's the unification I promised. The binomial series of Section 2 is just the Taylor series of $(1+x)^\alpha$. The geometric series of Section 1 is the Taylor series of $\frac{1}{1-x}$. The exponential and logarithm coming up in Sections 4 and 5 are Taylor series too. They were never separate ideas. They're all this one machine, fed different functions.
Chapter Three — Theory
3. How Good Is It? — The Remainder
In real life you never sum infinitely many terms — you stop somewhere, at degree $n$, and live with the leftover. The honest question is: how big is the leftover? And Taylor's theorem answers it with startling precision. If you cut off after the $x^n$ term, the entire error is captured by a single next-order term, evaluated at some mystery point $\xi$ between $a$ and $x$:
Look hard at this, because it tells you everything about when Taylor works. The error carries a factor $(x-a)^{n+1}$ — so the closer you stay to $a$ and the more terms $n$ you keep, the more brutally the error is crushed. And it carries a $\frac{1}{(n+1)!}$ — and factorials grow faster than anything, so for the well-behaved functions ($\sin$, $\cos$, $e^x$) the error collapses to zero almost embarrassingly fast.
Two warnings live in here too. First: the error depends on a high derivative $f^{(n+1)}$, so if your function has wild derivatives, the polynomial can be poor even close by. Second: the $(x-a)^{n+1}$ factor is a friend only when $|x-a|$ is small — march too far from $a$ and that factor turns on you, which is exactly the radius of convergence we'll see bite in the breakdown chapter. The remainder isn't fine print. It's the instrument that tells you how far you can trust the copy.
Chapter Four — Theory
4. The Toolkit
The Maclaurin series worth knowing cold. Each is the master machine applied to one function — and each one earns its keep in the applications below.
| Function | Series about 0 | Converges for |
|---|---|---|
| $e^x$ | $1+x+\tfrac{x^2}{2!}+\tfrac{x^3}{3!}+\cdots$ | all $x$ |
| $\sin x$ | $x-\tfrac{x^3}{3!}+\tfrac{x^5}{5!}-\cdots$ | all $x$ |
| $\cos x$ | $1-\tfrac{x^2}{2!}+\tfrac{x^4}{4!}-\cdots$ | all $x$ |
| $\ln(1+x)$ | $x-\tfrac{x^2}{2}+\tfrac{x^3}{3}-\cdots$ | $-1<x\le1$ |
| $(1+x)^\alpha$ | $1+\alpha x+\tfrac{\alpha(\alpha-1)}{2}x^2+\cdots$ | $|x|<1$ |
| $\dfrac{1}{1-x}$ | $1+x+x^2+x^3+\cdots$ | $|x|<1$ |
Chapter Five — Applications
5. Real-World Applications
The fingerprint to watch for: a hard function replaced, near a point, by the first few terms of its polynomial twin. Sometimes you keep one term, sometimes three — the remainder tells you how many — but it's always the same trade: exactness for arithmetic you can actually do.
How does a chip compute $\sin(37°)$ when it only knows $+$ and $\times$?
The problem. A processor has no "sine" organ inside it. It can add, multiply, and that's essentially all. Yet you ask it for $\sin$, $\cos$, $e^x$, $\ln$ a billion times a second and it answers instantly. How?
The move. It evaluates the Taylor polynomial. To get $\sin x$ for $x$ in radians, sum $x-\frac{x^3}{6}+\frac{x^5}{120}-\cdots$, a handful of multiplies and adds. Because the remainder shrinks like $\frac{x^{n+1}}{(n+1)!}$, just a few terms nail full machine precision for small $x$.
Why it's load-bearing. The real implementations add two tricks the series hands them: range reduction (use $\sin$'s periodicity to fold any angle into a small interval where the series converges fastest — the same "make $x$ small first" move as the binomial root), and a few tuned coefficients (minimax polynomials) that squeeze the error flat across the interval. But the skeleton is pure Taylor. Every transcendental function in every math library, every calculator, every GPU, is a polynomial standing in for the real thing.
Why does almost everything behave like a spring when you nudge it?
The problem. A pendulum, a guitar string, a molecule's bond, an atom in a crystal, a ship rolling at anchor — wildly different objects, yet all of them oscillate, and at small amplitude they all obey the same simple law. Why should the universe be so repetitive?
The move. Take any potential energy $V(x)$ with a stable minimum at $x_0$ and Taylor-expand it there. The constant term is just a reference level; the linear term vanishes because the slope is zero at a minimum (that's what "minimum" means); so the first thing that survives is the quadratic:
The punchline. That is the energy of a spring, $\frac12 k x^2$, with stiffness $k=V''(x_0)$. So every smooth potential, viewed up close near its bottom, is a parabola — and a parabola means simple harmonic motion, a perfect sinusoid. This is why the simple-harmonic-oscillator is the most important toy in physics: it's not that everything is a spring, it's that the second Taylor term of everything is. Quantum field theory itself starts here — particles are the small oscillations of fields about their minimum.
How do you solve a differential equation a computer can't integrate?
The problem. Most differential equations — weather, orbits, chemical kinetics — have no formula for the answer. You can only step forward in time numerically. But how do you take a step into a future you don't have a formula for?
The move. Taylor tells you where you'll be a small step $h$ later, using only what you know now: $y(t+h)\approx y(t)+h\,y'(t)+\frac{h^2}{2}y''(t)+\cdots$. Keep one term and you have Euler's method; keep more, or sample cleverly, and you have Runge–Kutta — the workhorses of every simulation on Earth.
Why the remainder is the whole game. The error you make per step is the first dropped term, of size $\sim h^2$. Halve the step and you quarter the error — that exact scaling, read straight off the Taylor remainder, is what lets engineers trade compute time for accuracy with their eyes open. "Second-order accurate," "fourth-order accurate" — those phrases are just counting how many Taylor terms the method respects.
How does a learning machine know which way is downhill?
The problem. Training a model means minimizing a loss over millions of parameters. You can't see the whole landscape — you can only feel the ground right under your feet. How do you decide where to step?
The move. Taylor-expand the loss around where you stand. The first-order term, the gradient, points uphill — so step the other way: that's gradient descent. Keep the second-order term too — the curvature, the Hessian — and you can jump straight toward the bottom of the local parabola: that's Newton's method.
The punchline. Every optimizer behind modern AI is a strategy for using one or two Taylor terms of a landscape it can never fully see. First-order methods are cheap and everywhere; second-order methods converge in spectacularly few steps when you can afford the curvature. The whole field is an argument about how many Taylor terms are worth their cost.
How precisely does an error in the input become an error in the output?
The problem. You feed a measured quantity $x$, uncertain by $\Delta x$, through some function $f$. How uncertain is the result $f(x)$ — and which inputs is your answer most sensitive to?
The move. The first Taylor term answers it on sight: $\Delta f \approx f'(x)\,\Delta x$. The derivative is the amplification factor. Several inputs? Sum their first-order contributions in quadrature. This is the entire foundation of error propagation across every experimental science.
Why it matters. It tells you where to spend your money: the input with the biggest $f'$ is the one worth measuring more carefully. And when $f'$ happens to vanish — a "sweet spot" where the output is insensitive to wobble — you've found a design that's robust by construction. Engineers hunt for those flat spots precisely because the first Taylor term goes quiet there.
How do you steer a wildly nonlinear system?
The problem. A rocket, a power grid, a chemical reactor — the equations governing them are ferociously nonlinear, and nonlinear systems are hard to analyze and harder to control. Yet we fly rockets and run grids reliably. How?
The move. Linearize. Pick the operating point you care about — cruising altitude, nominal load — and Taylor-expand the dynamics there, keeping only the first-order term. The fearsome nonlinear system becomes a linear one, valid in a neighborhood, and linear systems we understand completely: stability, response, optimal control, all solvable.
Why it's load-bearing. Nearly all of classical control engineering operates on the first Taylor term of reality. The autopilot holding your plane level, the cruise control in your car, the regulator keeping the grid at 50 Hz — each governs a linearized model that's only honest near the operating point. The art is knowing how big a neighborhood the remainder lets you trust before you must re-linearize somewhere new.
Interactive — Practice
▸ Interactive Lab
Play with the master machine directly. Crank the degree and watch a polynomial reach out from a single point to swallow a whole sine wave; slide the center and watch the zone of agreement travel with it. Then see the same idea steer Newton's method and bring a pendulum to heel. Keyboard: focus a slider and use the arrows; Home and End jump to the ends.
Each problem from the book, made live. Drag its slider; the dashed line is the exact truth, and the bars or curves are what a few Taylor terms deliver.
Chapter Six — Practice
6. Word Problems
None of these say "Taylor." Your job is to spot the hard function, decide where to plant your point $a$, decide how many terms the accuracy demands — the remainder is your guide — and compute.
You must evaluate $\cos(0.2)$ by hand to six decimal places.
(a) How many terms of the Maclaurin series do you need? (b) Give the answer.
A pendulum is released from $\theta_0 = 20°$. Its true period is longer than the textbook $T_0=2\pi\sqrt{L/g}$ by the correction $T\approx T_0\left(1+\tfrac{\theta_0^2}{16}\right)$, with $\theta_0$ in radians.
(a) By what percentage is the real period longer? (b) A grandfather clock calibrated for tiny swings runs at $20°$ — does it gain or lose time, and how much per day?
You solve $y'=y$, $y(0)=1$, with Euler's method to estimate $y(1)=e\approx2.71828$, using step $h=0.25$.
(a) What value does Euler give? (b) Roughly how does the error change if you halve $h$ to $0.125$?
Evaluate $\displaystyle\lim_{x\to0}\frac{\sin x - x}{x^3}$ without L'Hôpital.
A signal's power is $P = V^2/R$. The voltage $V=5.00$ V is measured with an uncertainty of $\pm0.05$ V; $R$ is exact.
(a) Use the first Taylor term to find the uncertainty in $P$ as a percentage. (b) Why is the percentage uncertainty in power double that in voltage?
You minimize $f(x)=x^4-3x^2+x$ and want Newton's method to take its first step from $x_0=1$.
(a) Write the second-order Taylor model of $f$ about $x_0$. (b) Where does Newton step to (the minimum of that parabola)?
Solutions
Problem 1 — cos(0.2). Terms: $1$, $-\tfrac{0.2^2}{2}=-0.02$, $+\tfrac{0.2^4}{24}=+6.67\times10^{-5}$, $-\tfrac{0.2^6}{720}=-8.9\times10^{-8}$. (a) The fourth term is already below $10^{-6}$, so three terms suffice. (b) $1-0.02+0.0000667=\mathbf{0.980067}$ (true value $0.9800666$).
What breaks this? The "drop one term" error bound is a gift of the alternating series. For $e^x$, whose terms are all positive, you must bound the tail differently — the remainder doesn't politely cap itself at the next term.
Problem 2 — Pendulum. $\theta_0=20°=0.349$ rad, so $\theta_0^2/16=0.00761$. (a) The period is about 0.76% longer. (b) Longer period → slower → the clock loses time: $0.76\%$ of $86{,}400$ s $\approx \mathbf{657}$ s, nearly 11 minutes a day. (This is exactly why real pendulum clocks keep their swing tiny.)
What breaks this? At large amplitude the single $\theta_0^2/16$ term isn't enough — you need the next correction $\tfrac{11}{3072}\theta_0^4$, and near $180°$ the whole series surrenders and the period heads for infinity. (See Probe 4.)
Problem 3 — Euler. With $h=0.25$, $y(1)=(1+0.25)^4=1.25^4=\mathbf{2.4414}$ — about 10% below $e$. (b) Euler is first-order: error $\propto h$. Halving $h$ to $0.125$ roughly halves the error (to $(1.125)^8=2.566$, now ~5.6% low). To gain a decimal you pay with ten times the steps.
What breaks this? Euler keeps only one Taylor term, so it's crude and, for stiff equations, can go unstable as $h$ grows. The cure is to respect more Taylor terms — that's precisely what Runge–Kutta does.
Problem 4 — Limit. $\sin x = x-\tfrac{x^3}{6}+\tfrac{x^5}{120}-\cdots$, so $\sin x - x = -\tfrac{x^3}{6}+\tfrac{x^5}{120}-\cdots$. Divide by $x^3$: $-\tfrac{1}{6}+\tfrac{x^2}{120}-\cdots$, and as $x\to0$ the limit is $\mathbf{-\tfrac{1}{6}}$. No L'Hôpital, no fuss — the series just hands it over.
What breaks this? Nothing here — this is Taylor at its cleanest. The only trap is keeping too few terms: you must carry the series at least to the order that survives the division, here $x^3$.
Problem 5 — Power. $\tfrac{dP}{dV}=\tfrac{2V}{R}$, so $\Delta P\approx\tfrac{2V}{R}\Delta V$, giving $\tfrac{\Delta P}{P}=2\tfrac{\Delta V}{V}$. (a) $\tfrac{\Delta V}{V}=\tfrac{0.05}{5}=1\%$, so $\tfrac{\Delta P}{P}=\mathbf{2\%}$. (b) Because $P\propto V^2$ — the exponent 2 multiplies the relative error, the same "errors scale with the power" rule from the binomial section.
What breaks this? First-order propagation assumes the uncertainty is small enough that curvature ($P''$) doesn't matter. For a 1% wobble it's perfect; for a 50% wobble you'd need the second Taylor term, and the symmetric $\pm$ error would skew.
Problem 6 — Newton step. $f'(x)=4x^3-6x+1$, $f''(x)=12x^2-6$. At $x_0=1$: $f'=-1$, $f''=6$. (a) The quadratic model is $f(1)+f'(1)(x-1)+\tfrac{f''(1)}{2}(x-1)^2=-1-(x-1)+3(x-1)^2$. (b) Newton steps to $x_0-\tfrac{f'}{f''}=1-\tfrac{-1}{6}=\mathbf{1.1\overline{6}}$.
What breaks this? Newton trusts the local parabola completely. If $f''<0$ (you're near a maximum, not a minimum) it'll happily step uphill, and far from a root it can overshoot wildly. The second Taylor term is powerful but only locally honest.
Chapter Six·c — Practice
6c. When the Model Breaks
The master machine makes three quiet promises, and every clean answer above leaned on them. The skill is feeling the moment one gives way:
- You stay within the radius of convergence — close enough to $a$ that the series actually adds up to the function.
- You keep enough terms — the remainder is genuinely small for the accuracy you need.
- The function is analytic — its derivatives at $a$ actually know about the function elsewhere.
A student computes $\ln(3)$ from the series $\ln(1+x)=x-\tfrac{x^2}{2}+\cdots$ by setting $x=2$. (a) What happens? (b) The fix?
(a) With $x=2$ the terms are $2, -2, \tfrac{8}{3}, -4,\ldots$ — they grow, and the series diverges. The Maclaurin series of $\ln(1+x)$ only converges for $-1<x\le1$; at $x=2$ you're far outside its radius. Assumption 1 failed, loudly.
(b) Re-center, or transform. Use $\ln 3 = \ln\frac{1+t}{1-t}$ with $t=\tfrac12$, a fast-converging form, or expand $\ln x$ around $a=e$ instead of $0$. The series isn't wrong — you just asked it about a place it can't see from where it's standing. (Section 5 builds exactly this faster log.)
Consider $f(x)=e^{-1/x^2}$ (with $f(0)=0$). It's infinitely differentiable. (a) What is its Maclaurin series? (b) Why is that a catastrophe?
(a) Every single derivative at $0$ is exactly zero. So the Taylor series is $0+0x+0x^2+\cdots = 0$, identically. (b) But the function is not zero anywhere except at the origin! The series converges beautifully — to the wrong function. This is the nightmare case: smooth but not analytic. The derivatives at one point simply don't carry information about the function elsewhere.
The lesson is humbling: "infinitely differentiable" is not enough for Taylor to work. You need analyticity, a strictly stronger promise. Most functions you meet in physics are analytic, which is why we get away with it — but this little monster is the reason the fine print exists.
To approximate $\frac{1}{1+25x^2}$ on $[-1,1]$, a student fits a high-degree polynomial through evenly spaced points, expecting more degree to mean less error. (a) What goes wrong? (b) What's really happening?
(a) The opposite of what you'd hope: as the degree climbs, the polynomial develops violent oscillations near the ends of the interval, and the error blows up. This is the famous Runge phenomenon.
(b) That innocent function has trouble lurking in the complex plane (poles at $x=\pm i/5$) that pinches its radius of convergence, so a single global high-degree polynomial can't tame it. More terms is not always more accuracy. The real fixes — Chebyshev points, splines, piecewise fits — all amount to not trusting one Taylor expansion across too wide a span.
A student uses $T\approx T_0(1+\theta_0^2/16)$ for a pendulum released from nearly $180°$. (a) What does the formula predict? (b) What actually happens?
(a) The two-term formula gives a finite, modest correction even at $179°$ — utterly wrong. (b) The true period diverges to infinity as $\theta_0\to180°$: balanced exactly at the top, the pendulum takes forever to fall. A couple of Taylor terms around the bottom of the well know nothing about the unstable equilibrium at the top.
This is assumption 2 failing — too few terms — bleeding into assumption 1, since the expansion is only local. A local model is silent about distant features of the landscape, and the top of the swing is as distant as it gets.
The takeaway for modelers
| Ask… | If "no"… |
|---|---|
| Am I inside the radius of convergence? | Diverges → re-center or transform (Probe 1) |
| Is the function actually analytic? | Smooth ≠ analytic → series can converge to the wrong thing (Probe 2) |
| Will more degree really help? | Maybe not — Runge oscillations, use splines/Chebyshev (Probe 3) |
| Are there distant features my local model can't see? | Local truth ≠ global truth → watch far-off equilibria (Probe 4) |
And the reassurance: when Taylor fails it usually fails visibly — a diverging sum, a polynomial thrashing at the edges, a prediction that contradicts the physics. The one genuinely sneaky case is the smooth-but-not-analytic monster, which is why "infinitely differentiable" is never quite the same as "equal to its Taylor series." Stay near your point, keep enough terms, and check that your function is honest.
Chapter Seven — Close
7. The One Pattern to Remember
A smooth function near a point $a$ is a polynomial in disguise: match its value, its slope, its curvature, and onward — each derivative divided by $n!$ — and you reconstruct it. Keep one term for a tangent line, two for the local parabola, $n$ for accuracy the remainder $\frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1}$ certifies.
That's the whole story, and it's the spine of this entire book. Every series we've summed — geometric, binomial — and every one still to come — exponential, logarithmic — is this single machine fed a different function. The moment you face something nonlinear and frightening, you can pin it to a point and trade it for a polynomial that's friendly, computable, and as accurate as you care to pay for. And that little phrase "near a point" is the eternal reality check riding along: Taylor gives you a local truth, exact in the limit and excellent nearby, but never a license to forget how far you've wandered from where you planted your feet.
One point, a tower of derivatives, the whole curve. Next, in Section 4, the single most important function this machine ever built: the exponential.