Let $I$ be an interval containing more than one point and $f: I \rightarrow \mathbb{R}$ be any function.
(i) Assume that $f$ is differentiable. If $f^{\prime}$ is nonnegative on $I$ and $f^{\prime}$ vanishes at only a finite number of points on any bounded subinterval of $I$, then show that $f$ is strictly increasing on $I$.
(ii) Assume that $f$ is twice differentiable. If $f^{\prime \prime}$ is nonnegative on $I$ and $f^{\prime \prime}$ vanishes at only a finite number of points on any bounded subinterval of $I$, then show that $f$ is strictly convex on $I$.
(iii) Consider $f: \mathbb{R} \rightarrow \mathbb{R}$ given by $f(x)=(x-2 n)^{3}+2 n$, where $n \in \mathbb{Z}$ is such that $x \in[2 n-1,2 n+1) .$ Show that $f$ is differentiable on $\mathbb{R}$ and $f^{\prime \prime}$ exists on $(2 n-1,2 n+1)$, but $f_{+}^{\prime \prime}(2 n+1)=6$, whereas $f_{-}^{\prime \prime}(2 n+1)=-6$
for each $n \in \mathbb{N} .$ Also show that $f$ is strictly increasing on $\mathbb{R}$ although $f^{\prime}(2 n)=0$ for each $n \in \mathbb{N}$. (Compare (i) above and Exercise 12 in the list of Revision Exercises at the end of Chapter 7.)
(iv) Consider $g: \mathbb{R} \rightarrow \mathbb{R}$ given by $g(x)=(x-2 n)^{4}+8 n x$, where $n \in \mathbb{Z}$ is such that $x \in[2 n-1,2 n+1) .$ Show that $g$ is twice differentiable on $\mathbb{R}$ and $g^{\prime \prime \prime}$ exists on $(2 n-1,2 n+1)$, but $g_{+}^{\prime \prime \prime}(2 n+1)=24$, whereas
$g_{-}^{\prime \prime \prime}(2 n+1)=-24$ for each $n \in \mathbb{N} .$ Also show that $g$ is strictly convex on $\mathbb{R}$ although $g^{\prime \prime}(2 n)=0$ for each $n \in \mathbb{N}$. (Compare (ii) above and Exercise 13 in the list of Revision Exercises at the end of Chapter $7 .$ )