Taylor Polynomials and Local Approximation

How well can a single polynomial mimic a complicated function, near one chosen point? This is the question that drives all of local approximation theory. A tangent line already answers it to first order. It matches the function's value and slope. But tangent lines are blind to curvature, to inflection, to the finer shape of a graph. Taylor polynomials generalize the tangent line by matching not just value and slope, but every derivative up to some order nn. This produces the unique polynomial of degree ≤n\le n that hugs the function most tightly at that point. The subject matters because it converts transcendental, often intractable functions into concrete algebraic objects — polynomials. At the same time, it gives a precise, provable bound on the error committed. This is the mathematical backbone of numerical computation (how a calculator evaluates sin⁡\sin or exe^x). It also underlies physics (small-oscillation and perturbative approximations). And it grounds the entire calculus of local behavior near critical points, inflection points, and singularities. The big picture is a hierarchy of increasingly refined local models. These are constant approximation (the function's value), linear approximation (the tangent line), quadratic approximation (adding curvature), and so on. Each step is characterized by a clean uniqueness and optimality statement. Among all degree-nn polynomials, the Taylor polynomial is the only one whose error vanishes faster than (x−a)n(x-a)^n as x→ax \to a. This is the qualitative, little-o companion to the quantitative Lagrange or integral remainder formulas. This article isolates and proves that qualitative optimality statement — the Peano remainder theorem. It shows exactly in what sense Taylor polynomials are the best local polynomial approximations, not merely a good one. We build the intuition with tangent-line and osculating-parabola pictures. We give a fully rigorous proof by induction using L'Hôpital's rule. We work two asymmetric examples. Finally, we show precisely which hypothesis (differentiability at the point, not just nearby) cannot be dropped.

Key takeaways
  • The degree-nn Taylor polynomial PnP_n of ff at aa matches ff and its first nn derivatives at aa.
  • Peano's theorem: f(x)−Pn(x)=o((x−a)n)f(x) - P_n(x) = o\big((x-a)^n\big) as x→ax \to a, provided f(n)(a)f^{(n)}(a) exists.
  • Uniqueness/optimality: PnP_n is the only degree-≤n\le n polynomial achieving this little-o error rate.
  • This is a purely local, qualitative statement — weaker than Lagrange/integral remainder, but requiring far less (no continuity of f(n)f^{(n)} needed away from aa).
  • The proof is by induction on nn, applying L'Hôpital's rule at each step.
  • Key idea: matching derivatives up to order nn at a single point forces the approximation error to vanish faster than any lower power of (x−a)(x-a), and no other polynomial of that degree can do as well.

Where this lives today

Taylor polynomials with Peano's remainder underpin the classification of critical points via the second-derivative test and its higher-order generalizations, foreshadowing the study of Convexity and the Second Derivative, where the sign of f′′(a)f''(a) (detected through the quadratic Taylor term) controls local convex/concave behavior. In numerical analysis, truncated Taylor expansions (paired with the quantitative Lagrange remainder, not Peano's qualitative one) drive root-finding methods such as Newton's method and the design of finite-difference schemes for solving differential equations. In physics, small-oscillation and perturbation theories — from the simple pendulum's approximation sin⁡θ≈θ\sin\theta \approx \theta to perturbative expansions in quantum mechanics — are literal applications of low-order Taylor polynomials, with the little-o remainder justifying that higher-order "correction terms" are negligible in a rigorously specified asymptotic sense. In computer science and cryptography, Taylor-polynomial evaluation (via Horner's method) underlies software implementations of transcendental functions (exp⁡,log⁡,sin⁡,cos⁡\exp, \log, \sin, \cos) in floating-point libraries, where controlling truncation error against machine precision is essential. In statistics, the delta method for approximating the variance of a nonlinear transformation of a random variable is a first-order Taylor expansion, and its refinements use the little-o remainder to justify asymptotic normality results. The concept of "little-o" itself, isolated cleanly in Peano's remainder theorem, is the prototype for the broader asymptotic notation (O,o,ΘO, o, \Theta) used throughout Asymptotic Analysis and algorithm complexity theory.

Ask the tutor: How does the Peano remainder theorem generalize to functions of several variables, and how is it used in the second-derivative test for local extrema?

DefinitionTaylor Polynomial

Let ff be a real-valued function defined on an open interval containing a∈Ra \in \mathbb{R}, and suppose f(k)(a)f^{(k)}(a) exists for k=0,1,…,nk = 0, 1, \dots, n (where f(0):=ff^{(0)} := f). The Taylor polynomial of degree nn for ff at aa is

Pn(x)  =  Pn,a,f(x)  =  ∑k=0nf(k)(a)k!(x−a)k  =  f(a)+f′(a)(x−a)+f′′(a)2!(x−a)2+⋯+f(n)(a)n!(x−a)n.P_n(x) \;=\; P_{n,a,f}(x) \;=\; \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}(x-a)^k \;=\; f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x-a)^n.

