1. Numbers, sets, and induction
2. Proofs and induction; Irrationality of $\sqrt{2}$
3. Least Upper Bounds and Greatest Lower Bounds; Axiom of Completeness, and; Construction of $\mathbb{R}$ from $\mathbb{Q}$
4. Consequences of the Axiom of Completeness; Decimals, Extended Real Number System
5. Dirichlet box principle; Cartesian products, relations and functions
6. Functions and their properties; Trigonometric functions $\sin(\theta)$ and $\cos(\theta)$
7. Axiom of Choice, Cardinality, Cantor's theorem
8. Countable sets, cardinality continuum
9. Inequality between the arithmetic and geometric means; and other useful inequalities
10. The Limit of a Sequence; The Algebraic and Order Limit; Theorems
11. The Squeeze Theorem; The Monotone Convergence Theorem; and other useful theorems
12. Euler's numbers; Subsequences; A First Glance at Infinite Series
13. Toeplitz theorem and applications; Exponential and logarithm function; Bolzano--Weierstrass theorem
14. Completeness; Infinite Series and Euler's numbers
15. Exponential function and logarithm; Upper and Lower limits; Properties of infinite series and; Abel Summation formula
16. Metric spaces basic properties
17. Complete spaces; and Compact sets
18. Compact Sets, Connected Sets; and Cantor set
19. Continuous functions; Continuous functions on compact sets
20. Continuity, compactness and connectivity; Uniform continuity; Sets of Discontinuity
21. Derivatives, the; Mean-Value Theorem and its Consequences; Higher Order Derivatives; Convex and Concave functions
22. Exponential Function and Natural Logarithm Function; Power Series and Taylor's theorem
23. Applications of Calculus: Bernoulli's inequality; and Weighted Mean Inequalities
24. Power series of trigonometric functions done right
25. Riemann Integrals

19. Continuous functions; Continuous functions on compact sets  PDF

Limits

Limits. Let \((X,\rho_X)\), \((Y,\rho_Y)\) be metric spaces. Suppose \(E \subseteq X\) and \(f:E \to Y\) and \(p\) is a limit point of \(E\). We write \[f(x) \ _{\overrightarrow{x \to p}}\ q \quad \text{ or }\quad \lim_{x \to p}f(x)=q.\] if there is a point \(q \in X\) satisfying the following \(\varepsilon\)-\(\delta\) condition:

  • For every \(\varepsilon>0\) there exists \(\delta>0\) such that \[\rho_Y(f(x),q)<\varepsilon\] for all points \(x \in E\) for which \(0<\rho_X(x,p)<\delta\).

Special case

If \(X=Y=\mathbb{R}\) then

\[\rho_X(x,y)=\rho_Y(x,y)=|x-y|\] and the condition reads as follows:

Limit. For every \(\varepsilon>0\) there exists \(\delta>0\) such that for all \(x \in E\) if \[0<|x-p|<\delta,\] then \[|f(x)-q|<\varepsilon.\]

Theorem

Theorem (Characterizations of Continuity). Let \((X,\rho_X)\), \((Y,\rho_Y)\) be metric spaces and \(E \subseteq X\), \(f:X \to Y\), and \(p\in X\) be as in the previous definition. Then

  1. \(\lim_{x \to p}f(x)=q\) iff

  2. \(\lim_{n \to \infty}f(p_n)=q\) for every sequence \((p_n)_{n \in \mathbb{N}}\) in \(E\) such that \(p_n \neq p\) and \(\lim_{n \to \infty}p_n =p\).

Proof (A)\(\Longrightarrow\)(B). Suppose that (A) holds. Choose \((p_n)_{n \in \mathbb{N}}\) like in condition (B). Let \(\varepsilon>0\) be given, then there exists \(\delta>0\) such that \[\rho_Y(f(x),q)<\varepsilon \quad \text{ if }\quad x \in E \quad \text{ and }\quad 0<\rho_X(x,p)<\delta.\] Also there exists \(N \in \mathbb{N}\) such that \(n \geq N\) implies \(0<\rho_X(p_n,p)<\delta\). Thus we also have \(\rho_Y(f(p_n),q)<\varepsilon\) for \(n\ge N\) showing that (B) holds. $$\tag*{$\blacksquare$}$$

