Maths WorkshopMaths problems with full solutions
Exercise 2083Calculus › Single-variable calculus › Differentiation › Taylor expansionsM1Added 3 Nov 2026

A smooth function that is not its Taylor series

#flat function#smooth#analytic#counterexample

Statement

Let f(x)=e−1/x2f(x)=e^{-1/x^2} for x≠0x\ne0 and f(0)=0f(0)=0.

  1. Show that for x≠0x\ne0 and n≥0n\ge0, f(n)(x)=Pn ⁣(1x)e−1/x2f^{(n)}(x)=P_n\!\left(\frac1x\right)e^{-1/x^2} for a polynomial PnP_n.
  2. Show that ff is infinitely differentiable at 00 with f(n)(0)=0f^{(n)}(0)=0 for all nn.
  3. Conclude that ff is not equal to its Taylor series on any neighbourhood of 00.
Hint

Use the fact that lim⁡u→∞uke−u2=0\lim_{u\to\infty}u^ke^{-u^2}=0 for every kk.

Show solutionHide solution

Solution

1. By induction: f=P0(1x)e−1/x2f=P_0\left(\frac1x\right)e^{-1/x^2} with P0=1P_0=1. If f(n)=Pn(1/x)e−1/x2f^{(n)}=P_n(1/x)e^{-1/x^2}, then
f(n+1)=(−1x2Pn′ ⁣(1x)+2x3Pn ⁣(1x))e−1/x2.f^{(n+1)}=\left(-\frac1{x^2}P_n'\!\left(\frac1x\right)+\frac2{x^3}P_n\!\left(\frac1x\right)\right)e^{-1/x^2}.
Writing u=1xu=\frac1x this is (−u2Pn′(u)+2u3Pn(u))e−u2\bigl(-u^2P_n'(u)+2u^3P_n(u)\bigr)e^{-u^2}, so Pn+1(u)=2u3Pn(u)−u2Pn′(u)P_{n+1}(u)=2u^3P_n(u)-u^2P_n'(u) is a polynomial.

2. For every polynomial PP, P ⁣(1x)e−1/x2→0P\!\left(\frac1x\right)e^{-1/x^2}\to0 as x→0x\to0 (put u=1x→±∞u=\frac1x\to\pm\infty). Suppose f(n)(0)=0f^{(n)}(0)=0. Then
f(n)(x)−f(n)(0)x=1xPn ⁣(1x)e−1/x2→0,\frac{f^{(n)}(x)-f^{(n)}(0)}x=\frac1xP_n\!\left(\frac1x\right)e^{-1/x^2}\to0,
so f(n+1)(0)=0f^{(n+1)}(0)=0. Induction on nn.

3. The Taylor series of ff at 00 is identically 00, while f(x)>0f(x)>0 for every x≠0x\ne0. So ff is not equal to its Taylor series on any interval around 00.

Remark. Smooth (C∞C^\infty) does not imply analytic. This function is the standard building block for bump functions and partitions of unity in analysis.