The remainder is Rn(x):=f(x)−Pn(x)R_n(x) := f(x) - P_n(x). By construction, Pn(k)(a)=f(k)(a)P_n^{(k)}(a) = f^{(k)}(a) for every k=0,…,nk = 0,\dots,n; this is immediate from term-by-term differentiation of a polynomial, since dkdxk(x−a)j∣x=a=0\frac{d^k}{dx^k}(x-a)^j\Big|_{x=a} = 0 for j≠kj \ne k and equals k!k! for j=kj = k.

Intuition

Think of building an approximation in layers. The 00th-order model is the constant function P0(x)=f(a)P_0(x) = f(a): it matches the value at aa but nothing else, and the error is only guaranteed to go to 00 as x→ax \to a — no rate is promised beyond continuity. The 11st-order model P1(x)=f(a)+f′(a)(x−a)P_1(x) = f(a) + f'(a)(x-a) is the tangent line; by the very definition of the derivative, the error f(x)−P1(x)f(x) - P_1(x) vanishes faster than x−ax - a itself, which is exactly the statement lim⁡x→af(x)−P1(x)x−a=0\lim_{x\to a} \frac{f(x)-P_1(x)}{x-a} = 0. The Taylor polynomial idea is to keep going: choose the coefficients of a degree-nn polynomial one at a time so that each new derivative also matches at aa, and each time you do so, the error picks up one more order of smallness. A parabola can bend the way ff bends (matching f′′(a)f''(a)), so it clings to the curve through a longer stretch near aa than any line can. A cubic can also match the rate of change of curvature (f′′′(a)f'''(a)), clinging even longer, and so on. The picture below shows f(x)=cos⁡xf(x) = \cos x near a=0a = 0, together with P0,P2P_0, P_2 (the constant and the osculating parabola — note P1=P0P_1 = P_0 here since f′(0)=0f'(0)=0), illustrating how each extra matched derivative buys a wider region of near-perfect agreement.

Figure
f(x)=cos⁡xf(x)=\cos x near a=0a=0: constant model P0=1P_0=1 versus quadratic model P2=1−x2/2P_2 = 1 - x^2/2
x y a=0 f(0)=P0(0)=P2(0)=1 f(x)=cos x P0(x)=1 P2(x)=1-x²/2

Central theorem

TheoremPeano's Form of Taylor's Theorem

Let n≥0n \ge 0 be an integer, let II be an open interval containing aa, and let f:I→Rf: I \to \mathbb{R} be a function such that:

  • f,f′,f′′,…,f(n−1)f, f', f'', \dots, f^{(n-1)} exist on all of II (vacuous if n=0n = 0), and
  • f(n)(a)f^{(n)}(a) exists (as a derivative of f(n−1)f^{(n-1)} at the single point aa).

Let Pn(x)=∑k=0nf(k)(a)k!(x−a)kP_n(x) = \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}(x-a)^k be the Taylor polynomial of degree nn at aa. Then

lim⁡x→af(x)−Pn(x)(x−a)n=0,\lim_{x \to a} \frac{f(x) - P_n(x)}{(x-a)^n} = 0,

i.e. Rn(x):=f(x)−Pn(x)=o((x−a)n)R_n(x) := f(x) - P_n(x) = o\big((x-a)^n\big) as x→ax \to a. Moreover, this property characterizes PnP_n among polynomials of degree ≤n\le n: if QQ is any polynomial of degree ≤n\le n with

lim⁡x→af(x)−Q(x)(x−a)n=0,\lim_{x\to a} \frac{f(x) - Q(x)}{(x-a)^n} = 0,

then Q=PnQ = P_n.

LemmaVanishing of a polynomial's Taylor remainder

If QQ is a polynomial of degree ≤n\le n, then QQ equals its own degree-nn Taylor polynomial at aa; i.e., writing Q(x)=∑k=0nck(x−a)kQ(x) = \sum_{k=0}^n c_k (x-a)^k, we have ck=Q(k)(a)/k!c_k = Q^{(k)}(a)/k!.

Proofof the Lemma

This is a direct computation. Write Q(x)=∑k=0nck(x−a)kQ(x) = \sum_{k=0}^n c_k(x-a)^k (possible since any polynomial of degree ≤n\le n can be expanded in powers of (x−a)(x-a) by repeated division, or by the binomial theorem applied to each monomial xjx^j, j≤nj\le n). Differentiate mm times (0≤m≤n0 \le m \le n) term by term:

Q(m)(x)=∑k=mnck⋅k(k−1)⋯(k−m+1)(x−a)k−m.Q^{(m)}(x) = \sum_{k=m}^n c_k \cdot k(k-1)\cdots(k-m+1)(x-a)^{k-m}.

Evaluating at x=ax = a kills every term with k>mk > m (since (x−a)k−m→0(x-a)^{k-m} \to 0 there, in fact the factor is 00 as x=ax=a makes (x−a)k−m=0(x-a)^{k-m}=0 for k>mk>m), leaving only the k=mk=m term:

