4 Functions and Continuity

The analysis of properties of functions is one of the main themes in real analysis. Therefore, we are going to dig deeper into this in the remaining chapters of this course. In this chapter we will first consider continuity.

4.1 Functions

Definition 4.1 • Function, domain, graph

Let \(D \subseteq {\mathbb{R}}.\) A (real) function on \(D\) is a mapping \(f: D \to {\mathbb{R}}.\) The set \(D\) is called the domain of \(f.\) The set \[\Gamma_f := \left\{ (x,y) \in D \times {\mathbb{R}}\; | \; y = f(x) \right\}\] is called the graph of \(f.\)

Example 4.1

  1. The identity \(\operatorname{id}_{{\mathbb{R}}}: {\mathbb{R}}\to {\mathbb{R}},\) \(x \mapsto x\) is a function

  2. The absolute value \(|\cdot|:{\mathbb{R}}\to {\mathbb{R}},\) \(x \mapsto |x|\) is a function. The graph \(G_{|\cdot|}\) is depicted in Figure 4.1.

  3. The exponential function \(\exp:{\mathbb{R}}\to {\mathbb{R}},\) \(x \mapsto \sum_{k=0}^\infty \frac{x^k}{k!}\) is also a function.

  4. If we set \(\sqrt[k]{0} := 0,\) then the root function \(f:[0,\infty) \to {\mathbb{R}},\) \(x \mapsto \sqrt[k]{x}\) is a function that is not defined on entire \({\mathbb{R}}.\)

  5. The “rounding down” function \(\lfloor \cdot \rfloor : {\mathbb{R}}\to {\mathbb{R}},\) \(x \mapsto \lfloor x \rfloor\) is another example for a function. The graph \(G_{\lfloor \cdot \rfloor}\) is depicted in Figure 4.1.

Figure 4.1: The graphs \(G_{|\cdot|}\) and \(G_{\lfloor \cdot \rfloor}\)

In the following we define some operations to obtain new functions from functions we already know.

Definition 4.2 • Operations between functions

Let \(D \subseteq {\mathbb{R}}\) and \(f,\,g : D \to {\mathbb{R}}\) be given and let \(c \in {\mathbb{R}}.\)

  1. The functions \(f+g,\) \(f\cdot g,\) and \(cf\) are defined on \(D\) by \[\begin{aligned} (f+g)(x) &:= f(x) + g(x), \\ (f\cdot g)(x) &:= f(x) \cdot g(x), \\ (cf)(x) &:= c\cdot f(x) \end{aligned}\] for all \(x \in D.\)

  2. For \(\widetilde{D} := \{x \in D \; | \; g(x) \neq 0 \},\) the function \(\frac{f}{g}\) is defined on \(\widetilde{D}\) by \[\left(\frac{f}{g}\right)(x) := \frac{f(x)}{g(x)}\] for all \(x \in \widetilde{D}.\)

Example 4.2

  1. A polynomial function \(p:{\mathbb{R}}\to {\mathbb{R}}\) has the form \[p = \sum_{k=0}^n a_k (\operatorname{id}_{\mathbb{R}})^k,\] where \(n \in {\mathbb{N}}\) and \(a_0,\,\ldots,\,a_n \in {\mathbb{R}},\) i. e., \(x \mapsto \sum_{k=0}^n a_k x^k.\) A specific example is \[p_0: {\mathbb{R}}\to {\mathbb{R}}, \quad x \mapsto p_0(x) = 2 + 4 x - 3x^2.\]

  2. Let \(p,\,q :{\mathbb{R}}\to {\mathbb{R}}\) be two polynomial functions. Then \[\frac{p}{q} : D \to {\mathbb{R}}\] with \(D:=\{ x \in {\mathbb{R}}\; | \; q(x) \neq 0 \}\) is a rational function. For example, the function \(f:{\mathbb{R}}\setminus \{-1,1\} \to {\mathbb{R}}\) with \[f(x) = \frac{3x+4}{x^2-1}\] is a rational function.

