mathematics//calculus//Taylor polynomial

A Taylor polynomial is the polynomial that matches a smooth function's value and first few derivatives at one point, and it is the tool that lets engineers replace a curve they cannot handle by a line or a parabola they can, as long as they stay close to that point. Its first-order version says that close up every smooth function looks like a straight line:


A Taylor polynomial is the polynomial that matches a smooth function's value and first few derivatives at one point, and it is the tool that lets engineers replace a curve they cannot handle by a line or a parabola they can, as long as they stay close to that point. Its first-order version says that close up every smooth function looks like a straight line:

g(a+δ)≈g(a)+g′(a) δ+12g′′(a) δ2+⋯g(a+\delta)\approx g(a)+g'(a)\,\delta+\tfrac12 g''(a)\,\delta^2+\cdotsg(a+δ)≈g(a)+g′(a)δ+21​g′′(a)δ2+⋯

Keeping only the first two terms is the tangent line; the third term, with the second derivative, says how fast the line stops being right as δ\deltaδ grows. Take sin⁡θ\sin\thetasinθ at zero: the line is θ\thetaθ itself, and the neglected curvature makes it 0.5 % wrong at 10° and nearly 5 % wrong at 30° (small-angle approximation).

First-order Taylor is the root of linearization.

With several variables the derivative becomes the Jacobian, f(x∗+δx)≈f(x∗)+J δxf(x^*+\delta x)\approx f(x^*)+J,\delta xf(x∗+δx)≈f(x∗)+Jδx, and every linear method applied to a nonlinear plant (pole placement, LQR, the extended Kalman filter, a stability test by eigenvalues) is working on this truncated expansion and inherits its region of validity.

The approximation depends on where it is taken. A tank emptying through an orifice has an outflow that grows with the square root of the level, and the slope of that square root is steeper near the bottom, so the linear model of the same tank is twice as fast at a quarter of a metre as at one metre. Each operating point has its own expansion, which is why gain scheduling exists (linearization works the tank through).

More terms buy accuracy over a wider neighbourhood, never a global model. The polynomial with infinitely many terms is the Taylor series; for exe^xex, sin⁡x\sin xsinx and cos⁡x\cos xcosx it converges everywhere, and the matrix exponential eFt=I+Ft+(Ft)2/2!+⋯e^{Ft}=I+Ft+(Ft)^2/2!+\cdotseFt=I+Ft+(Ft)2/2!+⋯ is defined by it. For other functions the series converges only in a radius, or to the wrong function.

Numerical methods are graded by how many Taylor terms they match. The Euler method follows the first-order term over each step, so its error per step is second order and its accumulated error first order; the Runge-Kutta method matches the expansion up to the fourth power of the step. Newton's method keeps the quadratic term of a cost and jumps to the bottom of that parabola.

The pattern of approximating locally, solving the easy problem and approximating again around the new point is common enough to have its own note, linearize-solve-repeat.