Q(m)(a)=cm⋅m!.Q^{(m)}(a) = c_m \cdot m!.

Hence cm=Q(m)(a)/m!c_m = Q^{(m)}(a)/m!, as claimed. ■\blacksquare

∎
Proof

We prove the main theorem by induction on nn, using L'Hôpital's Rule at each inductive step, and then prove the uniqueness (characterization) statement separately using the Lemma.

Base case n=0n = 0. Here P0(x)=f(a)P_0(x) = f(a), and the hypothesis is simply that ff is defined at aa — but to speak of a limit as x→ax \to a we use that ff is defined on II and (from the case n=0n=0 of the hypothesis, reading "f(0)(a)f^{(0)}(a) exists" as "ff is continuous at aa", which we take as the intended meaning of the n=0n=0 hypothesis, consistent with f(n)(a)f^{(n)}(a) existing requiring one-sided existence of f(n−1)f^{(n-1)} near aa and its derivative at aa) ff is continuous at aa. Then

lim⁡x→af(x)−P0(x)(x−a)0=lim⁡x→a(f(x)−f(a))=0\lim_{x\to a}\frac{f(x)-P_0(x)}{(x-a)^0} = \lim_{x\to a}\big(f(x)-f(a)\big) = 0

by continuity of ff at aa. This establishes the case n=0n=0.

Inductive step. Suppose the theorem holds for n−1n-1 in place of nn, for every function satisfying the corresponding hypotheses (this is the induction hypothesis, applied below to g:=f′g := f'). Now let ff satisfy the hypotheses for nn: f,…,f(n−1)f,\dots,f^{(n-1)} exist on II, and f(n)(a)f^{(n)}(a) exists. Since f(n)(a)f^{(n)}(a) exists, in particular f(n−1)f^{(n-1)} is differentiable at aa, hence continuous at aa; and by hypothesis f(n−1)f^{(n-1)} exists throughout II. Also f,f′,…,f(n−2)f, f', \dots, f^{(n-2)} exist on II automatically (these are lower-order derivatives implied by existence of f(n−1)f^{(n-1)} on II; existence of the (n−1)(n-1)-th derivative at every point of II presupposes existence of all lower derivatives on II). Both f(x)−Pn(x)f(x) - P_n(x) and (x−a)n(x-a)^n vanish at x=ax=a: the numerator vanishes because Pn(a)=f(a)P_n(a) = f(a) directly from the definition of PnP_n, and the denominator vanishes trivially. Both numerator and denominator, as functions of xx, are differentiable on I∖{a}I \setminus \{a\} (the numerator because ff and PnP_n are, the denominator being a monomial), with

ddx[(x−a)n]=n(x−a)n−1≠0for x≠a,\frac{d}{dx}\big[(x-a)^n\big] = n(x-a)^{n-1} \ne 0 \quad \text{for } x \ne a,

and

ddx[f(x)−Pn(x)]=f′(x)−Pn′(x).\frac{d}{dx}\big[f(x) - P_n(x)\big] = f'(x) - P_n'(x).

Now compute Pn′(x)P_n'(x). Differentiating Pn(x)=∑k=0nf(k)(a)k!(x−a)kP_n(x) = \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}(x-a)^k term by term (valid since it is a finite sum of monomials),

Pn′(x)=∑k=1nf(k)(a)(k−1)!(x−a)k−1=∑j=0n−1f(j+1)(a)j!(x−a)j=∑j=0n−1(f′)(j)(a)j!(x−a)j.P_n'(x) = \sum_{k=1}^n \frac{f^{(k)}(a)}{(k-1)!}(x-a)^{k-1} = \sum_{j=0}^{n-1} \frac{f^{(j+1)}(a)}{j!}(x-a)^j = \sum_{j=0}^{n-1} \frac{(f')^{(j)}(a)}{j!}(x-a)^j.

This is precisely the degree-(n−1)(n-1) Taylor polynomial of g:=f′g := f' at aa! Call it P~n−1\widetilde{P}_{n-1}, the Taylor polynomial of gg of degree n−1n-1 at aa. The function g=f′g = f' exists throughout II by hypothesis, and g(n−1)(a)=f(n)(a)g^{(n-1)}(a) = f^{(n)}(a) exists by hypothesis. So gg satisfies exactly the hypotheses of the theorem for degree n−1n-1. By the induction hypothesis,

lim⁡x→ag(x)−P~n−1(x)(x−a)n−1=lim⁡x→af′(x)−Pn′(x)(x−a)n−1=0.\lim_{x\to a} \frac{g(x) - \widetilde P_{n-1}(x)}{(x-a)^{n-1}} = \lim_{x \to a}\frac{f'(x) - P_n'(x)}{(x-a)^{n-1}} = 0.

