— Following the derivation in the lecture notes “Taylor’s theorem” (for first- and second-year undergraduates)
Most formulas in physics are a Taylor expansion cut off somewhere. sin θ ≈ θ, E ≈ mc² + ½mv², “the bottom of a potential acts like a spring”: all of them are just this. So where does the formula of the Taylor expansion itself come from? Following the flow of the lecture notes, we will build it up one line at a time.
If we supplement the Definition in the lecture notes so that it also guarantees the derivative at the endpoint a, it reads as follows. When the function f(x) and its derivatives f′, …, f(n) are continuous on the closed interval [a, X] and f(n+1) exists on the open interval (a, X), there exists some c (a < c < X) such that
Below, following the Explanation in the lecture notes, we rewrite and proceed. h is “how far we have moved from the center.”
We use just this one tool. If we integrate f′ from a to a+h, the increment of f comes out directly.
Rearranging gives
We start with the crudest replacement. If h is small, f is almost indistinguishable from its tangent line at a.
Now, if we put instead, we can eliminate h and write the result as an expression in x.
Fig. 1. The figure “Imagine!!” from the lecture notes. How the error R of the tangent-line approximation becomes one quarter when h is halved. That R ∝ h² can be read off from the fact that R / h² in the numerical readout below the figure stays nearly constant.
This is the crux of the lecture notes. Eq. (5) is not an equation “about one particular function f.” It is an equation that can be used for any function that can be differentiated once. So we may put f′ in place of f.
We put this into the brace in Eq. (3) and integrate in the straightforward way.
Inside the integral, and are just constants (they are values at a, so they do not depend on x). All we have to integrate are 1 and (x−a):
Therefore
Again putting , we get
The second-order approximation (8) that we have just obtained is also an equation that can be used for any function. So we apply it to f′ once more.
We substitute this into Eq. (3) and integrate. This time the integral is added, giving
The mechanism is now visible. Assume that “it is correct up to order n−1” and use it for f′:
Putting this into Eq. (3) and using we obtain
holds, so just relabeling the index as makes the denominators line up neatly as . This is the formula of order n, and the induction has advanced by one step. Returning to , we get
If we differentiate the finished Eq. (11) at x = a, something interesting turns up. , , …, and so on: all the derivatives up to order N agree with those of f (because differentiating n times gives n!, which exactly cancels the n! in the denominator). Conversely, there is only one “polynomial of degree N whose derivatives up to order N agree,” so the Taylor polynomial is determined uniquely by that condition alone.
So far we have written everything with ≈. If we properly collect the part we have thrown away into a single term, we see the “bonus story” of the lecture notes — Taylor’s theorem is an extension of the mean value theorem.
Let the error be . Fix x and consider the function in which the center is the variable
Then and . Differentiating this with respect to t, most of the terms in the sum cancel one another like a telescoping series, giving
Only one term survives. Now, taking as a companion function and using Cauchy’s mean value theorem, for some c between a and x we get
(It is satisfying that cancels between the numerator and the denominator.) Tidying up gives exactly the Check! of the lecture notes.
Fig. 2. The error R falls as hN+1. Both axes are logarithmic. The slope of each straight line is directly N+1 — when we truncate at order N, we can read by eye the power of h with which the error vanishes.
What we get by setting is called the Maclaurin expansion. All that remains is to write down one after another.
| f | f′ | f″ | f‴ | f(4) | Values at 0 | |
|---|---|---|---|---|---|---|
| sin x | sin | cos | −sin | −cos | sin | 0, 1, 0, −1, 0, 1, … |
| cos x | cos | −sin | −cos | sin | cos | 1, 0, −1, 0, 1, 0, … |
| ex | ex | ex | ex | ex | ex | 1, 1, 1, 1, 1, 1, … |
Just putting these into Eq. (11) gives three famous series.
Into ex in Eq. (15), let us boldly put . Since , the sequence goes around with a period of 4. Collecting only the real parts gives the cos of Eq. (15), and collecting only the imaginary parts gives the sin of Eq. (14) — that is,
The exponential function and the trigonometric functions, two things that look completely unrelated, have been connected. “We just split the same series into even and odd orders.” Wave functions, AC circuits, Fourier transforms — the fact that physics can use eiθ without hesitation is thanks to this one line.
It is not always true that brings us back to f. The condition for getting back is that the remainder in Eq. (13) falls to 0 — nothing more.
| Function | Content of the remainder | Result |
|---|---|---|
| sin x, cos x | so | Goes to 0 for any x (the factorial beats the exponential) |
| ex | Bounded by the value at the end of the interval | Likewise, converges everywhere |
| 1/(1−x) | The remainder is exactly | Only for |x| < 1. Diverges outside |
It is easy to accept that 1/(1−x) stops at x = 1: the function itself diverges there. But exactly the same thing happens for 1/(1+x²) — even though this function is smooth everywhere on the real axis, bounded, and has no place at all where it breaks down.
Fig. 3. Seeing the radius of convergence in the complex plane. The × marks are the singularities, and the blue circle is the circle of convergence |z − a| = R. The lower band is the real axis, and only the interval that the circle cuts out of the real axis is the “range of x where the series can be used.” As you move a, you can see the circle swell until it is just short of touching a singularity.
There is one more reason why the remainder term cannot be ignored.
This function can be differentiated any number of times. And yet at x = 0, the derivatives of every order are exactly 0 (because goes to 0 faster than any power as , that is, it still goes to 0 even when multiplied by ). The Maclaurin expansion is then
| Situation | Expansion used | What comes out of it |
|---|---|---|
| Simple pendulum | sin θ ≈ θ | The equation of simple harmonic motion, T = 2π√(L/g) |
| Near a stable equilibrium | V(x) ≈ V(x0) + ½V″(x0)(x−x0)² | Everything becomes a harmonic oscillator. Phonons, molecular vibrations |
| A quantity with a small correction | (1+x)α ≈ 1 + αx (binomial approximation) | √(1+x) for α = ½, 1/(1+x) for α = −1, and γ in the next row for α = −½ |
| Relativity → Newtonian mechanics | γ = 1 + ½β² + ⅜β⁴ + … | E = mc² + ½mv² + … |
| Planck → classical | x/(ex−1) = 1 − x/2 + x²/12 − … | ⟨E⟩ = kBT (equipartition theorem, Rayleigh–Jeans) |
| Perturbation theory | Expand H = H0 + λV in λ | First-order and second-order perturbation energies |
| Numerical computation | Finite differences, Runge–Kutta, Simpson’s rule | That the error falls as hN+1 is itself Eq. (13) |
A concrete example of “near a stable equilibrium” is the Lennard-Jones potential in tab ③ of the simulator, V(r) = 4ε[(σ/r)12 − (σ/r)6]. Expanding around the bottom r0 = 21/6σ, we have V′(r0) = 0, so the expansion starts at second order, and V″(r0) is itself the spring constant. Moreover, the third-order term, which expresses the left–right asymmetry of the bottom, is the anharmonic term, the origin of thermal expansion. It is also a real example of an expansion whose center is not the origin (a ≠ 0).
We checked by computer that the formulas so far really hold. The numbers below are the results of running the very code that is included in the simulator (124 items in total, all passed).
| What was checked | Result |
|---|---|
| Eqs. (14), (15): do the coefficients c0…c9 of 9 functions, including sin, cos, and ex, agree with the textbook? | Max. difference 6.1×10−16 |
| Eq. (11): the analytic vs. numerical differentiation (Richardson extrapolation) | Max. relative difference 4×10−5 (rounding floor) |
| Eq. (13): actual error ≤ Lagrange bound (9 functions × N = 0…10, 99 cases) | All hold. Minimum of bound ÷ error: 1.013 |
| Eq. (13): actually find the c that satisfies the equality and compare both sides | Max. relative difference 2.0×10−15 |
| Eq. (13): is N = 0 the mean value theorem itself? | Agree in all 3 examples (10−9 or less) |
| Eq. (13): does the error fall as hN+1? (log–log slope, N = 0…5) | 0.99, 2.04, 3.00, 4.02, 5.00, 6.02 |
| Eq. (16): does putting x = iθ into the exp series give cos + i sin? | Max. difference 2.2×10−16, real and imaginary parts of eiπ+1 each at most 2.4×10−16 in magnitude |
| §7: radius of convergence = distance to the complex singularity (the radius of convergence is computed with the Cauchy–Hadamard formula |cn|−1/n) | Agree in all 6 cases (within 9 % at n = 60) |
| §7: is the remainder of 1/(1−x) exactly xN+1/(1−x)? | 16 cases, within 1.8 times the rounding estimate |
| §8: for e−1/x², f(0)…f(30)(0) are all 0 and T40(1) = 0, yet f(1) = e−1 | Error 0.3679 (constant, independent of N) |
| Claim of the teaching material: does the “range with error within 1 %” widen with N? (sin, N=1,3,5,9,15; 1 % is relative to the max|f| on the screen) | 0.39 → 1.04 → 1.76 → 3.25 → 5.50 |
| Same as above: for 1/(1−x), does it stay below 1 even when N is raised to 40? (N=1,5,15,40, the end on the side of the singularity x = 1) | 0.24 → 0.57 → 0.78 → 0.89 (< 1) |
Mochizuki Research Group, Tokyo University of Science / from the lecture notes “(21) Taylor’s theorem.” The proof by Cauchy’s mean value theorem in §5, the radius of convergence in §7, and the counterexample in §8 supplement what lies beyond the scope of the notes. The numerical checks use direct double-precision computation, numerical differentiation by Richardson extrapolation, and the n-th root of the Cauchy–Hadamard formula. If you want to check things on a graph, go to the simulator. The formulas are typeset with the browser’s standard MathML (no external libraries and no network communication at all).