TL;DR
A Taylor series approximates a complicated smooth function with a polynomial. You build the polynomial from the function's value and its derivatives at one chosen point, and near that point the polynomial tracks the function closely. Polynomials are easy to add, multiply, differentiate and integrate, so the trick turns hard questions into plain arithmetic.
Where you'll see it: inside calculators and numerical libraries that evaluate , and , in the linear approximations behind gradient descent, and in the error analysis of almost every numerical method.
Intuition
Zoom in on any smooth curve far enough and it looks like a straight line. That line is the tangent, and it is the best straight-line approximation at that point. It captures the value and the slope (the Derivative), but not how the curve bends. To capture the bend you need a parabola, which matches the curvature too. To capture the next wiggle you need a cubic, and so on. Each extra term fixes one more feature of the curve at the chosen point.
That is the whole idea. A Taylor polynomial is a stack of corrections, each one matching one more derivative. The more of the curve's behaviour you match, the closer the polynomial stays.
- eˣ
- degree 1
- degree 2
- degree 3
The math
Definition
For a function that is infinitely differentiable at a point , its Taylor series centred at is
Here is the -th derivative of evaluated at , is the factorial (, with ), and is the distance from the centre. When the series is called the Maclaurin series.
Where the coefficients come from
Suppose a polynomial should match at in value and in every derivative. Evaluate at and every term except vanishes, so . Differentiate once and set : , so . Differentiate twice: , so . In general the -th derivative of at equals , which gives . The factorial appears because differentiating a total of times gives .
Common series at
How big is the error?
Truncating after degree leaves a remainder. Taylor's theorem says that, for some point between and ,
Two things follow. The error shrinks like as approaches , so the approximation is excellent close to and degrades farther away. And each extra term buys a factor of , which is why the factorials make series converge quickly for small .
Worked examples
Estimate (see the exponential function) using the series at with . The exact value is .
- Degree 1: .
- Degree 2: .
- Degree 3: add , giving .
- Degree 4: add , giving .
- Degree 5: add , giving .
The error falls from to over five terms. Each term is smaller than the last because the factorial in the denominator grows faster than the powers of in the numerator.
Estimate using at , with .
- Compute the first derivatives at 0: , , .
- The coefficients are , then , then .
- Degree 2 polynomial: .
- The true value is . The error is about .
- Interpretation: a short polynomial already lands within for a number near 1, which is why these expansions are used in hand calculation and in fast approximations.
Estimate with the series .
- Degree 1: .
- Degree 3: .
- Degree 5: add , giving .
- The true value is . The degree-5 estimate is accurate to about .
Now try , where the true value is . The degree-5 polynomial gives . It is off by almost . The same polynomial that was excellent at is poor at , because the remainder grows with .
Tradeoffs and failure modes
A Taylor polynomial is exact at its centre and an approximation elsewhere. Choose it when you need accuracy near one point, and reach for something else when you need accuracy over a whole interval.
| Situation | Problem | Better choice |
|---|---|---|
| Accuracy needed far from | Error grows like ; high degree may not help | Re-expand around a closer point, or use range reduction (for example, reduce to a small angle first) |
| Accuracy needed on a whole interval | A Taylor polynomial is tuned to one point, not the interval | Chebyshev or minimax polynomials, which spread the error evenly |
| Series outside its radius of convergence | at gives , which diverges | Stay inside the radius, or use a different expansion |
| Function not smooth at | has no derivative at , so no Taylor series exists there | Piecewise or smoothed approximations |
| Rational functions and ratios | Series can be long and slow to converge | Padé approximants, which use a ratio of polynomials |
Two practical warnings. First, a series can converge for some and diverge for others. The set of where it converges is an interval around , and half its width is the radius of convergence, so always check it. Second, a convergent Taylor series need not equal the function it came from. The function (set to at ) is infinitely differentiable, yet all its derivatives at are , so its Taylor series at is identically zero. For everyday functions like and the series does equal the function, but "infinitely differentiable" does not guarantee it.
History
The idea of matching a curve with a series is much older than the name. Mathematicians in the Kerala school, including Madhava of Sangamagrama around 1400 CE, found series for , and . In Europe, James Gregory and Isaac Newton were using infinite series for logarithms and other functions in the late 1600s.
The general method was published by Brook Taylor in 1715, in a book on the calculus of finite differences, Methodus incrementorum directa et inversa. He was looking for ways to expand functions as power series. Colin Maclaurin later used the case heavily in his 1742 treatise on fluxions, which is why that special case bears his name.
It caught on because it turned functions like , and into polynomials. Before electronic computers, tables of and were computed this way, and today's numerical libraries still evaluate most elementary functions with polynomial approximations derived from the same principle.
Check yourself
QuestionWhat is the coefficient of (x − a)³ in the Taylor series of f centred at a?Show answer
It is , which is . The third derivative of at sets the cubic term, and dividing by cancels the factor produced by differentiating three times.
QuestionWrite the degree-2 Taylor polynomial of e^x at a = 0 and use it to estimate e^0.2.Show answer
The polynomial is . At it gives . The true value is , so the error is about , roughly what the next term, , predicts.
QuestionWhy does the factorial appear in the denominator of every Taylor term?Show answer
Differentiating a total of times gives , and that is the only term that is nonzero at after differentiations. So the -th derivative of the polynomial at is times its coefficient . To make it equal , we set , and the factorial undoes that multiplication.
QuestionA calculator must evaluate cos(0.1) to six decimal places. Using the series cos x = 1 − x²/2 + x⁴/24 − x⁶/720 + ..., how many terms are needed?Show answer
Compute the terms at : , then , then , then . The sum of the first three is , which rounds to at six decimals. The next term is about , far below the required precision. So three terms (up to the term) are enough, and the fourth term can be dropped.