We now invoke L'Hôpital's rule for the original limit. We have shown:

  • f(x)−Pn(x)→0f(x) - P_n(x) \to 0 and (x−a)n→0(x-a)^n \to 0 as x→ax \to a (the 00\frac{0}{0} indeterminate form),
  • both are differentiable near aa (except possibly at aa itself), with the derivative of the denominator, n(x−a)n−1n(x-a)^{n-1}, nonzero for xx near aa, x≠ax\ne a,
  • and the limit of the ratio of derivatives exists:
lim⁡x→af′(x)−Pn′(x)n(x−a)n−1=1nlim⁡x→af′(x)−Pn′(x)(x−a)n−1=1n⋅0=0.\lim_{x\to a} \frac{f'(x)-P_n'(x)}{n(x-a)^{n-1}} = \frac{1}{n}\lim_{x\to a}\frac{f'(x)-P_n'(x)}{(x-a)^{n-1}} = \frac{1}{n}\cdot 0 = 0.

By L'Hôpital's rule, the original limit exists and equals the same value:

lim⁡x→af(x)−Pn(x)(x−a)n=lim⁡x→af′(x)−Pn′(x)n(x−a)n−1=0.\lim_{x\to a} \frac{f(x)-P_n(x)}{(x-a)^n} = \lim_{x\to a}\frac{f'(x)-P_n'(x)}{n(x-a)^{n-1}} = 0.

This completes the inductive step, and hence the proof of the main limit statement by induction on nn.

Uniqueness (characterization). Suppose QQ is a polynomial of degree ≤n\le n with lim⁡x→af(x)−Q(x)(x−a)n=0\lim_{x\to a}\frac{f(x)-Q(x)}{(x-a)^n} = 0. We already know from the part just proved that lim⁡x→af(x)−Pn(x)(x−a)n=0\lim_{x\to a}\frac{f(x)-P_n(x)}{(x-a)^n}=0. Subtracting,

lim⁡x→aQ(x)−Pn(x)(x−a)n=lim⁡x→a[f(x)−Pn(x)(x−a)n−f(x)−Q(x)(x−a)n]=0−0=0.\lim_{x\to a} \frac{Q(x) - P_n(x)}{(x-a)^n} = \lim_{x\to a}\left[\frac{f(x)-P_n(x)}{(x-a)^n} - \frac{f(x)-Q(x)}{(x-a)^n}\right] = 0 - 0 = 0.

Let D(x):=Q(x)−Pn(x)D(x) := Q(x) - P_n(x), a polynomial of degree ≤n\le n (difference of two such). Write D(x)=∑k=0ndk(x−a)kD(x) = \sum_{k=0}^n d_k (x-a)^k (expansion in powers of (x−a)(x-a), as in the Lemma). We show every dk=0d_k = 0 by strong induction on kk from k=0k=0 upward. Since lim⁡x→aD(x)(x−a)n=0\lim_{x\to a} \frac{D(x)}{(x-a)^n} = 0 and (x−a)n→0(x-a)^n \to 0, and DD is continuous (polynomials are continuous), we get D(x)→0⋅0D(x) \to 0 \cdot 0... more carefully: continuity of DD gives D(a)=lim⁡x→aD(x)D(a) = \lim_{x\to a} D(x), and since D(x)(x−a)n→0\frac{D(x)}{(x-a)^n}\to 0 while (x−a)n→0(x-a)^n \to 0 forces (by the product rule for limits, as the quotient stays bounded near 00) D(x)→0D(x) \to 0 as well; hence D(a)=d0=0D(a) = d_0 = 0. Now suppose inductively d0=d1=⋯=dm−1=0d_0 = d_1 = \cdots = d_{m-1} = 0 for some 1≤m≤n1 \le m \le n. Then D(x)=∑k=mndk(x−a)k=(x−a)m∑k=mndk(x−a)k−mD(x) = \sum_{k=m}^n d_k(x-a)^k = (x-a)^m \sum_{k=m}^n d_k (x-a)^{k-m}. Thus

0=lim⁡x→aD(x)(x−a)n=lim⁡x→a(x−a)m∑k=mndk(x−a)k−m(x−a)n=lim⁡x→a∑k=mndk(x−a)k−m(x−a)n−m.0 = \lim_{x\to a} \frac{D(x)}{(x-a)^n} = \lim_{x\to a} \frac{(x-a)^m \sum_{k=m}^n d_k(x-a)^{k-m}}{(x-a)^n} = \lim_{x\to a} \frac{\sum_{k=m}^n d_k (x-a)^{k-m}}{(x-a)^{n-m}}.