Proof (B)\(\Longrightarrow\)(A). Conversely suppose (A) is false. Then there exists some \(\varepsilon>0\) such that for every \(\delta>0\) there exists a point \(x \in E\) (depending on \(\delta\)) for which \[\rho_Y(f(x),q) \geq \varepsilon \quad \text{ but } \quad 0<\rho_X(x,p)<\delta.\] Taking \(\delta_n=\frac{1}{n}\) for each \(n \in \mathbb{N}\) we thus find a sequence \((p_n)_{n \in \mathbb{N}}\) in \(E\) satisfying \(\lim_{n \to \infty}p_n =p\) but \[\rho_Y(f(p_n),q) \geq \varepsilon.\] thus (B) is false as desired. $$\tag*{$\blacksquare$}$$

Remark. It was possible to choose the sequence \((p _n)_{n \in \mathbb{N}}\) in \(E\) in one step thanks to the Axiom of Choice. Without assuming the Axiom of Choice the previous theorem is not provable.

Theorem. Suppose that \((X,\rho_X)\) is a metric space, and \(E \subseteq X\), and \(p\) is a limit point of \(E\). Let \(f,g:E \to \mathbb{R}\) be functions such that \[\lim_{x \to p}f(x)=A\quad \text{ and }\quad \lim_{x \to p}g(x)=B.\]

Then

  1. \(\lim_{x \to p}(f+g)(x)=A+B\),

  2. \(\lim_{x \to p}(f\cdot g)(x)=A\cdot B\),

  3. \(\lim_{x \to p}\left(\frac{f}{g}\right)(x)=\frac{A}{B}\) if \(B \neq 0\) and \(g(x) \neq 0\) for \(x \in E\).

Continuous function

Continuous at the point \(p\). Suppose that \((X,\rho_x)\) and \((Y,\rho_Y)\) are metric spaces, \(E \subseteq X\), \(p \in E\) and \(f:E \to Y\). The function \(f\) is said to be continuous at point \(p\) if for every \(\varepsilon>0\) there exists \(\delta>0\) such that

\[\rho_Y(f(x),f(p))<\varepsilon\] for all points \(x \in E\) for which \[\rho_X(x,p)<\delta.\]

Continuous function. If the function \(f:E \to Y\) is continuous at every point of \(E\) then \(f\) is said to be continuous on \(E\).

Special case

If \(X=Y=\mathbb{R}\) then

\[\rho_X(x,y)=\rho_Y(x,y)=|x-y|\] and the function \(f:E\to \mathbb{R}\) is said to be continuous at point \(p\) if for every \(\varepsilon>0\) there exists \(\delta>0\) such that

\[|f(x)-f(p)|<\varepsilon\] for all points \(x \in E\) for which \[|x-p|<\delta.\]

Example

Example. Let us define \(f:\mathbb{R} \to \mathbb{R}\) by \[f(x)=\begin{cases} 1 \text{ if }x \in \mathbb{Q},\\ 0 \text{ if }x \not\in \mathbb{Q}. \end{cases}\] Determine if \(f\) is continuous or not at the point \(0\).

Solution. Let us consider the sequence \((a_n)_{n \in \mathbb{N}}\), where \(a_n=\sqrt{2}/n\). Then \(\lim_{n \to \infty}a_n=0\) and \(a_n \not\in \mathbb{Q}\), so \(f(a_n)=0\). Then \[\lim_{n \to \infty}f(a_n)=0 \neq 1 =f(0),\] so \(f\) is not continuous at point \(0\).$$\tag*{$\blacksquare$}$$

