# 0x020 Foundation

Analysis is the art of taking limits.

## 1. Continuity

The basic relation between continuity concepts are:

### 1.1. Definitions

#### 1.1.1. Limits of Functions

Functional limit on \(\mathbb{R}\) is a special case of functional limit on metric space. Generally speaking, we want the value of \(\lim_{x \to c} f(x)\) to be independent of how we approach \(c\)

**Definition (functional limit)** Suppose \(x_0\) is a limit point of \(E\),

iff

It looks there are two version of functional limit definitions, the definition here is called the *deleted limit* version where the \(x = x_0\) is excluded from the requirements, the other version is called the *non-deleted limit* version where \(x = x_0\) can be included

These two definitions have slightly different conclusions sometimes (e.g: composition of function). This note will follow the deleted version.

Under this definition, limit points of \(E\) do not necessarily belong to \(E\) unless it is closed. In fact, \(x_0\) need not to be in the domain of \(f\).

limit point might not be in the domain

Consider the function \(f(x)=0\) when \(x \neq 0\) and \(f(x)=1\) when \(x=0\) (there exists a jump discontinuity at \(0\)). because the limit point is deleted, we can still argue

In another function \(f(x) = x \sin(1/x)\) with \(x>0\), \(x=0\) is not included in the domain but \(x=0\) is a limit point, so the limit on \(0\) can exist

As mentioned above, the functional limit should be independent how we approach the limit point, therefore all sequence limit should converges to the same point.

**Criterion (sequence criterion)** the following statements are equivalent

- \(\lim_{x \to x_0; x \in E} f(x) = L\)
- \((a_n) \to x_0 \implies f(a_n) \to L\) where \(a_n \in E\)

This also gives us an approach to decide the divergence: functional limit \(\lim_{x \to c} f(x)\) does not exist if

**Criterion (algebra ops preserves limit)** limit laws for functions, for example,

**Criterion (composition preserves limit)** suppose \(g\) is continuous at \(q\) and

then composition

Note that the continuity of \(g\) is required

counter example if \(g\) is not continuous

Consider \(f,g\) such that \(f(x)=0\) and \(g(x)=1\) when \(x=0\), otherwise \(g(x)=0\), in this case

howerver,

#### 1.1.2. Continuity

The continuity class can be organized as follows:

**Definition (continuity)** A function \(f: A \to R\) is continuous at \(c \in A\) if for all \(\epsilon > 0\), there exists a \(\delta > 0\) such that

The most important point here is \(c\) must be included in the domain (unlike the functional limit where \(c\) is a limit point, which might not be in the domain)

Also notice because of this difference, here we require \(|x-c|<\delta\) rather than \(0 < |x-c| < \delta\) used in the functional limit.

isolated point

By this definition, we know functions are continuous at their isolated points of their domains

There are several characterizations of continuity:

**Lemma (characterizations of continuity)** \(f: X \to R\) is continuous at \(x_0 \in X\) iff \(x_0\) is a limit point and

**Lemma (sequence version of continuity)** Continuous function preserves the convergence

#### 1.1.3. Criterions

**Criterion (Arithmetic operations and composition)** if \(f, g\) are continuous at \(x_0\), then \(f+g, f-g, f/g, fg, \min(f,g), \max(f,g), g \circ f\) are also continuous at \(x_0\)

**Criterion (limit composition)** Let \(f,g\) be real functions, and \(\lim_{x \to p} f(x) = q, \lim_{x \to q} g(x) = r\), we have \(\lim_{x \to p} g(f(x)) = r\) when either of the following is satisfied:

- \(g(x)\) is continuous at \(q\)
- for some open interval \(I\) containing \(p\), it is true that \(f(x) \neq q\) for any \(x \in I\) except possibly \(x = p\). (this can happen, for example, \(f\) is monotone)

See the proofwiki

composition of non-continuous functions

Assume \(\lim_{x \to p} f(x) = q\), \(\lim_{x \to q} g(x)=r\), it may not be true that

For example, consider \(f(x)=0\) for all \(x\), \(g(x)=0\) if \(x \neq 0\) and \(g(x)=1\) if \(x = 0\), then \(\lim_{x \to 0} f(x) = 0\), \(\lim_{x \to 0} g(x) = 0\). however, \(\lim_{x \to 0} g(f(x)) = 1\)

To make the statement, we need to have the continuity of \(g\) on \(q\). (Note that in the non-deleted limit definition, this requirement can be dropped.)

