What is it?
The polynomial of degree that matches and its first derivatives at a point . Degree 1 is the tangent line, degree 2 adds curvature; the higher the degree, the wider the region where it is a good approximation. At it is called a Maclaurin polynomial.
Why does it exist?
Polynomials are what we can compute: additions and multiplications. Other functions — , , the solution of a differential equation — are not. Taylor's idea gives a systematic way to trade any smooth function for a polynomial near a point, with a precise error estimate.
Intuition
Matching more derivatives means matching the shape more closely: value (same height), first derivative (same slope), second (same bending), third (same change of bending)… Each extra term corrects what the previous polynomial got wrong, and the corrections get smaller near because they carry higher powers of . Move the slider in the demo and watch the approximation "peel" away from more slowly as the order grows.
Formal definition
If is times differentiable at , its Taylor polynomial of order is
the unique polynomial of degree with for . Moreover as .
Formulas
- second order in several variables: gradient and Hessian
How is it computed?
Compute , divide the -th by . For compositions it is usually faster to combine known series (substitute, multiply, integrate term by term) than to differentiate repeatedly. Software can do it exactly with Taylor-mode arithmetic on truncated power series — which is how the demo computes the coefficients.
Example
Small-angle approximation: (order 1) turns the pendulum equation into , solvable by hand: period . The error at is — about 0.5%.
Interactive visualization
Why does it matter?
Gradient descent is "trust the order-1 Taylor model a little"; Newton's method is "jump to the minimum of the order-2 model". Numerical differentiation, ODE solvers (Euler, Runge–Kutta) and their error analysis are derived from Taylor expansions. Physics linearizes with them, and math libraries start from them.
Where it shows up in computing
Math libraries evaluate , , with polynomial approximations after range reduction (minimax, refined from Taylor).
Integrators (Euler, Verlet) are truncated Taylor expansions of the motion in the time step.
Where it shows up in AI
Newton and trust-region methods minimize the quadratic Taylor model .
The first-order model is why a small step downhill decreases .
Where is it used?
Computing topics reachable from here, through the chain of ideas that leads to them:
⚛ Physics and simulation
- Numerical differentiation→Heat equation and diffusion★★★★★
- Physics engines★★★★★
- Runge–Kutta methods→N-body gravitational simulation★★★★★
- Numerical differentiation→Fluid dynamics and CFD★★★★★
- Numerical integration (quadrature)→Finite element method★★★★★
- Runge–Kutta methods→Weather and climate modelling★★★★★
What depends on it
Exercises
Find the Maclaurin polynomial of order 4 of and use it to estimate .
Solution
; vs (error ).
Use the second-order Taylor model of to derive the step that minimizes it. Which method is this?
Solution
; setting the derivative in to zero gives . That is Newton's method for optimization.