A less-known example is $f(x):=x^2+\exp(-1/(100(x-1))^2)-1$ on the closed interval $[-2,2]$. See that discussion in MaplePrimes for more details.
user64494
- 3.5k
- 14
- 22