Turning Functions into Polynomials
Computers cannot directly evaluate , , or — these are defined by limits, not arithmetic. The resolution is Taylor series: any smooth function can be approximated (often exactly represented) by a polynomial built from its derivatives at a single point. Since polynomials need only addition and multiplication, this is how calculators and libraries actually compute these functions.
The Taylor series of about a point is Each term uses a higher derivative and a higher power. Intuitively: the constant term matches the function's value, the linear term matches its slope, the quadratic term matches its curvature, and so on — each term correcting the approximation a little more. Truncating after a few terms gives a Taylor polynomial that hugs the function near .
The special case (a Maclaurin series) gives famously clean expansions: and similar series for and . Keeping more terms improves accuracy; the linear approximation (just the first two terms) is the simplest and is the basis of Newton's method and many numerical algorithms.
The key idea for computing: replace a hard function by an easy polynomial that matches it locally. The approximation is best near the expansion point and generally degrades as you move away — so choosing a good center, and enough terms, is a practical trade-off between accuracy and cost.
Common pitfall: expecting a truncated Taylor polynomial to be accurate far from the expansion point. A Taylor polynomial matches the function best near the center and its error typically grows as increases — a few terms good near can be wildly wrong far away. More terms extend the accurate region but never make a finite polynomial match everywhere; the approximation is fundamentally local.