Example. Let us define \(f:\mathbb{R}^2 \to \mathbb{R}\) by \[f(x,y)=\begin{cases} 1 \text{ if }x+y \in \mathbb{Q},\\ 0 \text{ if }x+y \not\in \mathbb{Q}. \end{cases}\] Determine if \(f\) is continuous or not at the point \((0,0)\).

Solution. Let us consider the sequence \((a_n)_{n \in \mathbb{N}}\), where \(a_n=(0,\sqrt{2}/n)\). Then \(\lim_{n \to \infty}a_n=(0,0)\) and \(0+\sqrt{2}/n \not\in \mathbb{Q}\), so \(f(a_n)=0\). Then \[\lim_{n \to \infty}f(a_n)=0 \neq 1 =f(0,0),\] so \(f\) is not continuous at point \((0,0)\).$$\tag*{$\blacksquare$}$$

Remark

Remark. If \(p\) is an isolated point of \(E\) then our definition implies that every function \(f\) which has \(E\) as its domain is continuous at \(p\). For, no matter which \(\varepsilon>0\) we choose, we can pick \(\delta>0\) so that the only point \(e \in E\) for which \[\rho_X(x,p)<\delta\] is \(x=p\), then \[\rho_Y(f(x),f(p))=0<\varepsilon.\]

Fact. In the situation of the definition of continuity assume also that \(p\) is a limit point of \(E\). Then \(f\) is continuous at \(p\) iff \(\lim_{x \to p}f(x)=f(p).\)

Proof. It is obvious if we compare two previous definitions.$$\tag*{$\blacksquare$}$$

Theorem

Theorem. Suppose that \((X,\rho_X)\), \((Y,\rho_Y)\), and \((Z,\rho_Z)\) are metric spaces, let \(E \subseteq X\) and \(f:E \to Y\) and \(g:f[E] \to Z\) be given and define \(h:E \to Z\) by \[{\color{blue}h(x)=g(f(x)), \quad x \in E.}\] If \(f\) is continuous at a point \(p \in E\) and \(g\) is continuous at the point \(f(p)\), then \(h\) is continuous at \(p\). In other words \[\lim_{x\to p}h(x)=\lim_{x\to p}g(f(x))=g(f(p))=h(p).\]

Let \(\varepsilon>0\) be given.

  • Since \(g\) is continuous at \(f(p)\) there is \(\eta>0\) such that \[\rho_Z(g(y),g(f(p)))<\varepsilon\quad \text{ if }\quad \rho_Y(y,f(p))<\eta \quad \text{ and }\quad y \in f[E].\]

  • Since \(f\) is continuous at \(p\), there is \(\delta>0\) such that \[\rho_Y(f(x),f(p))<\eta \quad \text{ if }\quad \rho_X(x,p)<\delta \quad \text{ and }\quad x \in E.\]

  • If follows that \[\rho_Z(h(x),h(p))=\rho_Z(g(f(x)),g(f(p)))<\varepsilon\] if \(\rho_X(x,p)<\delta\) and \(x \in E\). Thus \(h\) is continuous at \(p \in E\).$$\tag*{$\blacksquare$}$$

Example

Example. Assume that \(f:\mathbb{R}^2 \to (0, \infty)\) is continuous for all \((x,y) \in \mathbb{R}^2\). Prove that \(h(x,y)=\sqrt{f(x,y)}\) is continuous.

Solution. Let us note that the function \(g:(0, \infty) \to (0, \infty)\) defined by \[g(x)=\sqrt{x}\] is continuous. We have \[h=g \circ f,\] so \(h\) is continuous by the previous theorem. $$\tag*{$\blacksquare$}$$

Theorem

Theorem. A mapping \(f\) of a metric space \((X,\rho_X)\) into a metric space \((Y,\rho_Y)\) is continuous on \(X\) iff \(f^{-1}[V]\) is open in \(X\) for every open set \(V\) in \(Y\).

