# Is there a function $f(x)$ which is defined near $x = c$ and infinitely differentiable near $x = c$ and satisfy the following properties

Is there a function $f(x)$ which is defined near $x = c$ and infinitely differentiable near $x = c$ and satisfy the following properties:

For any positive real number $\delta$,

there exist real numbers $x, x^{'}$ such that $c - \delta < x, x^{'} < c$ and $f(x) > f(c)$ and $f(x^{'}) < f(c)$ .

For any positive real number $\delta$,

there exist real numbers $x, x^{'}$ such that $c < x, x^{'} < c + \delta$ and $f(x) > f(c)$ and $f(x^{'}) < f(c)$ .

Yes. Define the function $f$ for positive $x$ by $$f (x) = e^{-1/x}\sin (1/x),$$ by $f (0) = 0$ and by $f (-x) = f (x)$. Take $c=0$.
Let $f(x) = 0$, for $x \leq 0$ and $f(x) = e^{-\frac{1}{x}} \sin \frac{1}{x}$ for $x > 0.$
For any positive integer $n$ and $x > 0$ $f(x) = \dfrac{e^{-\frac{1}{x}}}{x^{n+1}}\times x^{n+1} \sin \frac{1}{x}$ which shows $f(x)$ is differentiable $n$ times at $0$ and $f^{n}(0)=0.$
$f(x)$ changes sign on $(0,\delta)$ for any $\delta > 0$.