In the case of single variable, we can define the left, right limits and use them to determine continuity.

**Definition (left, right limits)**

**Criterion (left right limits and continuity)** If \(f(x_0+), f(x_0-)\) both exist and equal to \(f(x_0)\), then \(f\) is continuous at \(x_0\)

Continuity has multiple good properties, for example, it preserves compactness and connectedness, which guarantees the continuous function has extreme value and intermediate value under certain conditions.

However, continuity are not good enough (not preserved) with respect to the pointwise convergence, measurable function improves in this point

continuity is not preserved over sup

See Abott Exercise 4.3.10 for this example

Consider the following function

Continuity is preserved over finite max operations: \(g(x)\) is continuous

However, it is not preserved over the infinite supermum

Note in contrast, measurable function is well-preserved wrt to the sup operations and pointwise convergence.

#### 1.1.4. Set of Discontinuity

Given a function \(f: \mathbb{R} \to \mathbb{R}\), define \(D_f \subseteq \mathbb{R}\) to be the set of points where the function \(f\) fails to be continuous, and we want to understand characteristics of \(D_f\).

As mentioned below, \(D_f\) is an \(F_\sigma\) set, on the other hand, the set of points where a function is continuous is a \(G_\delta\) set.

**Defintion (classification of discontinuities)** Generally speaking, discontinuities can be divided into three categories:

**removable discontinuity**: \(\lim_{x \to c }f(x)\) exists but has a value different from \(f(c)\)**jump discontinuity**: \(\lim_{x \to c^+} f(x) \neq \lim_{x \to c^-} f(x)\)**essential discontinuity**: \(\lim_{x \to c} f(x)\) does not exist for some other reason.

discontinuous only at 1 point

The following function is only continuous at 0

discontinuous on \(Q\)

Thomae function is discontinuous on \(Q\) and continuous on \(I\)

nowhere continuous function

Dirichlet's function is an example of nowhere continuous function

**Theorem (set of discontinuity for an monotone function)** A monotone function can only have jump discontinuities. The set of discontinuity is either finite or countable. This also indicates monontone function is Riemann integrable, because the set of discontinuities has a measure of 0.

**Theorem (set of discontinuity for an arbitrary function)** Let \(f: R \to R\) be an arbitrary function. Then \(D_f\) is an \(F_\sigma\) set.

Proof idea: showing the following steps

- consider a concept of \(\alpha\)-continuity: for a fixed \(\alpha > 0\), the function is \(\alpha\)-continuity if there exists a \(\delta > 0\) such that for all \(y, z \in (x-\delta, x+\delta)\), it follows that \(|f(y) - f(z)| < \alpha\)
- show The set of \(f\) fails to be continuous \(D_f^{\alpha}\) is closed
- show \(D_f = \cup D^{\alpha_n}_f\) where \(\alpha_n = 1/n\)

discontinuity at \(Q\) and \(I\)

Thomae function is an example where the function's discontinuity set is \(Q\)

However, \(I\) is not a \(F_\sigma\) set, so there is no function \(f\) which is continuous at every rational and discontinuous at every irrational.

discontinuity at an arbitray closed set and open set

See exercise 4.3.14 of Abbott's book

For an arbitray closed set \(F\), we can construct a function whose value are \(2\) when \(x \notin F\) and Dirichlet function when \(x \in F\). Then \(F\) is discontinuous at precisely \(F\)

For an arbitrary open set \(O\), we can construct a function whose value are \(0\) when \(x \notin O\) and Dirichlet function multiplied by the distance function to \(O^c\): \(\inf \{ |x-a| | x \in O^c \}\). The multiplication makes sure \(x\) is continuous at the boundary of \(O\).

### 1.2. Continuity Theorems

#### 1.2.1. Compactness and Connectedness

Those are application of corresponding topological concepts to \(\mathbb{R}\)

**Theorem (preservation of compact sets)** Let \(f: A \to R\) be continuous on \(A\). If \(K \subseteq A\) is compact, then \(f(K)\) is compact as well

**Proposition (extreme value theorem)** If \(f: A \to R\) is continuous on a compact set \(K \subset R\), then \(f\) attains a maximum and mimum value.

**Theorem (preservation of connected sets)** Let \(f: G \to R\) be continuous. If \(E \subseteq G\) is connected, then \(f(E)\) is connected as well