Proof. Suppose that \(f\) is continuous on \(X\) and \(V \subseteq Y\) is open.

  • We have to show that \(f^{-1}[V]\) is open in \(X\). Let \(p \in f^{-1}[V]\). Since \(V\) is open \(B_{\rho_Y}(f(p),\varepsilon) \subseteq V\) for some \(\varepsilon>0\).

  • Since \(f\) is continuous at \(p \in X\) there is \(\delta>0\) such that \[\rho_{Y}(f(x),f(p))<\varepsilon \quad \text{ if }\quad \rho_X(x,p)<\delta.\] Thus \[B_{\rho_X}(p,\delta) \subseteq f^{-1}[V]=\{x \in X\;:\;f(x) \in V\}.\]

Conversely, suppose \(f^{-1}[V]\) is open in \(X\) for any open \(V \subseteq Y\).

  • Fix \(p \in X\) and \(\varepsilon>0\) and consider \[{\color{blue}V=B_{\rho_Y}(f(p),\varepsilon)}\] which is open thus \(f^{-1}[V]\) is open, hence there is \(\delta>0\) so that \(B_{\rho_X}(p,\delta) \subseteq f^{-1}[V]\).

  • Thus if \(\rho_X(x,p)<\delta\), then \(x \in f^{-1}[V]\), hence \[f(x) \in V=B_{\rho_Y}(f(p),\varepsilon) \quad \iff \quad \rho_Y(f(x),f(p))<\varepsilon. \qquad \tag*{$\blacksquare$}\]

Corollary. A mapping \(f:X \to Y\) between metric spaces \((X,\rho_X)\) and \((Y,\rho_Y)\) is continuous iff \(f^{-1}[C]\) is closed in \(X\) for any closed set \(C\) in \(Y\).

Proof. A set is closed iff its complement is open. We are done by invoking the previous theorem, since \(f^{-1}[E^c]=(f^{-1}[E])^c\) for every open set \(E \subseteq Y\). $$\tag*{$\blacksquare$}$$

Example

Example. Let \(f:\mathbb{R} \to \mathbb{R}\) be continuous and \(a \in R\). Prove that the set \[A=\{x \in \mathbb{R}\;:\;f(x)>a\}\] is open.

Solution: We have \[\{x \in \mathbb{R}\;:\;f(x)>a\}=f^{-1}[(a,\infty)]\] and \((a,\infty)\) is open in \(\mathbb{R}\), so by the previous theorem, \(A\) is open.$$\tag*{$\blacksquare$}$$

Example. Prove that the set \[A=\{(x,y) \in \mathbb{R}\;:\;\sqrt{x^2+y^2}<1\}\] is open in \(\mathbb{R}^2\) with the Euclidean metric.

Solution: Let us consider a continuous function \(f:\mathbb{R}^2 \to \mathbb{R}\) defined by \[f(x,y)=\sqrt{x^2+y^2}.\] Moreover, by the previous theorem \[A=\{(x,y) \in \mathbb{R}\;:\;f(x,y)<1\}=f^{-1}[B(0,1)]\] is open since \(B(0,1)\) is an open unit ball in \(\mathbb{R}^2\).$$\tag*{$\blacksquare$}$$

Theorem

Theorem. Let \(f,g:X \to \mathbb{R}\) be two continuous functions on a metric space \((X,\rho_X)\). Then \(f+g\), \(f\cdot g\), and \(\frac{f}{g}\) are continuous. In the last case we assume \(g(x) \neq 0\) for all \(x \in X\).

Example 1. Every polynomial \[p(x)=a_nx^n+a_{n-1}x^{n-1}+\ldots+a_1x+a_0\] is a continuous function on \(\mathbb{R}\).

Example 2. The exponential function \(f(x)=e^x\) is continuous as we have shown that for any \((a_n)_{n \in \mathbb{N}}\) so that \(\lim_{n \to \infty}a_n=a\) one has \(\lim_{n \to \infty}e^{a_n}=e^a.\)

Examples

Example 3. \(f(x)=|x|\) is continuous on \(\mathbb{R}\) since \(|f(x)-f(y)| \leq |x-y|\).

