Lecture 5. Limits and Continuity

Motivation

Definitions (Limit and Continuity)

Let $(X, d_X)$ and $(Y, d_Y)$ be two metric spaces. Given a function $f:E\to Y$ for a subset $E\subset X$, as well as $x_0\in E'\, ,\: y_0\in Y$ we say that
(i) $f$ is said to have $y_0$ as a limit as $x\to x_0$, or, in more mathematical notation $$ \lim_{x\to x_0} f(x)=y_0, $$ if and only if for any $\epsilon>0$, there is $\delta>0$ such that
$$ d_Y(f(x), y_0)\leq\epsilon\: \text{ whenever }\: 0 < d_X(x, x_0)\leq\delta \: \text{ and } \: x\in E. $$
(ii) $f$ is said to be continuous at $x_0\in E$ if and only if $\lim_{x\to x_0} f(x)=f(x_0)$
(iii) $f$ is called discontinuous at $x_0$ iff $f$ is not continuous at $x_0$.

We will study the case $X=\mathbb{R}^n$ and $Y=\mathbb{R}$ first.

Theorem

Let $f, g:\mathbb{R}^n\to \mathbb{R}$ be two functions and $x_0\in \mathbb{R}^n$. Then
(i) $\lim_{x\to x_0}\bigl[ f(x)\pm g(x)\bigr]=\lim_{x\to x_0} f(x) \pm \lim_{x\to x_0} g(x)$,
(ii) $\lim_{x\to x_0}\bigl(f(x)g(x)\bigr)=\lim_{x\to x_0} f(x) \cdot\lim_{x\to x_0} g(x)$,
(iii) $\lim_{x\to x_0} \big(f(x) g(x)^{-1}\big)=\lim_{x\to x_0} f(x)\bigl[\lim_{x\to x_0} g(x)\bigr]^{-1}$, whenever $\lim_{x\to x_0} g(x)\ne 0$,
provided that all limits exist.

Example

