My textbook Elementary Classical Analysis claims that by Darboux's theorem (the intermediate value theorem for derivatives), if a function $f:\mathbb{R}\to \mathbb{R}$ has a nonzero derivative on $\mathbb{R}$, then is $f$ strictly monotonic (i.e., either ${f}^{\prime}(x)>0$ on $\mathbb{R}$ or ${f}^{\prime}(x)<0$ on $\mathbb{R}$).

The claim is definitely true if ${f}^{\prime}s$ domain were instead a closed interval, but since $\mathbb{R}$ is open, I don't understand why Marsden's claim should be true.

The claim is definitely true if ${f}^{\prime}s$ domain were instead a closed interval, but since $\mathbb{R}$ is open, I don't understand why Marsden's claim should be true.