4.2 Continuity

When talking about continuity of a function one often uses the description as “a function that can be drawn without putting down the pen.” However, in general, this description is false. More correctly, a function is called continuous if small changes in the argument only lead to small changes in the function value. This description is still vague, so we start with a different definition and return to this description later.

Definition 4.3 • Continuity

Let \(D \subseteq {\mathbb{R}}\) and \(f: D \to {\mathbb{R}}.\)

  1. The function \(f\) is called continuous in \(a \in D\), if for each sequence \({(x_n)}_{n \in {\mathbb{N}}}\) with elements in \(D\) it holds that \[\lim_{n \to \infty} x_n = a \quad \Longrightarrow \quad \lim_{n \to \infty} f(x_n) = f(a).\]

  2. The function is called continuous, if it is continuous in all \(a \in D.\)

Remark 4.1

The condition of continuity can be shortly written as \[\lim_{n \to \infty} f(x_n) = f \left( \lim_{n \to \infty} x_n \right)\] for all convergent sequences \({(x_n)}_{n \in {\mathbb{N}}}\) in \(D.\) Hence, taking the limit and evaluating the function can be interchanged without changing the result.

Example 4.3

  1. The identity function \(\operatorname{id}_{\mathbb{R}}\) is continuous, since for all \(a \in D = {\mathbb{R}}\) and all sequences \({(x_n)}_{n \in {\mathbb{N}}}\) in \({\mathbb{R}}\) it holds that \[\lim_{n \to \infty} x_n = a \quad \Longrightarrow \quad \lim_{n \to \infty} \operatorname{id}_{\mathbb{R}}(x_n) = \lim_{n \to \infty} x_n = a = \operatorname{id}_{\mathbb{R}}(a).\]

  2. The absolute value function \(|\cdot|: {\mathbb{R}}\to {\mathbb{R}}\) is continuous. Let \(a \in {\mathbb{R}}\) and \({(x_n)}_{n \in {\mathbb{R}}}\) with \(\lim_{n \to \infty} x_n = a.\) Then it holds that (as shown in the exercise) \[\big| |x_n| - |a| \big| \le |x_n - a|,\] which implies \(\lim_{n \to \infty} |x_n| = |a|.\)

  3. The function \(f : {\mathbb{R}}\to {\mathbb{R}}\) with \[f(x) = \begin{cases} 1, & \text{if $x = 0$}, \\ 0, & \text{if $x \neq 0$} \end{cases}\] is not continuous in \(a=0.\) If we take the sequence \(\left(\frac{1}{n}\right)_{n \ge 1}\) , we obtain \(\lim_{n \to \infty} \frac{1}{n} = 0,\) but \[\lim_{n \to \infty} f\left( \frac{1}{n} \right) = 0 \neq 1 = f(0).\]

  4. Let \(D:= (-\infty,-1] \cup \{0\} \cup [1,\infty)\) and let \(f: D \to {\mathbb{R}}\) with \[f(x) = \begin{cases} 1, & \text{if $x=0$}, \\ 0, & \text{if $x \neq 0$}, \end{cases}\] see Figure 4.2 for a visualization. This function is continuous and in particular continuous in \(a=0.\) Let \({(x_n)}_{n \in {\mathbb{N}}}\) be a sequence in \(D\) with \(\lim_{n \to \infty} x_n = 0.\) Then for \(\varepsilon = 1\) there exists an \(N \in {\mathbb{N}}\) such that \(|x_n| < 1\) for all \(n \ge N.\) But since \((x_n)_{n \in {\mathbb{N}}}\) is a sequence in \(D,\) we have \(x_n = 0\) for all \(n \ge N.\) But then we also have \(f(x_n) = 1\) for all \(n \ge N\) and we have \[\lim_{n \to \infty} f(x_n) = 1 = f(0).\] The main difference to the example in iii lies in the fact that the point \(a=0\) is “isolated” and hence, every sequence that is convergent towards 0 has to be constant at some point. This function is an example for a continuous function, that “cannot be drawn without putting down the pen”.

