Taylor expansion
Approximating functions by polynomials, with error control.
about 9 min
Start from a problem
A calculator can only add, subtract, multiply and divide. How does it compute or ?
We need a way to approximate any smooth function by expressions using only those four operations (polynomials), and we must be able to say how large the error is; otherwise the approximation is worthless.
How does a calculator compute ? It can only add, subtract, multiply and divide. But near : At these give , , , while the true value is . The longer the polynomial, the better the approximation.
If a polynomial is to "look like" near , the natural demand is that its value, slope, curvature, … at all agree with those of : for . Such a polynomial is unique, and the error should shrink as grows.
Definition
Let have derivatives at . The polynomial is the -th Taylor polynomial of at , and is the remainder.
Why ? Differentiate times and set : of the terms , only survives, contributing . So , exactly the demand in the conjecture.
Theorem and proof
Polynomials are easy to evaluate, but an approximation without an error bound is meaningless. The theorem gives the error exactly.
Let have derivatives on an interval containing and . Then there is between and with
Fix and choose with . Define Then (since matches to order at and the first derivatives of vanish there) and .
By Rolle's theorem has a zero between and ; then vanishes at and , so has a zero ; after steps, . Since and ,
Approximate by for . This polynomial is in fact (the coefficient is zero), so
If is infinitely differentiable at , is its Taylor series. The series converges to if and only if .
All derivatives of these functions are uniformly bounded on any bounded interval (the derivative of is itself; those of have absolute value at most 1). Fix and let ( for , for ). Then because (from some point on each term is multiplied by a factor below ).
Not every Taylor series converges to its function. with has all derivatives equal to at ; its Taylor series is identically , yet is not. The remainder never tends to . The clause "if and only if " in the definition is not decoration.
A Taylor series converging is not the same as converging to . For (with ) the series converges everywhere (to ) yet equals only at . The only way to know "series function" is to prove the remainder .
Applications
In Numerical solutions, Euler's method has local error and RK4 has . All such statements come from expanding the true solution in a Taylor series and comparing it term by term with the numerical scheme.
Splitting the series of into real and imaginary parts gives . This is why complex characteristic roots produce trigonometric solutions in Second-order linear equations.