A couple of days ago, Rohan Didmishe shared this problem with us: show that the function defined by \[ f\colon \mathbb{R} \to \mathbb{R}, \qquad f(x) = \begin{cases} x + x^2\sin(1 / x), &\text{ if }x \neq 0, \\ 0, &\text{ if } x = 0. \end{cases} \] is not monotonic (increasing or decreasing) in any interval $(-\delta, \delta)$ around zero.
Graphing this function (say, using Desmos) shows that it oscllates rapidly, curving up and down with increasing frequency the closer its gets to zero. This is due to the $x^2\sin(1 / x)$ term; the $x$ added in front 'tilts' the curve upwards.
The first thing to look at is the derivative of $f$. Using $\lim_{x \to 0} x\sin(1 / x) = 0$ and the chain rule, we can compute \[ f'(x) = \begin{cases} 1 + 2x\sin(1 / x) - \cos(1 / x), &\text{ if }x \neq 0, \\ 1, &\text{ if } x = 0. \end{cases} \] Specifcally, $f'(0) = 1$ which seems to tell us that $f$ is increasing at $0$ ... or does it? This is a good time to revisit the relationship between monotonicity and the first derivative.
Theorem: If a real valued, differentiable function $f$ satisfies $f'(x) > 0$ for all $x \in (a, b)$, then $f$ is monotonically increasing on the interval $(a, b)$.
This is a simple consequence of the Mean Value Theorem. An analogous result holds for $f'(x) < 0$ and monotonically decreasing functions.
What can we say about the converse?
Theorem: If a real valued, differentiable function $f$ is monotonically increasing on an interval $(a, b)$, then $f$ satisfies $f'(x) \geq 0$ for all $x \in (a, b)$.
This follows from the definition of $f'(x)$ as a limit of a fraction. Note that we cannot conclude that $f'$ is strictly positive; the function $x \mapsto x^3$ should spring to mind. What we can say about our original function $f$ is this: if we can find points $x, y \in (-\delta, \delta)$ where $f'(x) < 0$ and $f'(y) > 0$, then $f$ cannot be monotonically increasing, nor decreasing on that interval. The latter is easy, since $f'(0) = 1 > 0$, but finding suitable $x$ requires a bit of work.
The first instinct is to look at 'special' points where the $\sin$ and $\cos$ terms behave nicely. Indeed, any interval $(-\delta, \delta)$ must contain points of the form $1 / 2n\pi$ for large enough $n$, and at these points, \[ f'\left(\frac{1}{2n\pi}\right) = 1 + \frac{2}{2n\pi}\sin(2n\pi) - \cos(2n\pi) = 1 + 0 - 1 = 0. \] This is not quite what we want, but we are close! A look at the graph of $f'$ might help here.
The curve does indeed dip below zero every oscillation; to find out where, perturb our candidate point slightly to the right, giving $x = 1 / (2n\pi - \epsilon)$. In doing so, the $-\cos(1 / x)$ term increases from $-1$ to $-\cos(\epsilon)$, and the $2x\sin(1 / x)$ term decreases from $0$ to $-2\sin(\epsilon)/ (2n\pi - \epsilon)$. We hypothesize that for small enough $\epsilon$, the decrease in the $\sin$ term will offset the increase in the $\cos$ term, making $f'(x) < 0$. Indeed, calculate \[ f'\left(\frac{1}{2n\pi - \epsilon}\right) = 1 - \frac{2}{2n\pi - \epsilon}\sin(\epsilon) - \cos(\epsilon). \] Now it's time to use a couple of estimates; for $0 < \epsilon < \pi / 2$, we have \[ 1 - \cos(\epsilon) < \frac{1}{2}\epsilon^2, \qquad \sin(\epsilon) > \epsilon - \frac{1}{6}\epsilon^3. \] Incidentally, these can all be deduced using the previous theorems along with $\cos(\epsilon) < 1$. Plugging these into our formula, \[ f'\left(\frac{1}{2n\pi - \epsilon}\right) < \frac{\epsilon^2}{2} - \frac{2(\epsilon - \epsilon^3 / 6)}{2n\pi - \epsilon} = \frac{-2\epsilon + n\pi\epsilon^2 - \epsilon^3 / 6}{2n\pi - \epsilon}. \] Finally, it's time to make a concrete choice for $\epsilon$; set $\epsilon = 1 / n^2$, whence the numerator \[ -2\epsilon + n\pi\epsilon^2 - \frac{1}{6}\epsilon^3 = \epsilon\left(-2 + \frac{\pi}{n}\right) - \frac{1}{6}\epsilon^3. \] Clearly for sufficiently large $n > \pi / 2$, this is negative, which is exactly what we want!
Summarizing our argument, suppose that $f$ is monotonic in some $(-\delta, \delta)$. Since $f'(0) > 0$, it must be monotonically increasing on that interval. However, for sufficiently large $n$, we have $x_n = 1 / (2n\pi - 1 / n^2) \in (-\delta, \delta)$ and $f'(x_n) < 0$, which is a contradiction! Thus, $f$ cannot be monotonic on $(-\delta, \delta)$.
This particular function is an imporant example of the fact that the derivative of a function at a particular point ($f'(0)$ in this case) does not reveal its monotonicity. We end with the following result, assuming a slightly stronger condition; if you can justify it, do share in the comments below.
Theorem: If a real valued, differentiable function $f$ satisfies $f'(x) > 0$ for some particular $x$, and the derivative $f'$ is continuous, then $f$ is monotonically increasing on some open neighbourhood of $x$.
Comments
Post a Comment