Video 4.1. Continuity.

Figure 4.2: A “strange” continuous function
Theorem 4.1

Let \(D \subset {\mathbb{R}}\) and \(f,\,g:D \to {\mathbb{R}}\) be continuous in \(a \in D\) and let \(c \in {\mathbb{R}}.\) Then also \(f+g,\) \(f\cdot g,\) and \(cf\) are continuous in \(a.\) If additionally, \(g(a) \neq 0,\) then also \(\frac{f}{g}\) is continuous in \(a.\)

Proof. The proof follows directly from Theorem 2.4.

Example 4.4

The theorem implies that all polynomial and rational functions are continuous. In particular, the rational function \[\mathop{\mathrm{inv}}: {\mathbb{R}}\setminus\{0\} \to {\mathbb{R}}, \quad x \mapsto \frac{1}{x}\] is continuous. This is another example of a continuous function that “cannot be drawn without putting down the pen.”

In the next theorem we discuss continuity of the composition of two continuous functions. If \(D \subset {\mathbb{R}}\) and \(f: D \to {\mathbb{R}},\) we denote by \[f(D) := \{ y \in {\mathbb{R}}\; | \; \exists x \in D \text{ with } f(x) = y \}\] the image of \(f.\)

Theorem 4.2

Let \(D \subseteq {\mathbb{R}}\) and let \(f: D \to {\mathbb{R}}\) and \(g: \widetilde{D} \to {\mathbb{R}}\) with \(f(D) \subseteq \widetilde{D}.\) If \(f\) is continuous in \(a \in D\) and \(g\) is continuous in \(f(a) \in f(D),\) then the composition \(g \circ f: D \to {\mathbb{R}}\) is continuous in \(a.\)

Proof. Let \({(x_n)}_{n \in {\mathbb{N}}}\) be an arbitrary sequence in \(D\) with \(\lim_{n \to \infty} x_n = a.\) Then \[(g \circ f)(a) = g(f(a)) = g\left(f\left( \lim_{n \to \infty} x_n \right)\right) = g\left( \lim_{n \to \infty} f(x_n)\right) = \lim_{n \to \infty} g(f(x_n)),\] where in the last two equalities we have used that \(f\) is continuous in \(a\) and that \(g\) is continuous in \(f(a),\) respectively. Since \({(x_n)}_{n \in {\mathbb{N}}}\) is an arbitrary sequence in \(D\) converging to \(a,\) it follows that \(g \circ f\) is continuous in \(a.\)

In summary, sums, product, scalar multiples, quotients, and compositions of continuous functions are again continuous.

Example 4.5

If \(D \subseteq {\mathbb{R}}\) and \(f:D \to {\mathbb{R}}\) is continuous, then also the function \(|f|:D \to {\mathbb{R}},\) \(x \mapsto |f(x)|\) is continuous, because \(|f|\) is a composition of the two continuous functions \(f\) and \(|\cdot|.\)

Theorem 4.3

The exponential function \(\exp:{\mathbb{R}}\to {\mathbb{R}}\) is continuous.

