# Is a smooth function characterized by its value on any (non-empty) open interval?

Do there exist smooth $f,g : \mathbb{R} \to \mathbb{R}$ such that $f \neq g$, but $f(x) = g(x)\ \ \forall\ x \in (a, b)$ (assume $a < b$)?

#### Solutions Collecting From Web of "Is a smooth function characterized by its value on any (non-empty) open interval?"

Canonical example:

$$f(x) = \begin{cases} e^{-\frac 1x} &\text{if }x>0 \\ 0 &\text{if }x\le 0\end{cases}$$

is smooth and equal to the zero function on the interval $(-\infty, 0)$, but is not the zero function.