Foundations to Frontier
Tests
A. Mathematical Foundations › A3 Calculus and Analysis › Single-variable calculus

Taylor and Maclaurin Series, Remainder Terms

Any smooth function looks like a polynomial up close. Taylor series rebuild a function from its derivatives at one point. They are how computers evaluate sin and exp, how robots and Kalman filters linearize dynamics, and how Newton's method and every error estimate in numerical analysis are derived.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Copying a curve with simple pieces

Zoom in on any smooth curve and it looks like a straight line. Zoom out a little and it bends like a parabola. Using the curve’s value, slope, bend and so on at one point, you can build a polynomial that copies the curve nearby. That’s a Taylor polynomial.

Calculators do this. When you press “sin”, the chip doesn’t look anything up. It adds a few polynomial terms.

Taylor polynomials: copying a function from one point
at x = 1.00: f = 2.718282, T_3 = 2.666667, error 5.16e-2 · radius of convergence about a: ∞
Solid = f, dashed orange = Taylor polynomial of degree n built only from f and its derivatives at the blue point. Green band = interval of convergence. For 1/(1 + x²) the radius is set by the complex poles ±i, even though the real graph looks perfectly smooth.
Why engineers care

A swinging pendulum, a satellite’s attitude and a walking robot’s balance all involve sin θ. For small angles, sin θ ≈ θ, and the hard equations become easy linear ones that engineers can solve and control. That trick is the first term of a Taylor series.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Very close to 0, sin x is almost the same as…
  2. 2. e^0.1 is about…
  3. 3. More polynomial terms usually make the copy…

Level 1: Beginner

★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.

The Taylor polynomial

Tn(x)=f(a)+f′(a)(x−a)+f′′(a)2!(x−a)2+⋯+f(n)(a)n!(x−a)nT_n(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x-a)^n

About a=0a = 0 it’s called a Maclaurin polynomial. The k!k! makes the kk-th derivative of TnT_n match ff’s at aa.

Function Maclaurin series
exe^x 1+x+x22!+x33!+⋯1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots
sin⁡x\sin x x−x33!+x55!−⋯x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots
cos⁡x\cos x 1−x22!+x44!−⋯1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots

Example. e1≈1+1+12=2.5e^1\approx1 + 1 + \tfrac12 = 2.5 (degree 2). Degree 13 is accurate to 10−1010^{-10}.

📝 Quick check (Level 1)
0/3 answered
  1. 1. Degree-2 Maclaurin of eˣ at x = 1?
  2. 2. The coefficient of x³ in sin x?
  3. 3. cos 0.2 ≈ 1 − x²/2 = ?

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.

More series and their radii of convergence

Function Series Converges for
11−x\frac1{1-x} ∑xn\sum x^n ∣x∣<1\lvert x\rvert<1
ln⁡(1+x)\ln(1+x) ∑(−1)n+1xnn\sum\frac{(-1)^{n+1}x^n}n −1<x≤1-1<x\le1
(1+x)α(1+x)^\alpha ∑(αn)xn\sum\binom\alpha nx^n ∣x∣<1\lvert x\rvert<1
arctan⁡x\arctan x ∑(−1)nx2n+12n+1\sum\frac{(-1)^nx^{2n+1}}{2n+1} ∣x∣≤1\lvert x\rvert\le1
exe^x, sin⁡\sin, cos⁡\cos as above all xx

A power series ∑cn(x−a)n\sum c_n(x-a)^n converges on an interval of radius R=lim⁡∣cn/cn+1∣R = \lim\lvert c_n/c_{n+1}\rvert (the ratio test, A3.1-9) and diverges outside it.

How good is the approximation? The remainder

f(x)=Tn(x)+Rn(x),Rn(x)=f(n+1)(ξ)(n+1)!(x−a)n+1f(x) = T_n(x) + R_n(x), \qquad R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x - a)^{n+1}

This is the Lagrange form, for some ξ\xi between aa and xx. A bound ∣f(n+1)∣≤M\lvert f^{(n+1)}\rvert\le M gives a guaranteed error. For sin⁡\sin, M=1M = 1, so degree 9 at x=1x = 1 is within 1/10!≈2.8×10−71/10!\approx2.8\times10^{-7}.

🐍 Exercise 1: Taylor polynomials and the Lagrange bound
Evaluate Taylor polynomials from a list of derivatives. Check that sin's error always sits below the Lagrange bound, and find the degree needed for e to 10⁻¹⁰.
📝 Quick check (Level 2)
0/3 answered
  1. 1. The radius of convergence of Σ xⁿ is…
  2. 2. ln(1 + x)'s series at x = 1.5…
  3. 3. √(1 + x) ≈ 1 + x/2 − x²/8 at x = 0.2?

Level 3: Advanced

★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.

Taylor’s theorem with the integral remainder

Starting from f(x)=f(a)+∫axf′(t)dtf(x) = f(a) + \int_a^xf'(t)dt (the FTC) and integrating by parts repeatedly (A3.1-7):

