Can anyone please come up with an example of an injective function that is neither ascending nor descending on the interval $[1,3]$?
2026-04-17 12:45:13.1776429913
On
An injective function that is neither ascending nor descending
116 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
Bit string expansions are a rich source of counterexamples of this sort. Let $x=n.b_1b_2\dots$ be the ternary (base-3) expansion of $x$ (not ending in an infinite sequence of $2$s), and define $f(x)=n.\bar b_1\bar b_2\dots$ where $\bar 0=0$, $\bar 1=2$, and $\bar 2=1$. Then $f$ is injective, and it is neither increasing or decreasing on any open interval, because every open interval contains $[n.b_1\dots b_k0,n.b_1\dots b_k2]$ for some $n,b_1,\dots,b_k$, and then $$n.\bar b_1\dots \bar b_k0<n.\bar b_1\dots \bar b_k2>n.\bar b_1\dots \bar b_k1$$ $$f(n.b_1\dots b_k0)<f(n.b_1\dots b_k1)>f(n.b_1\dots b_k2).$$
Thus $f$ is neither increasing or decreasing on this interval.
Define $f(x)=x$ if $x \in [1,2]$ and $f(x)=-x$ if $x \in (2,3]$ .