Discontinuous Differentiable and One to One If the derivative of a function (from $\mathbb{R} \rightarrow \mathbb{R}$) at a point $x_0$ is discontinuous, does that imply that the function is not one to one or injective in a neighborhood of $x_0$? 
If not, how does one go in showing that the function is not injective at $x_0$ given that the derivative of the function is discontinuous at $x_0$. 
My thoughts: Since the function's derivative is not always positive or negative, then the function is not injective because it is neither always decreasing or always increasing. Does that sound right? 
 A: No, such a function can still be one-to-one in a neighborhood of $x_0$.
To see this, start with the usual example of a differentiable function with discontinuous derivative, i.e. $f(0) := 0$ and
$$
f(x) := x^2 \cdot \sin(1/x) \text{ for } x\neq 0 .
$$
It is not hard to see that $f$ has derivative $0$ at $0$. Away from the origin, the derivative is given by
$$
f'(x) = 2x \cdot \sin(1/x) + x^2 \cdot \cos(1/x) \cdot (-1/x^2) = 2x \cdot \sin(1/x) - \cos(1/x).
$$
Observe that $f'$ is bounded on every bounded set, in particular on $(-1,1)$ (for example $|f'(x)| \leq 3$ on this interval).
Hence, if we set $g(x) := 1000 \cdot x + f(x)$, then $g'(x) = 1000 + f'(x) > 0$ on $(-1,1)$, so that $g$ is one-to-one on $(-1,1)$, but $g'$ is not continuous at $0$ (otherwise $f' = g' - 1000$ would be continuous).
EDIT: By modifying this example (truncate $f$ smoothly to have compact support), one can even construct such a function with the property that $g : \Bbb{R} \to \Bbb{R}$ is a bijection (homeomorphism).