Example 4. \(f(x)=\lfloor x\rfloor=\max\{n \in \mathbb{Z}\;:\; n \leq x\}\) is NOT continuous at any \(x \in \mathbb{Z}\).

Example 5. \(f(x)=x^{\alpha}\) for any \(\alpha \in \mathbb{R}\) is continuous on \((0,\infty)\).

Example 6. If \(f,g:X \to \mathbb{R}\) are continuous then \(\max\{f,g\}\) and \(\min\{f,g\}\) are continuous as well. Indeed,

\[\max\{f,g\}=\frac{f+g+|f-g|}{2},\qquad \min\{f,g\}=\frac{f+g-|f-g|}{2}.\]

Continuity and compactness

Bounded function. A mapping \(f:E \to \mathbb{R}\) is said to be bounded if there is a number \(M>0\) such that \[|f(x)| \leq M\quad \text{ for all }\quad x \in E.\]

Theorem (4.4.1). Suppose that \(f\) is a continuous mapping of a compact metric space \((X,\rho_X)\) into a metric space \((Y,\rho_Y)\). Then \(f[X]\) is compact in \(Y\).

Let \((V_{\alpha})_{\alpha \in A}\) be an open cover of \(f[X]\), i.e. \[f[X] \subseteq \bigcup_{\alpha \in A}V_{\alpha}.\] Since \(f\) is continuous then each set \(f^{-1}[V_{\alpha}]\) is open in \(X\). Since \(X\) is compact and \[X \subseteq \bigcup_{\alpha \in A}f^{-1}[V_{\alpha}]\] thus there are \(\alpha_1,\alpha_2,\ldots,\alpha_n \in A\) so that \[X \subseteq \bigcup_{j=1}^n f^{-1}[V_{\alpha_j}].\] Since \(f[f^{-1}[E]] \subseteq E\) we have \[f[X] \subseteq f\big[\bigcup_{j=1}^{n}f^{-1}[V_{\alpha_j}]\big] \subseteq \bigcup_{j=1}^{n}V_{\alpha_j}. \qquad \tag*{$\blacksquare$}\]

Corollary

Corollary. If \(f:X \to \mathbb{R}\) is continuous on a compact metric space \((X,\rho_{X})\) then \(f[X]\) is closed and bounded in \(\mathbb{R}\). Specifically, \(f\) is bounded.

Theorem. Suppose \(f:X \to \mathbb{R}\) is continuous on a compact metric space \((X,\rho_X)\) and \[M=\sup_{p \in X}f(p)\quad \text{ and }\quad m=\inf_{p \in X}f(p).\] Then there are \(p,q\) such that \[f(p)=M \quad \text{ and }\quad f(q)=m.\]

Proof. \(f[X] \subseteq \mathbb{R}\) is closed and bounded. Thus \(M\) and \(m\) are members of \(f[X]\) and we are done. $$\tag*{$\blacksquare$}$$

Theorem

Theorem. Suppose \(f\) is continuous injective mapping of a compact metric space \(X\) onto a metric space \(Y\). Then the inverse mapping \(f^{-1}\) defined on \(Y\) by \[f^{-1}(f(x))=x, \ \ \ x \in X\] is a continuous mapping of \(Y\) onto \(X\).

Proof. The inverse \(f^{-1}:Y \to X\) is well defined since \(f:X \to Y\) is one-to-one and onto. It suffices to prove that \(f[V]\) is open in \(Y\) for every open set \(V\) in \(X\). Fix \(V \subseteq X\) open, \(V^c\) is closed in \(X\) thus compact, hence \(f[V^c]\) is compact subset of \(Y\) and consequently \(f[V^c]\) is closed. Since \(f:X \to Y\) is one-to-one and onto, hence \[f[V]=\left(f[V^c]\right)^c\] and, consequently, \(f[V]\) is open as desired.$$\tag*{$\blacksquare$}$$

Top