In short
Near a point a, a smooth function f can be approximated by a polynomial whose coefficients are built from the derivatives of f at a. The Taylor polynomial of degree n agrees with f in value, slope, curvature, and higher-order behaviour up to order n. The Taylor series is the limit as n \to \infty — an infinite polynomial that, inside its interval of convergence, equals the original function. The Maclaurin series is the special case centred at a = 0. The big five standard expansions — e^x, \sin x, \cos x, \ln(1 + x), (1 + x)^k — are the building blocks you carry around for everything that follows.
You want to compute e^{0.1}. You cannot just type it in; e is an irrational number and 0.1 is a decimal, and raising one to the other is not something you can do directly on paper.
But look at what you know about e^x. Near x = 0, the function has the value e^0 = 1. Its derivative at 0 is e^0 = 1 too. Its second derivative is 1. Every derivative of e^x is e^x, and at x = 0 they are all equal to 1.
So near x = 0, the function looks like:
- value 1
- slope 1 (rising at rate 1 per unit of x)
- curvature such that the second derivative is also 1
- and so on for every order of derivative.
That is a complete list of everything the calculus of e^x can tell you about the function near zero. And from that list — just the values of the derivatives at a single point — it turns out you can reconstruct the function itself, at least near that point. The reconstruction is a polynomial. As you use more and more terms, the polynomial gets closer and closer to e^x.
Specifically:
The true value of e^{0.1} is 1.10517091808\ldots. Five terms of a polynomial, all computed with pencil and paper arithmetic, give seven correct decimal places.
This is the Taylor series trick. Use the derivatives of a function at a single point to build a polynomial; use the polynomial as a local substitute for the function. The rest of this page is the why: why the trick works, when it stops working, and the handful of standard expansions every calculus student ends up memorising.
From linear approximation to polynomial approximation
You have met this idea before, in its simplest form. Near a point a, the linear approximation to a function f is
This is the equation of the tangent line — the best first-order approximation. It matches f in value at a and in slope at a, but nothing more. For small (x - a) the error is small, but it grows as you move away.
Can you do better? A linear approximation ignores curvature. If f bends upward, a straight line undershoots it; if f bends downward, the line overshoots. You want to match the bending too.
The natural object to capture bending is the second derivative. A quadratic approximation of the form
gives you three degrees of freedom — c_0, c_1, c_2 — that you can match to the value, slope, and second derivative of f at a.
Matching value: at x = a the quadratic is c_0. Setting this equal to f(a) gives c_0 = f(a).
Matching slope: the derivative of the quadratic is c_1 + 2 c_2 (x - a), which at x = a equals c_1. Setting this equal to f'(a) gives c_1 = f'(a).
Matching curvature: the second derivative of the quadratic is 2 c_2, a constant. Setting this equal to f''(a) gives c_2 = f''(a) / 2.
So the best quadratic approximation to f near a is
Now extend the pattern. If you allow a cubic, you can match the third derivative too. The cube's third derivative is 6, so you divide by 6. In general, the k-th derivative of (x - a)^k at x = a is k!, so to match the k-th derivative of f at a you divide by k!.
The Taylor polynomial
Taylor polynomial
Let f be n times differentiable at a point a. The Taylor polynomial of degree n for f centred at a is
Equivalently, P_n(x) = \sum_{k=0}^{n} \dfrac{f^{(k)}(a)}{k!}(x - a)^k.
The polynomial P_n agrees with f in value, and in every derivative up to the n-th, at the single point x = a.
The construction is forced on you by the matching requirements. Each coefficient has exactly the form it must to make the derivatives line up at a.
Degree 1 gives back the tangent line. Degree 2 gives the tangent parabola — the best quadratic fit. Degree 3 adds cubic bending. As the degree increases, the approximation captures more and more of the local behaviour of f near a.
Taylor's theorem: quantifying the error
A Taylor polynomial is an approximation. The whole point is that P_n(x) is close to f(x) near a. But how close? Can you put a bound on the error f(x) - P_n(x)?
Yes. The statement that answers this is Taylor's theorem.
Taylor's theorem (Lagrange form of the remainder)
If f is (n+1) times differentiable on an interval containing a and x, then there exists some point c strictly between a and x such that
The function f equals its Taylor polynomial plus a remainder; the remainder has the form of the "next term" but with the derivative evaluated at some unknown point c rather than at a.
Read what this says. The error from stopping the polynomial at degree n is controlled by the next derivative f^{(n+1)} — not at a, but somewhere between a and x. If you have a ceiling on |f^{(n+1)}| throughout the interval (say, |f^{(n+1)}(t)| \leq M for all t between a and x), you immediately get a bound on the error:
This is the workhorse bound for computing with Taylor polynomials. If you want your answer accurate to 0.0001, this inequality tells you how many terms you need.
The Taylor series
Let n \to \infty. The Taylor polynomial becomes an infinite polynomial — a Taylor series.
Taylor series
The Taylor series of f centred at a is
When a = 0, the series is called the Maclaurin series of f:
A Taylor series is a power series (the topic of the previous article), so it has a radius of convergence R. Inside the interval |x - a| < R, the series converges as a power series.
But here is a subtlety: the series could converge to a sum that is not f(x). Convergence of the series and equality with f are two different things. Equality holds precisely when the remainder R_n(x) \to 0 as n \to \infty. If the remainder does not vanish, the series converges to the wrong answer.
For most of the functions you care about — e^x, \sin x, \cos x, \ln(1 + x), (1 + x)^k — the remainder does vanish on the interior of the interval of convergence, and the Taylor series genuinely equals the function. These are called analytic functions. Analyticity is the situation you almost always want to be in.
The big five expansions
Five standard Maclaurin series appear so often that you should know them by heart. Each comes from computing the derivatives of the function at 0 and assembling the coefficients.
Exponential.
The derivatives of e^x are all e^x, which equals 1 at x = 0. So every coefficient is 1/n!. The series converges for every real x (radius R = \infty) because the factorials in the denominators grow faster than any power.
Sine.
Sine has derivatives \sin, \cos, -\sin, -\cos, \sin, \ldots, cycling with period 4. At x = 0 these are 0, 1, 0, -1, 0, 1, 0, -1, \ldots. Only the odd-indexed derivatives are non-zero, and they alternate between +1 and -1. That produces the odd-power series with alternating signs.
Cosine.
The derivatives of \cos x cycle \cos, -\sin, -\cos, \sin, \cos, \ldots, so at x = 0 they are 1, 0, -1, 0, 1, 0, \ldots. Only the even-indexed derivatives are non-zero, and they alternate. The result is the even-power series with alternating signs.
Logarithm.
Derivatives of \ln(1+x) at 0: the first derivative is 1/(1+x), whose value at 0 is 1. The second is -1/(1+x)^2, value -1 at 0. The third is 2/(1+x)^3, value 2 at 0. The general pattern gives f^{(n)}(0) = (-1)^{n+1} (n-1)!, so f^{(n)}(0)/n! = (-1)^{n+1}/n. Notice the finite radius of convergence R = 1 — the function \ln(1 + x) misbehaves at x = -1 (it goes to -\infty), so the series cannot extend past there.
Binomial.
for any real exponent k. When k is a positive integer, the series terminates — there are only k+1 non-zero terms and you recover the ordinary binomial theorem. When k is not a positive integer (for example k = 1/2, k = -1, k = \pi), the series is genuinely infinite and gives you a power-series expansion for (1+x)^k. You met a special case of this already: with k = -1, the series is 1 - x + x^2 - x^3 + \cdots = 1/(1+x), which is the geometric series.
Worked examples
Example 1: Maclaurin series of $e^x$ from the definition
Claim: \displaystyle e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} for every real x.
Step 1. Compute the derivatives of f(x) = e^x at 0.
Every derivative of e^x is e^x itself. So f^{(k)}(x) = e^x for every k, and f^{(k)}(0) = 1 for every k.
Why: e^x is the unique function (up to scaling) that is its own derivative. This is the defining property you use to compute all its higher-order derivatives in one shot.
Step 2. Write the Maclaurin polynomial of degree n.
Why: every coefficient is 1/k! because the derivatives at 0 are all 1. The polynomial is the sum of the first n+1 terms of the eventual series.
Step 3. Bound the remainder.
By Taylor's theorem, the remainder is
for some c between 0 and x. Since e^c \leq e^{|x|} for any such c,
Why: pinning down c is unnecessary; you just need a ceiling on e^c. The ceiling e^{|x|} is fixed (it does not depend on n), so the remainder bound only depends on n through the factorial and the power.
Step 4. Show that the remainder goes to zero.
For any fixed x, the sequence \frac{|x|^{n+1}}{(n+1)!} tends to 0 as n \to \infty, because factorials grow faster than any exponential.
Why: the numerator |x|^{n+1} grows like a geometric sequence with ratio |x|; the denominator (n+1)! grows faster than any geometric sequence. So the ratio vanishes.
Step 5. Conclude.
Since P_n(x) \to e^x as n \to \infty, the Maclaurin series converges to e^x for every x.
Result: e^x equals its Maclaurin series everywhere on \mathbb{R}.
Example 2: approximating $\sin(0.3)$ to six decimal places
Claim: You can compute \sin(0.3) accurate to six decimal places using just three terms of the Maclaurin series for sine.
Step 1. Recall the series.
Why: this is the standard expansion, memorised. Each term has an odd power, alternating sign, and a factorial denominator.
Step 2. Plug in x = 0.3.
Why: computing the powers once and reusing them keeps the arithmetic clean.
Step 3. Compute each term.
The first three non-zero terms sum to
Why: each successive term is much smaller than the previous — the x^{2k+1}/(2k+1)! terms shrink rapidly because of the factorial growth.
Step 4. Bound the error.
By Taylor's theorem, the error from truncating at the x^5 term is bounded by the next term's size:
This is smaller than 10^{-6}, so the answer is correct to at least six decimal places.
Why: the (n+1)-st derivative of sine is always \pm \sin or \pm \cos, each bounded by 1. So M = 1 in the remainder bound.
Step 5. Compare to the true value.
\sin(0.3) = 0.2955202067\ldots. The computed approximation 0.29552025 agrees to six decimal places. The error is about 4 \times 10^{-8}, exactly as predicted.
Why: theory and arithmetic line up. The bound you derived is a worst-case estimate, and the actual error stays under it.
Result: \sin(0.3) \approx 0.295520, accurate to six decimal places, from three terms of the series.
Applications
Taylor series are not just a theoretical curiosity. They do real work.
Computing values of transcendental functions. Before digital calculators, tables of \sin, \cos, \log, e^x were computed using Taylor series truncated to a few dozen terms. Your calculator today still uses polynomial approximations under the hood — not the Taylor series exactly, but close relatives tuned for numerical stability.
Evaluating limits that resist other techniques. Take
L'Hopital's rule works (three applications) but is tedious. Taylor expansion gives the answer in one line: \sin x = x - x^3/6 + O(x^5), so \sin x - x = -x^3/6 + O(x^5), so the ratio is -1/6 + O(x^2) \to -1/6. Clean, fast, and unambiguous.
Approximating integrals. The integral \int_0^1 e^{-x^2} dx has no elementary antiderivative, but replacing the integrand by its Maclaurin series and integrating term by term gives a convergent series for the integral:
You can now compute the integral to any desired precision by summing enough terms.
Solving differential equations. Many differential equations that have no elementary solution admit power-series solutions. Assume the solution has the form y = \sum a_n x^n, substitute into the equation, and match coefficients. You end up with a recurrence for the a_n which can be solved explicitly or numerically.
Physics: small oscillations. The pendulum equation is \ddot\theta + (g/L)\sin\theta = 0, which is nonlinear and hard. But for small \theta, \sin\theta \approx \theta, and the equation collapses to the simple harmonic oscillator \ddot\theta + (g/L)\theta = 0. The linear approximation is the first-order Taylor expansion of sine. Every "linearisation" in physics is a truncated Taylor series.
Common confusions
-
"Every smooth function equals its Taylor series near the centre." Almost — but not quite. The Taylor series of a smooth function need not converge to the function, even if it converges. The classical counterexample is f(x) = e^{-1/x^2} (with f(0) = 0), which is infinitely differentiable at 0 but whose every derivative at 0 is zero. Its Maclaurin series is therefore identically zero, which matches f(x) only at x = 0. The function and its Taylor series agree at a single point. Functions for which the Taylor series does converge to the function throughout its interval of convergence are called analytic. Analytic functions are a proper subclass of smooth functions.
-
"The Taylor series is a replacement for the function." Only inside the interval of convergence, and even then only as an approximation (unless you take infinitely many terms). Outside, the series diverges and represents nothing. \ln(1+x) equals its Maclaurin series only on (-1, 1]; at x = 2, the series is divergent, but \ln 3 is still a perfectly well-defined number — you just cannot get it from this series.
-
"More terms always means more accuracy." For a fixed x inside the radius of convergence, yes. But if x is outside, adding more terms makes things worse — the partial sums diverge. A common trap is to use a Maclaurin series to evaluate a function far from the origin; convergence may still happen (a power series can have infinite radius of convergence), but for series with finite radius, you have to check that you are inside it.
-
"Taylor's theorem is the same as the Taylor series." Different statements. Taylor's theorem is about finite polynomials and a remainder — it is true as soon as f is finitely differentiable. The Taylor series is the infinite-term object, and its convergence to f is a separate question that requires the remainder to vanish. Taylor's theorem is the tool you use to decide whether the Taylor series converges to f.
-
"Maclaurin series is a different thing from Taylor series." Maclaurin is just Taylor centred at a = 0. The name is kept for historical reasons (Colin Maclaurin used the a = 0 case extensively in the 1740s). Mathematically there is nothing new — shifting to a different centre is a substitution.
Going deeper
You now have the machinery and a collection of standard expansions. The rest of this section addresses one deep question: what exactly is the relationship between a function and its Taylor series, and why is analyticity so restrictive?
The function that disagrees with its own Taylor series
Consider
This function is infinitely differentiable at x = 0. A careful calculation shows that every derivative at 0 is exactly 0. Therefore the Maclaurin series of f is
The series converges (trivially — it is the zero series), but its sum is 0 for every x. The function f, on the other hand, is positive for every x \neq 0.
So the Taylor series converges, but it converges to the wrong function. The function f and its Maclaurin series agree only at the single point x = 0.
What went wrong? The remainder R_n(x) in Taylor's theorem is not vanishing as n \to \infty. All the "action" of f sits in derivatives that are never captured by a Taylor expansion — because every derivative at 0 is zero, the series cannot detect the function's behaviour away from 0.
The existence of such functions is why real analysis distinguishes smooth (C^\infty, infinitely differentiable) from analytic (equal to its Taylor series on some interval). Every analytic function is smooth; the converse is false. Functions built from standard operations on polynomials, exponentials, logarithms, and trig functions are analytic on their natural domains, which is why you rarely encounter the smooth-but-not-analytic pathology in elementary applications.
Why the big five have infinite radius of convergence (or not)
Look at the standard expansions again. e^x, \sin x, \cos x all have R = \infty — their Maclaurin series converge everywhere. But \ln(1+x) and (1+x)^k (for non-integer k) have R = 1.
Why the asymmetry? The answer is hidden in the complex plane. If you extend these functions to accept complex inputs, e^x, \sin x, \cos x are defined and well-behaved on all of \mathbb{C}. But \ln(1 + z) has a singularity at z = -1 (it would have to return -\infty), and (1 + z)^k for non-integer k has a branch point at z = -1. A theorem of complex analysis says that the radius of convergence of a Maclaurin series equals the distance from 0 to the nearest singularity in the complex plane.
For e^x, there is no singularity anywhere, so R = \infty. For \ln(1+x), the singularity at x = -1 is a distance 1 from the origin, so R = 1. The behaviour you see on the real line is dictated by what happens off the real line — an idea that blooms in a complex analysis course.
History and context, briefly
The Taylor expansion was a natural generalisation of what Newton had been doing with infinite series in the 1660s, formalised by Brook Taylor in 1715. Madhava of the Kerala school — mathematicians working in South India in the fourteenth and fifteenth centuries — had discovered the Maclaurin series for sine, cosine, and arctangent three hundred years earlier, along with infinite-series formulas for \pi that would not be rediscovered in Europe until the 1660s. Madhava's series for arctangent, set x = 1, gives the celebrated formula
now usually called the Leibniz formula but first written down by Madhava's school two centuries before Leibniz. The Kerala school's work sat in manuscripts in South India, in Sanskrit, while Europe was still figuring out how to do long division with decimal notation.
Where this leads next
You now have the central tool for turning smooth functions into polynomials and using those polynomials for computation, approximation, and proof. The next articles push these ideas in several directions.
- Sequences and Series of Functions — the convergence theory that underlies everything in this article.
- Real Analysis Preview — the epsilon-delta foundation that makes the remainder estimates rigorous.
- Approximations — the practical side of Taylor polynomials for numerical computation, with error estimates tied to specific problems.
- L'Hopital's Rule — Taylor expansion gives cleaner, more general answers to 0/0 limits than L'Hopital can.
- Complex Analysis — where analytic functions become the main characters and the "distance to nearest singularity" principle takes centre stage.