f(x)=∑k=0nf(k)(a)k!(x−a)k+∫axf(n+1)(t)n!(x−t)ndtf(x) = \sum_{k=0}^n\frac{f^{(k)}(a)}{k!}(x-a)^k + \int_a^x\frac{f^{(n+1)}(t)}{n!}(x-t)^ndt

The mean value theorem for integrals turns this remainder into the Lagrange form. ∎

Smooth is not analytic

f(x)=e−1/x2f(x) = e^{-1/x^2} (with f(0)=0f(0) = 0) has every derivative equal to 0 at 0. Its Taylor series is identically 0, but f(x)>0f(x)>0 for x≠0x\ne0. A function whose Taylor series converges to it near each point is analytic. exe^x, sin⁡\sin and polynomials are analytic. This flat function is not, and that makes it useful for smooth “bump functions” in analysis and in smooth motion blending.

Why 1/(1 + x²) has radius 1

11+x2\frac1{1+x^2} is perfectly smooth on the real line, yet its series about 0 stops converging at ∣x∣=1\lvert x\rvert = 1. The reason lives in the complex plane. It blows up at x=±ix = \pm i, which is distance 1 from 0. In general, the radius is the distance to the nearest complex singularity. About a=1a = 1, it’s 2\sqrt2. The demo shows this.

Exercise 3.1: Why does the Taylor coefficient have a k! ?

Differentiate ∑cj(x−a)j\sum c_j(x-a)^j kk times and set x=ax = a. Only the j=kj = k term survives, as k! ckk!\,c_k. Matching f(k)(a)f^{(k)}(a) gives ck=f(k)(a)/k!c_k = f^{(k)}(a)/k!.

📝 Quick check (Level 3)
0/3 answered
  1. 1. The radius of the series of 1/(1 + x²) about 0?
  2. 2. e^(−1/x²) at 0 is…
  3. 3. The coefficient c₄ of e^(2x)?

Level 4: Expert

★★★★★ Expert⏱ 40 minResearchers: original papers and open problems.

Linearization: Taylor at the heart of estimation and control

The extended Kalman filter (EKF) propagates uncertainty through nonlinear dynamics using a first-order Taylor expansion (the Jacobian). It is used in spacecraft navigation from Apollo onward (Smith, Schmidt and McGee, 1962) and in countless robots. It works when the uncertainty is small compared with the curvature. When it isn’t, the linearization is biased. The unscented Kalman filter (Julier and Uhlmann, 1997) and particle filters fix this.

🐍 Exercise 2 (research): how wrong is EKF-style linearization?
Push x ~ N(μ, σ²) through sin. Compare the first-order Taylor mean and variance with the exact closed forms (verified by Monte Carlo) for σ from 0.05 to 1.

Taylor expansions everywhere

  • Optimization. Gradient descent minimizes the first-order model plus a step penalty. Newton’s method minimizes the second-order model f+g⊤d+12d⊤Hdf + g^\top d + \frac12d^\top Hd. Trust-region methods ask where that model can be trusted (A6).
  • Numerical analysis. Every error formula, for finite differences (A3.1-2), quadrature (A3.1-6) and Runge–Kutta ODE solvers, comes from matching Taylor terms.
  • Evaluating functions. Math libraries reduce the argument into a small range, then use a short polynomial, Taylor or minimax (Muller, 2016). Evaluating the raw series at large xx fails badly from cancellation (Practice Code 5).
  • Deep learning. The GELU tanh approximation, second-order loss analyses (sharpness, A2.4-2), Taylor-mode autodiff for higher derivatives (Bettencourt, Johnson and Duvenaud, 2019), and the “lazy training”/NTK view of wide networks as their own first-order Taylor expansion in the weights (Jacot, Gabriel and Hongler, 2018).
  • Robot control. Feedback linearization and LQR design around an operating point start from the Jacobian of the dynamics, which is a multivariable Taylor expansion (A3.2).

References

  1. B. Taylor (1715). Methodus Incrementorum Directa et Inversa.
  2. C. Maclaurin (1742). A Treatise of Fluxions.
  3. J.-L. Lagrange (1797). Théorie des fonctions analytiques. (The remainder.)
  4. G. Smith, S. Schmidt, L. McGee (1962). “Application of statistical filter theory to the optimal estimation of position and velocity on board a circumlunar vehicle.” NASA TR R-135.
  5. S. Julier, J. Uhlmann (1997). “A new extension of the Kalman filter to nonlinear systems.” Proc. SPIE, 3068.
  6. A. Jacot, F. Gabriel, C. Hongler (2018). “Neural tangent kernel: convergence and generalization in neural networks.” NeurIPS.
  7. J. Bettencourt, M. Johnson, D. Duvenaud (2019). “Taylor-mode automatic differentiation for higher-order derivatives in JAX.” NeurIPS Program Transformations Workshop.
  8. J.-M. Muller (2016). Elementary Functions: Algorithms and Implementation, 3rd ed. Birkhäuser.