**Theorem (Intermediate value theorem)** Let \(f: [a,b] \to R\) be a continuous function on \([a,b]\). Let \(y\) be a real number between \(f(a), f(b)\). Then there exists \(c \in [a,b]\) such that \(f(c)=y\)

Conversely, a function having the intermediate value property does not necessariy need to be continuous.

### 1.3. Classifications

The basic relation between continuity concepts are:

#### 1.3.1. Uniform Continuity

Continuity is a local property, where the choice of \(\delta\) can dependent the target point \(c\). Uniform continuity is a global property, where \(\delta\) should be same for all point in the domain.

**Definition (uniform continuity)** Let \(A \subset R\) and let \(f: A \to R\). We say that \(f\) is uniformly continuous if

**Proposition (uniform continuity preserves Cauchy sequences)** if \(f\) is a uniformly continuous function. Let \((x_n)_{n=1}^{\infty}\) be a Cauchy sequence. Then \((f(x_n))_{n=1}^{\infty}\) is also Cauchy

**Theorem (continuous function on a compact set is uniformly continuous)** If \(f: A \to R\) is continous on a compact set \(A\). Then \(f\) is also uniformly continuous

#### 1.3.2. Lipschitz continuity

**Definition (Lipschitz continuity)** A function \(f: A \to R\) is called Lipschitz if there exists a bount \(M > 0\) such that for all \(x, y \in A, x \neq y\)

contraction mapping

A contractive function is a function

where \(0 < c < 1\).

It is a Lipschitz continuous function.

**Lemma** Lipschitz continuous implies uniform continuous, but not the converse

uniform continuous but not Lipschitz

Consider function \(\sqrt{|x|}\). it is uniform continuous but not Lipschitz continuous.

## 2. Differentiation

### 2.1. Definitions

#### 2.1.1. Differentiability on R

Some definitions define differentiability only for interior points, others define it for limit points as well. We follow the latter definition.

**Definition (pointwise differentiability)** Let \(X\) be a subset of \(\mathbb{R}\), \(x_0 \in X\) which is a limit point of \(X\), \(f: X \to \mathbb{R}\). If the limit

converges to some real number \(L\), we say that \(f\) is differentiable at \(x_0\) on \(X\) with derivative \(L\) and write \(f'(x_0) := L\). Otherwise \(f'(x_0)\) is undefined and \(f\) is not differentiable at \(x_0\).

Note that differentiability is a local property with respect to a point. It is possible that differentiability only happen for a single point

differentiable at 1 point

Consider the function:

It is differentiable at only \(0\).

**Definition (differentiability on domain)** Let \(X\) be a subset of \(R\) and let \(f: X \to R\) be a function. \(f\) is differentiable on \(X\) iff \(f\) is differentiable at every limit point \(x_0 \in X\)

#### 2.1.2. Set of Differentiability

Continuity does not guarantee the differentiability. As mentioned in this math stackexchange thread:

let \(f: \mathbb{R} \to \mathbb{R}\), the set of points where \(f\) is differentiable is a measurable set.

Consider the following examples

!!! example "differentiable only at \(\{ 0 \}\)

```
Consider the function:
$$f(x) = \begin{cases} x^2 & \text{ if } x \in Q \\ 0 & \text{ if } x \not\in Q \end{cases}$$
It is differentiable at only $0$.
```

differentiable at \(\mathbb{R} \setminus \{0\}\)

An obivious example is \(f(x) = |x|\)

Another example is the function \(g_1(x) = x \sin(1/x)\) when \(x \neq 0\), otherwise \(g_1(x)=0\). This function is continuous everywhere. But not differentiable at \(0\)

Weierstrass function: continuous everywhere but differentiable nowhere

The easy example is the absolute value function where 0 is not differentiable. Weierstrass has a even function where continuous but nowhere differentiable

where \(a,b\) are carefully chosen.

### 2.2. Differentiation Theorems

#### 2.2.1. Extreme Value and Intermediate Value