Let $$ f(x,y) = \left\{ \begin{array}{l l} \frac{xy}{x^2 + y^2} & \quad (x,y) \ne (0,0)\\ 0 & \quad (x,y) = (0,0)\\ \end{array} \right. $$ Discuss the limit and the continuity of $f$ on $\mathbb{R}^2$ at $x_0\in \mathbb{R} ^2$.

Discussion

Example

Let $$ f(x,y) = \left\{ \begin{array}{l l} \frac{x^3-y^2 x}{x^2 + y^2} & \quad (x,y) \ne (0,0)\\ 0 & \quad (x,y) = (0,0)\\ \end{array} \right. $$ and prove that $f$ is continuous on $\mathbb{R}^2$.

Example

Find the largest set $C\subset\mathbb{R}^2$ such that $f\big |_C$ is continuous for $$ f(x,y) = \left\{ \begin{array}{l l} \dfrac{xy^2}{x^2+y^4} & \quad (x,y) \ne (0,0)\\ 0 & \quad (x,y) = (0,0)\\ \end{array} \right. $$

Discussion

Example

Construct a function $f: \mathbb{R} \to \mathbb{R}$ that is discontinuous everywhere.

Discussion

Example

Construct a function $f$ on $[0,1]$ which is continuous at every irrational point and discontinuous at every rational point in $[0,1]$.

Discussion

Definition (monotony)

A function $f:(a,b)\to \mathbb{R}$ is called [strictly] increasing if $$ f(x_1) \le f(x_2)\: [f(x_1) < f(x_2)],\text{ whenever }x_1\leq x_2. $$

Theorem

Let $f:(a,b)\to \mathbb{R}$ be an increasing function and set $$ D_f = \{x_0 \in (a,b)\, |\, f\text{ is discontinuous at }x_0 \}. $$ Then, $D_f$ is at most countable.

Proof

Example

We now give an abstract characterization of the exponential function. Let $f:\mathbb{R} \to \mathbb{R}$ be a continuous function satisfying $$ f(x+y) = f(x) f(y),\: x,y \in \mathbb{R}\text{ and }f(1)=e. $$ Then $f(x) = e^x$ for $x \in \mathbb{R}$.

Discussion

Example

An analogous characterization works for $\log$. Let $f: (0,\infty) \to \mathbb{R}$ be a continuous function satisfying $$ f(x y) = f(x) +f(y)\, ,\: x,y \in (0,\infty)\text{ and }f(e) = 1. $$ Then $f(x)=\log x$ for $x \in \mathbb{R}$.

Definition (Convexity)

Let $E$ be convex and $f:E\to \mathbb{R}$ be a function. We say that $f$ is convex iff $$ f\bigl(\lambda x+(1-\lambda) y\bigr)\le \lambda f(x)+(1-\lambda) f(y),\: x,y\in E,\:\lambda\in (0,1)\, . $$

Exercise

Let $I\subset\mathbb{R}$ be an interval and prove that $f$ is convex if and only if $$ f\bigl(\frac{x+y}{2}\bigr)\le \frac{1}{2}f(x)+\frac{1}{2}f(y),\: x, y\in I. $$

Theorem

If $f:E\to \mathbb{R}$ is a convex function on a convex subset $E\subset\mathbb{R}^n$, then $f$ is locally bounded and continuous on $E$.

Proof

Exercise

Convince yourself that $f$ cannot be unbounded below at such endpoints.

Properties of continuous functions

Theorem

Let $(X, d)$ be a metric space and the function $f:X\to \mathbb{R}$ be continuous at $x_0 \in X $. If $f(x_0)>0$, then there is $\delta>0$ such that $$ f(x)\ge \frac{f(x_0)}{2}>0\text{ for all }x\in \mathbb{B}(x_0, \delta). $$

Proof

Theorem (Topological Characterization)

Let $(X, d_X)$ and $(Y, d_Y)$ be two metric spaces. Then $f: X \to Y$ is continuous if and only if preimages of open sets are open, i.e. iff $$ f^{-1}(V) = \big\{ x\in X\, |\, f(x)\in V\big\}\text{ is open in }X\text{ whenever }V\text{ is open in }Y\, . $$

Proof

Exercise

Given an equivalent characterization of continuity using sequences.

Theorem (Extrema)

Let $(X, d)$ be a complete metric space and let $K\subset X$ be compact. Let $F: K \to \mathbb{R}$ be a continuous function. Then there are $x_0, y_0 \in K$ such that $$ f(x_0)\le f(x)\le f(y_0),\: x\in K. $$

Proof

Theorem (Intermediate Value Theorem)

Let $f:[a, b]\to \mathbb{R}$ be continuous. Then $$ f\bigl([a,b]\bigr)=[m, M] $$ where $M=\max\big\{f(x)\, |\, x\in K\big\}$ and $m=min\big\{f(x)\, |\, x\in K\big\}$.

Exercise

Show that $f(x)=-2x^3+100 x^2-x+100$ has at least one real root.

Uniform continuity

Definition

Let $(X, d_X)$ and $(Y,d_Y)$ be metric spaces and $K\subset X$. $f: K \to Y$ is said to be uniformly continuous on $K$ iff, for any $\epsilon>0$, there is $\delta>0$ such that $$ d_Y\bigl(f(x),f(y)\bigr)\leq\epsilon\text{ whenever }x,y \in K\text{ with }d_X(x,y)\leq\delta. $$

We observe that continuity is a local property while uniform continuity is global as it depends on the behavior of the function everywhere.

Proposition

If $f$ is uniformly continuous on $K$, then $f:K\to Y$ is continuous on $K$. The converse is not true.

Nexample

Consider $f(x) = x^2$ for $x\in \mathbb{R}$. While $f$ is continuous, it is not uniformly continuous on $\mathbb{R}$. In order to prove this, we need to find $\epsilon_0>0$ such that, for any $\delta>0$, there are $x, y\in \mathbb{R}$ with $$ |x-y|<\delta\text{ but }|f(x) - f(y)|\ge\epsilon_0. $$

Discussion

Theorem

Let $(X, d)$ be a complete metric space and $K\subset X$ a compact set. If $f:K\to Y$ is continuous, then $f$ is uniformly continuous.

Proof

Definition

Let $(X,d_X)$ and $(Y,d_Y)$ be metric spaces and $f:X\to Y$ be given. The function $f$ is called Hölder continuous of exponent $\alpha\in(0,1)$ if there is a constant $c\geq 0$ such that $$ d_Y\bigl(f(x),f(y)\bigr)\leq c\, d_X(x,y)^\alpha\, ,\: x,y\in X\, . $$ If the inequality holds with $\alpha=1$, the function is called Lipschitz continuous continuous.

Example

Prove that Hölder and Lipschitz functions are uniformly continuous.

Example

Let $D \subset \mathbb{R}^n$ be convex and $f: D\to \mathbb{R}$ be differentiable. If $$ \big |\nabla f(x)\big | =\bigl[ \sum_{j=1}^n \Big | \frac{\partial f (x)}{\partial x_j} \Big| ^2 \bigr]^{1/2} $$ is bounded on $D$, then $f$ must be uniformly continuous on $D$. Indeed, if $x,y\in D$, then there is $\xi$ on the connecting segment between $x$ and $y$ (this follows from the Mean Value Theorem to be proved later) such that $$ f(x)-f(y)=\nabla f(\xi)\cdot (x-y). $$ It follows that $$ |f(x)-f(y)|\leq |\nabla f(\xi)||x-y|\leq M|x-y|, $$ and $f$ is Lipschitz continuous since $x$ and $y$ are arbitrary.

Example

Show $f(x)=\sqrt{x}$ is uniformly continuous on $(0,\infty)$.

Proof

Exercise

Show that, if $f$ is uniformly continuous on $[\delta, \infty)$ and on $[0,2\delta]$ for any fixed $\delta>0$, then it is uniformly continuous on $[0,\infty)$.

Example

Show that $f(x)=\log(1 + | x| ^2)$ is uniformly continuous on $\mathbb{R}^n$.

Proof

Theorem (Extension of Uniformly Continuous Functions)

Let $(X,d)$ be a metric space and $K \subset X$. If $f:K\to \mathbb{R}$ is uniformly continuous, then it can be extended to a uniformly continuous function $\tilde f$ to $\overline{K}$.

Proof

Example

Let $f:\mathbb{Q}\to\mathbb{R}$ be a uniformly continuous function. Show that there is a unique uniformly continuous extension $\tilde f:\mathbb{R}\to\mathbb{R}$ satisfying $$ \tilde f\big |_\mathbb{Q} = f. $$

Discussion

Continuity of the Inverse

Definition (Inverse)

Let $f: X \to Y$ be one-to-one and onto. The inverse function $f^{-1}: Y \to X$ is defined by setting $$ f^{-1} (y) = x \text{ for }x\in X\text{ such that }f(x) = y. $$

Lemma

If $f:X\to Y$ is continuous and $K \subset X$ is compact, then so is $f(K)$.

Proof

Exercise

Use the characterization of of continuity and of compactness by sequences to give an alternative proof of the lemma.

Theorem

Let $(X,d_X)$ and $(Y,d_Y)$ be metric spaces and $X$ be compact. If $f:X \to Y$ is a continuous, one-to-one, and onto function, then $f^{-1}: Y\to X$ is also continuous.

Proof