Real Analysis – Examples of Non-Uniformly Continuous, Non-Differentiable, Non-Periodic Functions

derivativesreal-analysisuniform-continuity

Let $I\subseteq\mathbb{R}$ and $f:I\to\mathbb{R}.$

$(0)$ If $f$ is discontinuous on $I$, then it is not uniformly continuous.

$(1)$ Suppose $I$ is open and bounded. If $f$ is unbounded on $I$, then it is not uniformly continuous. Otherwise, let $I=(a,b)$. If we can extend $f$ to $[a,b]$ by continuity, i.e. define $f^*(x):=\begin{cases}\lim\limits_{x\to a^+} f(x) & x=a \\ f(x) & x\in(a,b)\\ \lim\limits_{x\to b^-}f(x) & x=b\end{cases},$ $f^*$ is continuous on its domain, which is compact, and thus uniformly continuous by Heine-Cantor's theorem. Hence, so it is on $(a,b)$. If, instead, at least one of the limits above does not exist, say as $x\to a^+$, then there exist real sequences $x_n, y_n\to a^+$ such that $\lvert f(x_n)-f(y_n)\rvert\not\to0,$ implying that $f$ is not uniformly continuous.

$(2)$ If $I$ is closed and bounded, then it is compact: a trivial adaptation of $(1)$ applies.

$(3)$ Suppose $I$ is open and unbounded, say $I=(a,\infty)$; in view of $(1)$, let $f(x)\underset{x\to a^+}\longrightarrow l\in\mathbb{R}.$
If $f(x)\underset{x\to\infty}\longrightarrow L\in\mathbb{R}$ then $f$ is u.c., because, by Heine-Cantor, so is its continuous extension $\overline{f}$ to $[a,\infty]\subset\overline{\mathbb{R}}$ (similarly as in $(1)$). Otherwise, let $f$ be differentiable. If $\limsup\limits_{x\to\infty}\lvert f'(x)\rvert= \infty$ then $f$ is not u.c. by the mean value theorem, whereas if $f'$ is bounded, $f$ is lipschitzian and thus the same theorem implies u.c. Finally, assume $f'$ is unbounded on $(a,b]$ (doesn't matter if not defined on some $(\alpha,\beta]\subseteq(a,b]$) and defined and bounded elsewhere. $f$ is u.c. on $(a,b]$ because so is $f^*$ on $[a,b]$ , as well as on $(b,\infty)$, due to being lipschitzian there. By the continuity of $f$ at $b$, it suffices to make $x\in(a,b]$
and $y\in(b,\infty)$ sufficiently close to $b$ in order to have them satisfy the condition of u.c. Therefore, we conclude $f$ is u.c. on $I$.

$(4)$ If $I$ is closed and unbounded, a trivial adaptation of $(3)$ applies.

So one may note that the only functions whose uniform continuity is really interesting to investigate, are the ones defined on an unbounded interval, being globally continuous, non-periodic and non-differentiable on an unbounded subinterval of their domain. Do we know such functions, both uniformly and not uniformly continuous?

Best Answer

So one may note that the only functions whose uniform continuity is really interesting to investigate, are the ones defined on an unbounded interval, being globally continuous, non-periodic and non-differentiable on an unbounded subinterval of their domain.

At risk of contradicting this assessment, not all subsets of the real line are intervals, and there are important examples and non-examples whose domain is not an interval.


  • The cube root function $f(x) = \sqrt[3]{x}$ is uniformly continuous (but not Lipschitz) on the real line, unbounded, non-differentiable at the origin, and has unbounded derivative (near $0$).

  • Let $n \geq 4$ be an integer. The function $$ f(x) = \frac{\sin(x^{n})}{1 + x^{2}} $$ is real-analytic, bounded, and uniformly continuous (because it extends continuously over $\pm\infty$), but its derivative is easily checked to be unbounded as $|x| \to \infty$. That is, some claims inĀ (3) are not OK.

  • Monotonicity does not prevent examples of the preceding type. Let $(a_{k})_{k=1}^{\infty}$ be a summable sequence of positive real numbers, and let $g$ be the continuous function whose graph is the sum of triangular spikes of height $k$ and area $a_{k}$ centered at $k$. The function $$ f(x) = \int_{0}^{x} g(t)\, dt $$ is bounded, continuously-differentiable (particularly, continuous), and monotone, hence uniformly continuous, but $\limsup f' = \infty$. This type of example can easily be made smooth (not merely $C^{1}$).

  • Let $(a_{k})_{k=1}^{\infty}$ be a sequence of positive real numbers, and let $(x_{k})_{k=1}^{\infty}$ be an enumeration of the rationals. Let $$ H(x) = \begin{cases} 0 & x < 0, \\ 1 & 0 \leq x, \end{cases} $$ be the Heaviside step function, and define $$ g(x) = \sum_{x_{k} < x} a_{k} H(x - x_{k}), $$ with the sum extending over all $k$ with $x_{k} < x$. It's straightforward to check that $g$ is strictly monotone (hence integrable), has a jump discontinuity of size $a_{k}$ at $x_{k}$ for each $k$ and is continuous at every irrational number, and is bounded if and only if $(a_{k})$ is summable. Defining $$ f(x) = \int_{0}^{x} g(t)\, dt $$ defines a continuous function that is non-differentiable at every rational, differentiable at every irrational, and is uniformly continuous if and only if $(a_{k})$ is summable.

  • Incidentally, every real-valued function defined on the integers (or on any set having no real limit points) is uniformly continuous.

Conversely,

  • The signum function $\operatorname{sgn}(x) = \dfrac{x}{|x|}$, $x \neq 0$, is locally constant (derivative identically zero) but (because it has no continuous extension to $0$) not uniformly continuous on its domain. This is closely related to a branch of polar angle function $\theta$ defined on a slit plane, which is differentiable on a connected set (and can be arranged to have bounded gradient), but not uniformly continuous.

  • If $n \geq 2$ is an integer, then $f(x) = \sin(x^{n})$ is real-analytic and bounded, but of course not uniformly continuous. (This may contradict the claim in the comments that "...if all the "pieces" are uniformly continuous, then the "whole" can be shown to be as well simply by splitting the nasty subinterval in the nice smaller subintervals and proceed as in the last part of (3)." Specifically, if you split the real line into intervals of non-negativity and non-positivity, then $f$ is uniformly continuous on each subinterval. You need "uniform uniform continuity" to make the proposed argument work.)