Proof. We do the proof in two steps.

  1. We show that the exponential function is continuous at \(a = 0.\) We make use of the remainder term for the exponential series and the error estimate from Remark 3.6. We obtain \[|R_n(x)| = \left| \exp(x) - \sum_{k=0}^n \frac{x^k}{k!} \right| \le \frac{2|x|^{n+1}}{(n+1)!} \quad \text{for } |x| \le 1 + \frac{n}{2}.\] In particular, for \(n = 0,\) i. e., all \(x \in {\mathbb{R}}\) with \(|x| \le 1\) we have that \[|\exp(x) - 1| = |R_0(x)| \le 2 |x|.\] Let \({(x_n)}_{n \in {\mathbb{N}}}\) be a sequence in \({\mathbb{R}}\) with \(\lim_{n \to \infty} x_n = 0.\) Then we have \(|x_n| \le 1\) for almost all \(n \in {\mathbb{N}}\) and hence, \[0 \le |\exp(x_n)-1| \le 2|x_n|\] for almost all \(n \in {\mathbb{N}}.\) With the sandwich theorem (Theorem 2.7) we obtain \(\lim_{n \to \infty} |\exp(x_n) - 1| = 0,\) hence \[\lim_{n \to \infty} \exp(x_n) = 1 = \exp(0),\] and the exponential function is continuous in \(a = 0.\)

  2. We show that the exponential function is continuous in \(a \in {\mathbb{R}}\setminus \{0\}.\) Let \(a \in {\mathbb{R}}\setminus \{0\}\) and let \({(x_n)}_{n \in {\mathbb{N}}}\) be an arbitrary sequence with \(\lim_{n \to \infty} x_n = a.\) Then \({(x_n-a)}_{n \in {\mathbb{N}}}\) is a null sequence. With the help of the functional equation from Theorem 3.13 we obtain \[\exp(x_n) = \exp(x_n - a + a) = \exp(x_n - a) \exp(a).\] Since by i, the exponential function is continuous in \(0,\) we get \[\lim_{n \to \infty} \exp(x_n) = \exp(a) \cdot \lim_{n \to \infty} \exp(x_n-a) = \exp(a)\cdot 1 = \exp(a).\] Hence, the result follows.

4.3 Limits of Functions

Continuity of functions can be expressed in different terms. Another way is to use limits of functions. For this we need accumulation points of a set.

Definition 4.4 • Accumulation point of a set

Let \(A \subseteq {\mathbb{R}}\) and \(a \in {\mathbb{R}}.\) Then \(a\) is an accumulation point of \(A,\) if in every \(\varepsilon\)-neighborhood of \(a\) there exist infinitely many \(x \in A.\)

Example 4.6

  1. If \(a \neq b,\) then \(a,\,b\) are accumulation points of \((a,b)\) as well as any \(c \in (a,b).\) More generally, if \(I\subseteq {\mathbb{R}}\) is an interval containing at least two points, then any \(c \in I\) is an accumulation point.

  2. Let \(a \in {\mathbb{R}}.\) Then \(a\) is not an accumulation point of \(\{a\} = [a,a].\)

We have already defined the term “accumulation point” in the context of sequences. Indeed, there is a connection between both terms.

Remark 4.2

Let \({(a_n)}_{n \in {\mathbb{N}}}\) be a sequence of real numbers and \(A:= \{ a_n\;|\; n \in {\mathbb{N}}\}.\) If \(a \in {\mathbb{R}}\) is an accumulation point of \(A,\) then \(a\) is also an accumulation point of \({(a_n)}_{n \in {\mathbb{N}}}.\)

Example 4.7

  1. Let \(A := \big\{ \frac{1}{n}\;\big| \; n \in {\mathbb{N}}\setminus\{0\}\big\}.\) Then \(0\) is an accumulation point of \(A\) and also an accumulation point of the sequence \(\big( \frac{1}{n} \big)_{n \ge 1}.\)

  2. The converse of the statement in Remark 4.2 is not true. Consider the sequence \({(a_n)}_{n \in {\mathbb{N}}} = \big( (-1)^n \big)_{n \in {\mathbb{N}}}.\) Then \(-1\) and \(1\) are accumulation points of the sequence \({(a_n)}_{n \in {\mathbb{N}}},\) but they are not accumulation points of the set \(A:=\{ a_n\;|\; n \in {\mathbb{N}}\} = \{-1,\,1\}.\)

The use of accumulation points lies in the fact that certain sequences converging towards the accumulation points exist. This is clarified in the next theorem.

Theorem 4.4