If m<nm < n, the same continuity argument as above (the numerator polynomial in (x−a)(x-a) is continuous, and dividing by (x−a)n−m→0(x-a)^{n-m}\to 0 forces the numerator's value at x=ax=a, which is dmd_m, to vanish) gives dm=0d_m = 0. If m=nm = n, the displayed limit is directly lim⁡x→adn=dn\lim_{x\to a} d_n = d_n, forcing dn=0d_n = 0. By induction, d0=d1=⋯=dn=0d_0 = d_1 = \cdots = d_n = 0, so D≡0D \equiv 0, i.e. Q=PnQ = P_n. This proves uniqueness. ■\blacksquare

∎

Worked examples

Example 1 — an asymmetric transcendental function. Let f(x)=e2xsin⁡xf(x) = e^{2x}\sin x and a=0a = 0. We compute the degree-33 Taylor polynomial and confirm the little-oo remainder rate directly (i.e., without invoking the theorem, as a consistency check). First the derivatives at 00. Using the product rule repeatedly (or the fact that f(x)=Im⁡(e(2+i)x)f(x) = \operatorname{Im}\big(e^{(2+i)x}\big), though we proceed elementarily):

f(x)=e2xsin⁡x,f′(x)=2e2xsin⁡x+e2xcos⁡x=e2x(2sin⁡x+cos⁡x).f(x) = e^{2x}\sin x, \qquad f'(x) = 2e^{2x}\sin x + e^{2x}\cos x = e^{2x}(2\sin x + \cos x).

Differentiate again:

f′′(x)=2e2x(2sin⁡x+cos⁡x)+e2x(2cos⁡x−sin⁡x)=e2x(4sin⁡x+2cos⁡x+2cos⁡x−sin⁡x)=e2x(3sin⁡x+4cos⁡x).f''(x) = 2e^{2x}(2\sin x + \cos x) + e^{2x}(2\cos x - \sin x) = e^{2x}(4\sin x + 2\cos x + 2\cos x - \sin x) = e^{2x}(3\sin x + 4\cos x).

Differentiate once more:

f′′′(x)=2e2x(3sin⁡x+4cos⁡x)+e2x(3cos⁡x−4sin⁡x)=e2x(6sin⁡x+8cos⁡x+3cos⁡x−4sin⁡x)=e2x(2sin⁡x+11cos⁡x).f'''(x) = 2e^{2x}(3\sin x + 4\cos x) + e^{2x}(3\cos x - 4\sin x) = e^{2x}(6\sin x + 8\cos x + 3\cos x - 4\sin x) = e^{2x}(2\sin x + 11\cos x).

Now evaluate at x=0x=0 (sin⁡0=0,cos⁡0=1,e0=1\sin 0 = 0, \cos 0 = 1, e^0=1):

f(0)=0,f′(0)=1,f′′(0)=4,f′′′(0)=11.f(0) = 0, \quad f'(0) = 1, \quad f''(0) = 4, \quad f'''(0) = 11.

So the degree-33 Taylor polynomial at a=0a=0 is

P3(x)=0+1⋅x+42!x2+113!x3=x+2x2+116x3.P_3(x) = 0 + 1\cdot x + \frac{4}{2!}x^2 + \frac{11}{3!}x^3 = x + 2x^2 + \frac{11}{6}x^3.

Peano's theorem guarantees f(x)−P3(x)=o(x3)f(x) - P_3(x) = o(x^3) as x→0x \to 0, i.e. lim⁡x→0f(x)−P3(x)x3=0\lim_{x\to0} \frac{f(x)-P_3(x)}{x^3} = 0. We can sanity-check numerically at x=0.1x = 0.1:

f(0.1)=e0.2sin⁡(0.1)≈(1.221402758)(0.099833417)≈0.121964.f(0.1) = e^{0.2}\sin(0.1) \approx (1.221402758)(0.099833417) \approx 0.121964.
P3(0.1)=0.1+2(0.01)+116(0.001)=0.1+0.02+0.0018333=0.1218333.P_3(0.1) = 0.1 + 2(0.01) + \frac{11}{6}(0.001) = 0.1 + 0.02 + 0.0018333 = 0.1218333.

The remainder is R3(0.1)≈0.121964−0.121833=0.000131R_3(0.1) \approx 0.121964 - 0.121833 = 0.000131, and x3=0.001x^3 = 0.001, so R3(0.1)/x3≈0.131R_3(0.1)/x^3 \approx 0.131 — small, consistent with the ratio shrinking further as x→0x \to 0 (one can check at x=0.01x=0.01 the ratio is roughly an order of magnitude smaller, matching the o(x3)o(x^3) prediction). This also matches the Lagrange remainder heuristic: the next term would be f(4)(0)4!x4\frac{f^{(4)}(0)}{4!}x^4, contributing on the order of x4x^4, consistent with R3(x)/x3→0R_3(x)/x^3 \to 0.

Example 2 — a function that is smooth but whose Taylor polynomial is computed at a nonzero, non-nice point, exhibiting the general shift. Let f(x)=ln⁡xf(x) = \ln x and a=2a = 2 (not a=1a=1, to keep the arithmetic honest and avoid disguising the shift). We find the degree-22 Taylor polynomial at a=2a=2 and verify the optimality/uniqueness statement concretely by comparing against a "close but wrong" competitor quadratic. Compute derivatives:

f(x)=ln⁡x,f′(x)=1x,f′′(x)=−1x2.f(x) = \ln x,\quad f'(x) = \frac1x,\quad f''(x) = -\frac{1}{x^2}.

At x=2x=2: f(2)=ln⁡2f(2) = \ln 2, f′(2)=12f'(2) = \tfrac12, f′′(2)=−14f''(2) = -\tfrac14. So

P2(x)=ln⁡2+12(x−2)−18(x−2)2.P_2(x) = \ln 2 + \frac12(x-2) - \frac{1}{8}(x-2)^2.

By the Theorem, ln⁡x−P2(x)=o((x−2)2)\ln x - P_2(x) = o\big((x-2)^2\big) as x→2x \to 2. Now consider the competitor Q(x)=ln⁡2+12(x−2)−19(x−2)2Q(x) = \ln 2 + \frac12(x-2) - \frac{1}{9}(x-2)^2, which differs from P2P_2 only in the quadratic coefficient (−1/9-1/9 instead of −1/8-1/8) — a small, easy-to-miss perturbation. We show QQ fails to satisfy the little-o property, confirming the uniqueness clause of the theorem is not vacuous. Indeed,

f(x)−Q(x)(x−2)2=[f(x)−P2(x)]+[P2(x)−Q(x)](x−2)2=f(x)−P2(x)(x−2)2+(−18+19)\frac{f(x) - Q(x)}{(x-2)^2} = \frac{\big[f(x) - P_2(x)\big] + \big[P_2(x) - Q(x)\big]}{(x-2)^2} = \frac{f(x)-P_2(x)}{(x-2)^2} + \left(-\frac18 + \frac19\right)

since P2(x)−Q(x)=(−18−(−19))(x−2)2=(−172)(x−2)2P_2(x) - Q(x) = \left(-\frac18 - \left(-\frac19\right)\right)(x-2)^2 = \left(-\frac{1}{72}\right)(x-2)^2, so dividing by (x−2)2(x-2)^2 contributes the constant −172-\frac{1}{72}. As x→2x \to 2, the first term →0\to 0 by the Theorem, so

lim⁡x→2f(x)−Q(x)(x−2)2=−172≠0.\lim_{x\to 2} \frac{f(x)-Q(x)}{(x-2)^2} = -\frac{1}{72} \ne 0.

So QQ's error is not o((x−2)2)o\big((x-2)^2\big) — it is only O((x−2)2)O\big((x-2)^2\big), a strictly weaker statement, even though QQ and P2P_2 agree in value and first derivative at a=2a=2 (one checks Q(2)=ln⁡2=f(2)Q(2)=\ln2=f(2) and Q′(2)=12=f′(2)Q'(2) = \frac12 = f'(2), but Q′′(2)=−29≠−14=f′′(2)Q''(2) = -\frac29 \ne -\frac14 = f''(2)). This confirms concretely that even an infinitesimally "close" wrong second derivative destroys the little-o rate — exactly what the uniqueness half of the theorem predicts.

CounterexampleWhy existence of f(n)(a)f^{(n)}(a) alone (not merely near aa) is essential, and why we cannot weaken to "f(n)f^{(n)} exists near aa but not at aa"

The theorem's hypothesis is that f,…,f(n−1)f, \dots, f^{(n-1)} exist on the interval II and that f(n)(a)f^{(n)}(a) exists at the point aa. One might wonder whether the weaker-looking hypothesis "f(n−1)f^{(n-1)} exists on II" is by itself enough to get an o((x−a)n)o\big((x-a)^n\big) remainder for the naturally defined polynomial using one-sided or nearby derivative data — it is not: differentiability at aa itself is indispensable, not just nearby. Concretely, take n=2n = 2, a=0a = 0, and define

f(x)={x2sin⁡(1/x)x≠00x=0.f(x) = \begin{cases} x^2 \sin(1/x) & x \ne 0 \\ 0 & x = 0.\end{cases}

Then ff is differentiable everywhere (including at 00, where f′(0)=lim⁡h→0h2sin⁡(1/h)−0h=lim⁡h→0hsin⁡(1/h)=0f'(0) = \lim_{h\to0} \frac{h^2\sin(1/h) - 0}{h} = \lim_{h\to0} h\sin(1/h) = 0 by the squeeze theorem), and for x≠0x \ne 0,

f′(x)=2xsin⁡(1/x)−cos⁡(1/x).f'(x) = 2x\sin(1/x) - \cos(1/x).

This f′f' exists on all of R\mathbb{R}, satisfying "f′f' exists on II" — the hypothesis needed for the degree-1 theorem to apply to ff. But f′f' is not continuous at 00 (indeed lim⁡x→0f′(x)\lim_{x\to0} f'(x) does not exist, since −cos⁡(1/x)-\cos(1/x) oscillates), so in particular f′f' is not differentiable at 00: f′′(0)f''(0) does not exist. Thus ff fails the hypothesis needed to build a degree-2 Taylor polynomial at a=0a=0 with the little-o guarantee — and indeed there is no reasonable way to assign a "curvature at 00" to this ff that would make a quadratic approximation beat the linear one in the o-rate sense, because f′f' has no derivative there at all. To see the consequence of trying to force the issue: the degree-1 (tangent line) polynomial is P1(x)=f(0)+f′(0)x=0P_1(x) = f(0) + f'(0)x = 0, and indeed lim⁡x→0f(x)−P1(x)x=lim⁡x→0xsin⁡(1/x)=0\lim_{x\to 0}\frac{f(x)-P_1(x)}{x} = \lim_{x\to0} x\sin(1/x) = 0, so the degree-1 statement holds fine (only f′′(0)f''(0)'s absence is the problem). But if one tries to write down any candidate quadratic Q(x)=c2x2Q(x) = c_2 x^2 (matching Q(0)=0=f(0)Q(0)=0=f(0), Q′(0)=0=f′(0)Q'(0)=0=f'(0), for any real c2c_2) and test whether f(x)−Q(x)=o(x2)f(x) - Q(x) = o(x^2), we get

f(x)−Q(x)x2=sin⁡(1/x)−c2,\frac{f(x)-Q(x)}{x^2} = \sin(1/x) - c_2,

whose limit as x→0x \to 0 does not exist for any choice of c2c_2, since sin⁡(1/x)\sin(1/x) oscillates between −1-1 and 11 infinitely often near 00. So no quadratic polynomial achieves the o(x2)o(x^2) remainder — the conclusion of the theorem genuinely fails, exactly because the hypothesis "f′′(0)f''(0) exists" fails. This shows the point-hypothesis is not a technicality: dropping it can destroy the very existence of a best quadratic local model, not just its identity.

Scope, edge cases & common traps

SituationWhat holdsWhat can fail
f(n)(a)f^{(n)}(a) exists, f,…,f(n−1)f,\dots,f^{(n-1)} exist on IIPeano remainder o((x−a)n)o((x-a)^n); PnP_n unique with this property—
f(n)f^{(n)} exists and is continuous on all of II (stronger)Peano holds, and Lagrange/integral remainder formulas also apply, giving quantitative boundsPeano alone gives no explicit bound on how fast the error shrinks, only that it is eventually smaller than any fixed multiple of (x−a)n(x-a)^n
f(n−1)f^{(n-1)} exists on II but f(n)(a)f^{(n)}(a) fails to existNo canonical degree-nn model with the o((x−a)n)o((x-a)^n) property need existSee the Weierstrass-type pathological function counterexample above
ff real-analytic at aa (Taylor series converges to ff nearby)Peano holds for every nn, and remainders →0\to 0 as n→∞n \to \infty for xx in the radius of convergencePeano's theorem itself says nothing about convergence of the series; that is a separate, much stronger property
Uniqueness clauseOnly guaranteed among polynomials of degree ≤n\le nA non-polynomial function can also satisfy f(x)−g(x)=o((x−a)n)f(x)-g(x) = o((x-a)^n) without being PnP_n — uniqueness is only among competitors that are polynomials

The mathematician behind it

Origins · 1 minBrook Taylor and how this was discovered
BT
Brook Taylor
1685–1731 · Early 18th-century England, Royal Society

An English mathematician and secretary of the Royal Society, Taylor published the general series expansion bearing his name in Methodus Incrementorum Directa et Inversa (1715), building on earlier special cases known to Gregory, Newton, and Leibniz. Taylor's original motivation was rooted in the calculus of finite differences: he derived the series as a continuous limit of interpolation formulas, rather than through a modern remainder-based derivation. The precise error analysis — including forms named after Lagrange and, much later, Peano — was developed over the subsequent century as the foundations of analysis were made rigorous.

History
- 1671–1691: James Gregory and Isaac Newton independently discover special-case power series expansions for specific functions, without a general theory or remainder estimate.
- 1715: Brook Taylor publishes the general series expansion in Methodus Incrementorum Directa et Inversa, giving the formula now bearing his name.
- 1742: Colin Maclaurin popularizes and elaborates the special case at a=0a=0 (now called the Maclaurin series) in his Treatise of Fluxions.
- 1797: Joseph-Louis Lagrange gives the mean-value form of the remainder, providing the first rigorous quantitative error bound, in Théorie des fonctions analytiques.
- 1884: Giuseppe Peano formulates the qualitative little-o remainder theorem treated here, isolating the minimal hypothesis (a single derivative at one point) needed for local polynomial optimality.
Does Peano's theorem tell us the Taylor series of ff converges to ff?

No. Peano's theorem is purely a statement about a fixed, finite nn: it says the degree-nn remainder shrinks faster than (x−a)n(x-a)^n as x→ax \to a, for that one nn. It says nothing about what happens as n→∞n \to \infty for a fixed x≠ax \ne a. Convergence of the infinite Taylor series to ff on some interval is a separate and much stronger property called real-analyticity, which can fail even for infinitely differentiable functions — the classic example being f(x)=e−1/x2f(x) = e^{-1/x^2} (with f(0)=0f(0)=0), whose Taylor series at 00 is identically zero but which is not the zero function anywhere else. So "the Peano remainder →0\to 0 for each nn" is compatible with "the Taylor series does not converge to ff at all" for x≠ax \ne a.

If ff is a polynomial itself, what does Peano's theorem give us?

Nothing new beyond the trivial statement that a polynomial equals its own Taylor polynomial of matching or higher degree, which is exactly the content of the Lemma used inside the proof. If deg⁡f≤n\deg f \le n, then Pn=fP_n = f exactly, so the remainder Rn(x)=f(x)−Pn(x)≡0R_n(x) = f(x)-P_n(x) \equiv 0, and the limit 0/(x−a)n=00/(x-a)^n = 0 trivially. The theorem becomes interesting precisely when ff is not a polynomial (or has degree exceeding nn), because then RnR_n is generally a genuinely nonzero function, and the content of the theorem is the nontrivial claim that it still vanishes faster than (x−a)n(x-a)^n.

Can the Peano remainder theorem be extended to functions of several variables?

Yes, and the extension is a cornerstone of multivariable calculus. If f:Rm→Rf: \mathbb{R}^m \to \mathbb{R} has all partial derivatives up to order n−1n-1 near a point a\mathbf{a} and all nn-th order partials exist at a\mathbf{a}, one builds a multivariable Taylor polynomial (a sum of terms involving mixed partials and products of coordinate differences), and an analogous theorem shows the remainder is o(∥x−a∥n)o(\|\mathbf{x}-\mathbf{a}\|^n). The proof strategy is similar in spirit — reduce to the one-variable case along line segments through a\mathbf{a} — though the bookkeeping of mixed partials is heavier. This multivariable version underlies, for instance, the second-derivative (Hessian) test for local extrema in several variables.

Why does the proof require induction rather than a single direct computation?

Because L'Hôpital's rule, the working tool at each stage, converts a limit about (f−Pn)/(x−a)n(f-P_n)/(x-a)^n into a limit about (f′−Pn′)/(x−a)n−1(f'-P_n')/(x-a)^{n-1} — reducing the degree by exactly one each time, but at the cost of shifting attention to the derivative function f′f'. There is no direct one-step formula turning nn-th order derivative information into the o((x−a)n)o((x-a)^n) estimate without passing through all the intermediate orders, because each application of L'Hôpital's rule needs its own 0/00/0 indeterminate form and its own hypotheses verified at the next order down. Induction is the natural bookkeeping device for chaining nn such applications together rigorously.

Is Peano's remainder theorem still true if we only assume f(n)f^{(n)} exists in a punctured neighborhood of aa, but not at aa itself?

No — the theorem can fail entirely, and worse, there may be no polynomial with the claimed property, as the article's counterexample demonstrates for n=2n=2. The existence of f(n)(a)f^{(n)}(a) at the point aa is what supplies the coefficient f(n)(a)/n!f^{(n)}(a)/n! used to build PnP_n in the first place; without it, there is no natural degree-nn term to add, and even if one guesses a coefficient, the oscillatory or otherwise irregular behavior of f(n)f^{(n)} near (but not at) aa can prevent any choice from achieving the o((x−a)n)o((x-a)^n) rate.

How does this relate to the tangent line's optimality among all lines?

The n=1n=1 case of Peano's theorem is precisely the statement that the tangent line y=f(a)+f′(a)(x−a)y = f(a) + f'(a)(x-a) is the unique line whose error vanishes faster than x−ax-a itself — which is just a repackaging of the definition of the derivative, f′(a)=lim⁡x→af(x)−f(a)x−af'(a) = \lim_{x\to a}\frac{f(x)-f(a)}{x-a}. So Peano's theorem for general nn is best understood as the natural higher-order generalization of "the derivative is the slope of the best linear local approximation," with "best" now meaning "matching to order nn" rather than merely "matching to order 11."

Does a smaller remainder for larger nn mean PnP_n is always a numerically better approximation than Pn−1P_{n-1} at a fixed nearby xx?

Usually, but not provably from Peano's theorem alone, and not universally. Peano's theorem is an asymptotic (x→ax \to a) statement; it guarantees that eventually, as xx gets sufficiently close to aa, PnP_n outperforms any lower-degree polynomial, including Pn−1P_{n-1}, in the sense that its relative error decays faster. But at a fixed xx some distance from aa, it is entirely possible (especially for functions with small radius of convergence or with large higher derivatives) for Pn−1P_{n-1} to happen to be numerically closer to f(x)f(x) than PnP_n is. Guaranteeing improvement at a specific fixed xx requires the quantitative Lagrange or integral remainder, not Peano's qualitative one.

Before this

Where this leads