Skip to main content

Monotonic functions and the first derivative

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

Popular posts from this blog

Why am I frequently meeting my crush?

Gourav Banerjee, a 21MS student, goes to the main canteen of IISER Kolkata for dinner at some arbitrarily scheduled time between 8 and 9 pm. He frequently meets an anonymous, beautiful girl in the mess and begins to wonder whether the girl is stalking him or if their meeting is just a coincidence. So he tries to compute the probability of meeting that girl in the mess during dinner time given the following constraints: Both Gourav and the girl go to mess for having dinner at some random time between 8 - 9 pm. Because of the Queue at the mess, both stay in the mess for minimum of 30 min. What do you think? Solution Let $x$ denote the time when Gourav enters the mess and let y denote the time when girl enters the mess. Here we take origin to be the 8 pm mark and a distance of 1 unit represents 1 hour on both $x$ and $y$ axis so all possible coordinates within the unit square $ABCD$ represents an event where Gourav and the girl both visit the canteen. Now the favourable coordinates which ...

The height of probabilistic interpretation

Girls only love men as tall as 6' and above. Socrates, ca. 2023 It is undeniable that heights strongly influence our daily lives. Be it our heights, or the height of a mountain we scale, or the height of all problems - humans. Mathematics too hasn't been able to escape its clutches, with height functions being useful in several fields, including but not limited to - Diophantine Geometry, Automorphic forms and the Weil-Mordell theorem - something you should have heard before if you attend my talks. If you have attended school (or maybe you are a climate activist) - then try recalling the elementary school days when fractions were introduced. Albeit unknowingly, but we had as children classified fractions into proper and improper - based on whether the denominator was larger than the numerator or vice versa. Well, it seems mathematicians have stuck with this classification - giving us the crux of todays discussion - height of a rational number. Given a rational number $x=\frac mn...