Let \(A \subseteq {\mathbb{R}}\) be a set and \(a \in {\mathbb{R}}.\) Then the following statements are equivalent:

  1. The number \(a\) is an accumulation point of \(A.\)

  2. There exists a sequence \({(a_n)}_{n \in {\mathbb{N}}}\) in \(A\setminus \{a\}\) that converges towards \(a.\)

Proof. “i \(\Longrightarrow\) ii”: Let \(a\) be an accumulation point of \(A.\) Then for each \(n \in {\mathbb{N}}\setminus \{0\}\) there exist infinitely many \(x \in A\) in \(\big(a-\frac{1}{n},a+\frac{1}{n}\big).\) In particular, there exists an \(a_n \in A\setminus \{a\}\) with \(|a_n-a| < \frac{1}{n}.\) Thus we have \(\lim_{n \to \infty} a_n = a.\)
“ii \(\Longrightarrow\) i”: We show this implication via contraposition. Let \(a\) be not an accumulation point of \(A.\) Then there exists an \(\varepsilon>0\) such that the \(\varepsilon\)-neighborhood of \(a\) contains only finitely many elements of \(A.\) Define \[d:= \min\{ |x-a|\;|\;x \in (A\setminus\{a\})\cap(a-\varepsilon,a+\varepsilon)\} \in {\mathbb{R}}\cup \{\infty\},\] i. e., \(d\) is the distance of \(a\) to the element of \((A\setminus\{a\})\cap(a-\varepsilon,a+\varepsilon)\) that is closest to \(a.\) Then \(d > 0\) (or \(d = \infty\)) and \[(A\setminus\{a\})\cap(a-d,a+d) = \emptyset.\] But then there cannot exist a sequence in \(A\setminus\{a\}\) that has the limit \(a.\)

Example 4.8

Every \(a \in {\mathbb{R}}\) is an accumulation point of \({\mathbb{Q}}\):

  1. If \(a \in {\mathbb{Q}},\) then \(\left( a + \frac{1}{n}\right)_{n \in {\mathbb{N}}}\) is a sequence in \({\mathbb{Q}}\setminus \{a\}\) that converges towards \(a.\)

  2. If on the other hand, \(a \in {\mathbb{R}}\setminus {\mathbb{Q}},\) then we can represent \(a\) as a decimal fraction \(\sum_{k=-m}^\infty a_k\cdot 10^{-k}.\) Then \[\left( \sum_{k=-m}^n a_k\cdot 10^{-k} \right)_{n \in {\mathbb{N}}}\] is a sequence in \({\mathbb{Q}}\setminus\{a\} = {\mathbb{Q}}\) that converges towards \(a.\)

Definition 4.5 • Limit of a function

Let \(D \subseteq {\mathbb{R}},\) \(f:D \to {\mathbb{R}},\) and \(a \in {\mathbb{R}}\) an accumulation point of \(D.\) Then \(c \in {\mathbb{R}}\) is called the limit of \(f\) at the point \(a\), if for every sequence \({(x_n)}_{n \in {\mathbb{N}}}\) in \(D\setminus\{a\}\) with \(\lim_{n \to \infty} x_n = a\) it holds that \[\lim_{n \to \infty} f(x_n) = c.\] In this case we write \(\lim_{x \to a} f(x) = c.\)

Unfortunately, the definition of the limit of a function is not unique. The definition we use here goes back to the German mathematician Karl Weierstraß and it is the “pointed” version of the limit, since we consider only sequences in the set \(D \setminus \{a\}.\) To ensure that there exists a sequence in \(D \setminus \{a\}\) converging to \(a,\) we must assume that \(a\) is an accumulation point of \(D.\) There is also another version of the definition that considers sequences in the entire set \(D\) and which does not make use of the accumulation point assumption. However, both definitions are not equivalent.

