Is there a pathological yet continuous function $\ f:\mathbb{R}\to\mathbb{R}\ $ such that:
For every $\ x\in\mathbb{R}\ $ and $\ \delta>0,\ \exists\ a,b,\ $ both in $\ (x,x+\delta),\ $ such that $\ f(a)<f(x)<f(b)\qquad (*)\quad ? $
This makes me think of Weierstrass function because it is nowhere increasing and nowhere decreasing. However, at some points of the Weierstrass function a local maximum is attained. Let $\ x\ $ be a local maximum. Then by definition of local maximum, $\ \exists\ \delta>0\ $ such that $\ a\in(x,x+\delta)\implies f(a)\leq f(x).\ $ Therefore the Weierstrass function does not satisfy $\ (*).$
Maybe such a function is well known? Or if not, I was wondering if we can construct such a function using transfinite induction/recursion, although it might be difficult to prove that the function remains continuous in the limit case?
Or maybe there is some clever argument that any real function with the property $\ (*)\ $ cannot be continuous everywhere (in particular, the function cannot be continuous at $ x)$ ?
Suppose that such a function exists.
Take any interval $[u, v]\subseteq\mathbb R, u<v$. As it is well known, the (continuous) function $f$ reaches a maximum somewhere on $[u,v]$. If the maximum is reached in any point $x\in [u, v)$, then take $\delta=v-x$ and for all $b\in(x, x+\delta)$ you will have $f(b)\le f(x)$.
This means that the maximum is reached in $v$ only, i.e. $f(x)<f(v)$ for all $x\in[u,v)$. In particular, $f(u)<f(v)$. As $u<v$ were arbitrary, this then implies the $f$ is strictly increasing, which is impossible (it will be impossible to find $a$ for any $x, \delta$).
This contradiction proves that the function with properties given in your question does not exist.