**Theorem (interior extreme value theorem, Fermat)** Let \(f\) be differentiable on an open interval \((a,b)\) and attains a maximum value at some point \(c \in (a,b)\), then \(f'(c) = 0\)

Note this does not include the boundary, it is possible that derivative is not zero when it attains extreme value at the boundary.

Interior extreme value theorem can be applied to prove the intermediate value property of derivatives, check the proof on Wikipedia

**Theorem (intermediate value property of derivatives, Darboux)** If \(f\) is differentiable on an interval \([a,b]\), and if \(\alpha\) satisfies \(f'(a) < \alpha < f'(b)\), then there exists a point \(c \in (a,b)\) where \(f'(c) = \alpha\)

#### 2.2.2. Mean Value Theorem

Mean Value Theorem is the crucial step in the proof of the Fundamental Theorem of Calculus

**Theorem (Rolle)** Let \(a<b\) be real numbers, and let \(g: [a,b] \to R\) be a continuous function which is differentiable on \((a,b)\). Suppose also that \(g(a)=g(b)\). Then there exists an \(x \in (a,b)\) such that \(g'(x) = 0\)

Mean Value Theorem can be reduced to Rolle's Theorem

**Theorem (mean value theorem)** If \(f: [a,b] \to R\) is continuous on \([a,b]\) and differentiable on \((a,b)\), then there exists a point \(c \in (a,b)\) where

**Theorem (generalized mean value theorem)** If \(f, g\) are continuously on the closed interval \([a,b]\) and differentiable on the open interval \((a,b)\), then there exists a point \(c \in (a,b)\) where

**Theorem (L'Hospital)** Let \(f,g\) be continous onan interval containing \(a\), \(f,g\) be differentiable on this interval with the possible exception of the point \(a\), it \(f(a)=g(a)=0\) or \(f(a)=g(a)=\infty\), then

### 2.3. Classifications

#### 2.3.1. Continuously Differentiable Function

Being differentiable does not guarantee its derivative is continuous, showing

**Definition (class \(C^k, C^{\infty}\))** The class \(C^k\) is a set of function \(f\) where its derivatives \(f', f'', ..., f^{(k)}\) exist and are continuous.

- Continuous function is called \(C^0\) function
- continuously differentiable function is referred to as \(C^1\) functions.

differentiable everywhere but has discontinuity

Consider the following function

It is differentiable everywhere, the derivative is given by

However, it has the discontinuity at 0 which is an *essential* discontinuity

#### 2.3.2. Smooth Function

**Definition (\(C^{\infty}\), smooth)** It is said to be in the class \(C^{\infty}\) or **smooth**, if the function has derivatives of all orders.

For any \(C^{\infty}\) function, a Taylor series is defined at arbitrary points, but its neighbor is not guaranteed to converge.

smoothness does not imply analytic

Consider the function

The Taylor series of this function is \(0\) everywhere, therefore it does not converges to the original \(f(x)\)

#### 2.3.3. Analytic Function

To further guarantee convergence of Taylor Series, it needs to be an *analytic function*. We first look at a pointwise property:

**Definition (pointwise analytic)** A function is said to be analytic at \(x_0\) if there exists a neighborhood of \(x_0\) such that within the neighborhood, a series is convergent to \(f(x)\)

Analyic function is analytic at any points

**Defintion (analytic function, \(C^{\omega}\))** An analytic function is a smooth function that the Taylor series at any point \(x_0\) in its domain.

converges to \(f(x)\) for \(x\) in a neighborhood of \(x_0\) pointwise.

Note Analytic function is a strictly subset of smooth function, as mentioned above there are smooth functions that are not analytic function.

Analytic function is closed under

- sums, products, and compositions
- reciprocal if it is nowhere zero

## 3. Riemann Integral

Historically, the concept of integration was defined as the inverse process of differentiation. This approach, however, is unsatisfying because it results in a very limited number of functions that can be limited. For example, any function with a jump discontinuity cannot be integrated (because of Darboux's Theorem). Around 1850 in the work of Cauchy and Riemann, integration start to use the notion of area under the curve as a starting point for building rigorous definition of the integral.

### 3.1. Definitions

#### 3.1.1. Partitions

**Definition (length of intervals)** If \(I\) is a bounded interval, we define the length of \(I\), denoted \(|I|\). If \(I\) is one of tthe intervals \([a,b], (a,b), [a,b), (a,b]\) for some real numbers \(a<b\), then we define \(|I| := b-a\). Otherwise if \(I\) is a point or the empty set, we define \(|I|=0\)

**Definition (Partitions)** Let \(I\) be a bounded interval. A partition of \(I\) is a finite set \(P\) of bounded intervals contained in \(I\), such that every \(x \in I\) lies in exactly one of the bounded intervals \(J \in P\)

**Theorem (length is finitely additive)** Let \(I\) be a bounded interval, n be a natural number, and let \(P\) be a partition of \(I\) of cardinality \(n\) Then

**Definition (finer and coarser partitions)** Let \(I\) be a bounded interval, \(P, P'\) be two partitions of \(I\). We say that \(P'\) is finer than \(P\) if for every \(J \in P'\), there exists a \(K \in P\) such that \(J \subseteq K\)

**Definition (common refinement)** Let \(I\) be a bounded interval, \(P, P'\) be two partitions of \(I\). We define the common refinement \(P \# P'\) to be the set

**Definition (lower sum, upper sum)** The lower sum, upper sum of a bounded function \(f\) with respect to partition \(P\) is given by

where \(m_k := \inf\{ f(x): x\in [x_{k-1}, x_k] \}\), \(M_k := \sup\{ f(x): x\in [x_{k-1}, x_k] \}\)

lower sum, upper sum

Define \(f: [0, 1] \to R\) by \(f(x) = x^2\), let \(P_n\) denote the partition \(0, 1/n, 2/n, ..., 1\), then

#### 3.1.2. Riemann Integrability

It is easy to that for any partition \(P, P' \in \mathcal{P}\), we have

so \(L(f,P)\) is upper-bounded and \(U(f, P)\) is lower-bounded, therefore, we can take their sup and inf respectively.

**Definition (upper integral, lower integral)** Let \(\mathcal{P}\) be the collection of all possible partitions of the interval \([a,b]\). The upper integral, lower integral of \(f\) is defined to be

Notice that \(U(f), L(f)\) always exists if \(f\) is bounded, but they are not always equal to each other, we claim \(f\) is integrable when they are equal

**Definition (Riemann Integrability)** A **bounded** function \(f\) defined on the interval \([a,b]\) is Riemann-integrable if \(U(f) = L(f)\). In this case

We emphasize that a function has to be **bounded** to be Riemann Integrable and it has to be on closed interval \([a,b]\)

\(x^2\) is Riemann Integrable

Consider the previous example, it is easy to see

therefore \(L(f) \geq U(f) \implies L(f) = U(f)\)

Dirichlet function is not Riemann Integrable

In the case of Dirichlet function, it is easy to see

therefore it is not Riemann Integrable

**Criterion (Integrability)** A bounded function \(f\) is integrable on \([a,b]\) iff for every \(\epsilon > 0\) there exists a partition \(P_{\epsilon}\) of \([a,b]\) such that

By applying this criterion, we know several classes of functions are integrable

**Criterion (continuous function is integrable)** If \(f\) is continuous on \([a,b]\), then it is integrable

Proof: This can be shown by controlling the difference between max and min within each range by exploiting uniform continuity, (which is guaranteed by the domain compactness)

**Criterion (monotone function is integrable)** If \(f: [a,b] \to \mathbb{R}\) is monotone on the set \([a,b]\), then it is integrable.

#### 3.1.3. Riemann-Stieltjes Integral

See this lecture note

Riemann-Stieltjes Integral is a generalization of Riemann integral

**Definition (Riemann-Stieltjes Integrable)** Let \(F\) be an incresasing function defined on the interval \(I\), and let \(g\) be a function defined on \(I\). Then \(g\) is called Riemann-Stieltjes integrable wrt \(F\), if for every \(\epsilon > 0\) there are step functions \(h_1, h_2\) such that \(h_1 < g < h_2\) and

If \(g\) is Riemann-Stieltjes Integrable, we define Riemann-Stieltjes Integral of \(g\) as

Riemann-Stieltjes Integral is a generation of Riemann integral where \(F(u) = u\)

### 3.2. Integral Theorems

#### 3.2.1. Properties of the Integral

**Theorem** Assume \(f: [a,b] \to R\) is bounded and \(c \in (a,b)\). Then \(f\) is integrable on \([a,b]\) iff \(f\) is integrable on \([a,c]\) and \([c,b]\), in which case

**Theorem** Assume \(f\) and \(g\) are integrable functions on the interval \([a,b]\)

The function \(f+g\) is integrable on \([a,b]\)

For \(k \in R\), the function \(kf\) is integrable

If \(f(x) < g(x)\) on \([a,b]\)

The function \(|f|\) is integrable and

**Theorem (Integral Limit Theorem)** Assume that \(f_n \to f\) uniformly on \([a,b]\) and each \(f_n\) is integrable. Then \(f\) is integrable and

#### 3.2.2. Fundamental Theorem of Calculus

Note that Stoke theorem can be thought as generalization of those fundamental theorems.

**Theorem (fundamental theorem of calculus 1, Integration of Differentiation)** if \(f: [a,b] \to R\) is integrable and \(f\) is antidifferentiable such that \(F: [a,b] \to R\) is antiderivative of \(f\) then

**Theorem (fundamental theorem of calculus 2, Differentiation of Integration)** Let \(g: [a,b] \to R\) be integrable and for \(x \in [a,b]\) define

then \(G\) is continuous on \([a,b]\) If \(g\) is continuous at some point \(c \in [a,b]\), then \(G\) is differentiable at \(c\) and \(G'(c) = g(c)\)

continuity is required in the 2^{nd} statement

Consider the function

It has 1 discontinuity at 0 and its integration is

\(F(x)\) is not differentiable at this point!

Note the other side is not true: \(G\) being able to differentiate at \(c\) does not imply that \(g(c)\) is continuous.

**Lemma (Integration by parts)** Assume \(f(x), g(x)\) are continuously differentiable, then

Note the requirement is a bit stronger than necessary.

**Lemma (Integration by substitution)** Assume \(f(x)\) is continuous, and \(g(x)\) is continuously differentiable, then

proof of integration by substitution

As \(f\) is continuous and \(g\) is continuously differentiable. We know \(f\) has an antiderivative \(F\) such that \(F' = f\) and \(F(g(x))\) is well-defined. By chain rule, we know

which is also continuous. Therefore by the fundamental theorem

Also we know by the fundamental theorem

Therefore the integration by substitution is proved.

Leibnitz's rule is an application of the Fundamental Theorem and chain rules. It characterizes the interchanging the differnetiation and integral.

**Theorem (Leibnitz's Rule)** If \(f(x, \theta), a(\theta), b(\theta)\) are differentiable with respect to \(\theta\), then

If both \(a(\theta), b(\theta)\) are constant, we have a special case of Leibnitz's Rule \(\(\frac{d}{d\theta} \int_{a}^{b} f(x, \theta) dx = \int_{a}^{b} \frac{\partial}{\partial \theta} f(x, \theta) dx\)\)

### 3.3. Classifications

The major function classes related to Riemann integral can be classified as follows. Note that integrable family is boarder than continous, but differentiable function is more narrow than continuous function.

counter example (integrable vs antidifferentiable)

Note that integrable function and function can be taken antiderivative are not equivalent. For example, the following example is integrable but not antidifferentiable.

The class of functions whose Antiderivative exists falls somewhere between the previous hierarchy, because every continuous function has antiderivative (guaranteed by the fundamental theorem), and function with antiderivative can be integrable, but not every integrable function has antiderivative. Note there are also some examples where functions are not continuous but has antiderivative.

#### 3.3.1. Riemann Integrable Function

Any function with a finite number of discontinuity is integrable, some function with infinite discontinuities still might be integrable, depending on its measure of discontinuity.

**Criterion (measure of zero, Lebesgue criterion)** Let \(f: [a,b] \to R\) be a bounded function. \(f\) is Riemann-integrable iff the set of noncontinous point has measure zero

Function with \(N\) discontinuity is integrable

Consider the function

$$f(x) = \begin{cases} 1 & \text{ if } x=1/n \text{ for some } n \in N \ 0 & \text{ otherwise} \end{cases}

This function has discontinuity of \(N\) and is integrable (by considering partition sequence with length of \(1/n^2\))

Function with countable discontinuity is integrable (Thomae's function)

Thomae's function has discontiuities at every rational number

Its discontinuity has measure 0 and is integrable.

Function with uncountable discontinuity might be integrable (characteristic of Cantor)

Consider the indicator function over the Cantor set

where \(C\) is the cantor set. see proof here

This function has uncountable discontinuity but with measure 0, therefore it is Riemann Integrable

Dirichlet's function is not Riemann Integrable

The Dirichlet's function is not Riemann Integrable because the noncontinuous point has measure 1.

## 4. Reference

[1] Tao, Terence. Analysis. Vol. 1. Hindustan Book Agency, 2006.

[2] Tao, Terence. Analysis. Vol. 2. Hindustan Book Agency, 2006.

[3] Abbott, Stephen. Understanding analysis. Vol. 2. New York: Springer, 2001.

[4] Lax, Peter D., and Maria Shea Terrell. Multivariable Calculus with Applications. Springer, 2017.

[5] 杉浦光夫. "解析入門 I." 東京大学出版会

[6] 杉浦光夫. "解析入門 II." 東京大学出版会