Example 4.9

  1. For the function \(f : {\mathbb{R}}\to {\mathbb{R}}\) from Example 4.3 iii with \[f(x) = \begin{cases} 1, & \text{if $x=0$}, \\ 0, & \text{if $x \neq 0$} \end{cases}\] we obtain the limit \(\lim_{x \to 0}f(x) = 0.\) However, this limit is different from \(f(0) = 1.\)

  2. For the function \(f: D \to {\mathbb{R}}\) from Example 4.3 iv with \(D:= (-\infty,-1] \cup \{0\} \cup [1,\infty)\) and \[f(x) = \begin{cases} 1, & \text{if $x=0$}, \\ 0, & \text{if $x \neq 0$}, \end{cases}\] the limit \(\lim_{x \to 0} f(x)\) is not well-defined since \(0\) is not an accumulation point of \(D.\)

From the defintions of continuity and the limit of a function we directly obtain the following theorem.

Theorem 4.5

Let \(D \subseteq {\mathbb{R}},\) \(f:D \to {\mathbb{R}},\) and \(a \in D\) be an accumulation point of \(D.\) Then \(f\) is continuous in \(a,\) if and only if \[\lim_{x \to a} f(x) = f(a).\]

Remark 4.3

Definition 4.5 can be generalized in the following way: Let \(D \subseteq {\mathbb{R}}\) be not bounded from above and let \(f:D \to {\mathbb{R}}.\) Then we define \[\lim_{x \to \infty} f(x) = c,\] if for any sequence \({(x_n)}_{n \in {\mathbb{N}}}\) in \(D\) that is properly divergent towards \(\infty\) it holds that \[\lim_{n \to \infty} f(x_n) = c.\] Moreover, we can allow improper limits and hence allow \(c \in {\mathbb{R}}\cup\{-\infty,\,\infty\}\) in our definition. Analogously we can define (the possibly improper) limit \(\lim_{x \to -\infty} f(x).\)

Example 4.10

  1. For the function \(f:(0,\infty) \to {\mathbb{R}},\) \(x \mapsto \frac{1}{x}\) we obtain \[\lim_{x \to 0} f(x) = \infty \quad \text{and} \quad \lim_{x \to \infty} f(x) = 0.\]

  2. Let \(p:{\mathbb{R}}\to {\mathbb{R}},\) \(x \mapsto x^k+a_{k-1}x^{k-1} + \ldots + a_1x + a_0\) be a polynomial function with \(a_{k-1},\,\ldots,\,a_0 \in {\mathbb{R}}\) and \(k \ge 1.\) Then it holds that (exercise!) \[\lim_{x \to \infty} p(x) = \infty \quad \text{and} \quad \lim_{x \to -\infty} p(x) = \begin{cases} \infty, & \text{if $k$ is even}, \\ -\infty, & \text{if $k$ is odd}. \end{cases}\]

Remark 4.4

The definition of the limit can also be weakened. For a function \(f:D \to {\mathbb{R}}\) and an accumulation point \(a \in {\mathbb{R}}\) of \(D \cap (a,\infty)\) we define the right limit \[\lim_{x \searrow a} f(x) = c,\] if for every sequence \({(x_n)}_{n \in {\mathbb{N}}}\) in \(D\) with \(x_n > a\) for all \(n \in {\mathbb{N}}\) it holds that \[\lim_{n \to \infty} f(x_n) = c.\] Analogously we define the left limit \[\lim_{x \nearrow a} f(x).\] One can show that for a point \(a \in D\) which is an accumulation point of both \(D \cap (a,\infty)\) and \(D \cap (-\infty,a),\) the following statements are equivalent (exercise!):

  1. The limit \(\lim_{x \to a} f(x)\) exists.

  2. The right and left limits \(\lim_{x \searrow a} f(x)\) and \(\lim_{x \nearrow a} f(x)\) exist with \(\lim_{x \searrow a} f(x) = \lim_{x \nearrow a} f(x).\)

Home

Contents

Study Weeks