“Young man, in mathematics you don’t understand things. You just get used to them”

John von Neumann

“I hear and I forget. I see and I remember. I do and I understand”

Chinese Quote

1 Introduction

The following definitions and lemmas we will use in our paper (compare [2, 9]):

Rectangles. A closed rectangle R in \(\mathbb {R}^d\) is given by the product of d one-dimensional closed and bounded intervals: \(R = [a_1, b_1]\times [a_2, b_2]\times \cdots \times [a_d, b_d]\), where \(a_j\le b_j\) are real numbers, \(j = 1, 2, \ldots ,d\). In other words, we have \(R = \{(x_1, \ldots , x_d) \in \mathbb {R}^d : a_j \le x_j \le b_j \text { for all } j = 1, 2, \ldots , d\}\). We remark that in our definition, a rectangle is closed and has sides parallel to the coordinate axis. In \(\mathbb {R}\), the rectangles are precisely the closed and bounded intervals, while in \(\mathbb {R}^2\) they are the usual four-sided rectangles. In \(\mathbb {R}^3\) they are the closed rectangular parallelepipeds.

An open rectangle is the product of open intervals, and the interior of the rectangle R is then

$$\begin{aligned} (a_1, b_1)\times (a_2, b_2)\times \cdots \times (a_d, b_d). \end{aligned}$$

We say that the lengths of the sides of the rectangle R (open or closed) are \(b_1-a_1, \ldots , b_d-a_d\). The volume of the rectangle R (open or closed) is denoted by \({{\,\mathrm{vol}\,}}{(R)}\), and is defined to be \({{\,\mathrm{vol}\,}}{(R)} = (b_1 - a_1)\cdots (b_d- a_d)\).

A union of rectangles is said to be almost disjoint if the interiors of the rectangles are disjoint. In this paper, coverings by rectangles play a major role, so we isolate here five important lemmas.

Lemma 1.1

If a closed rectangle is the almost disjoint union of finitely many other closed rectangles, say \(R =\bigcup _{k=1}^N R_k\), then \({{\,\mathrm{vol}\,}}{(R)} = \sum _{k=1}^N{{\,\mathrm{vol}\,}}(R_k)\).

Lemma 1.2

If \(R, R_1, \ldots , R_N\) are closed rectangles, and \(R\subset \bigcup _{k=1}^N R_k\), then

$$\begin{aligned} {{\,\mathrm{vol}\,}}(R)\le \sum _{k=1}^N{{\,\mathrm{vol}\,}}(R_k). \end{aligned}$$

Proof of the Lemmas 1.1, 1.2 can be found in [5, 9, 10].

Lemma 1.3

If \(R_1, \ldots , R_N\) are almost disjoint closed rectangles, \(Q_1, \ldots , Q_M\) are some other almost disjoint closed rectangles and \(\bigcup _{k=1}^N R_k \subset \bigcup _{k=1}^M Q_k\), then \( \sum _{k=1}^N{{\,\mathrm{vol}\,}}(R_k)\le \sum _{k=1}^M{{\,\mathrm{vol}\,}}(Q_k)\).

The proof of 1.3 can be found in [5].

The ideas of the presented below proofs of lemmas are well known but we could not find the sources of the proofs.

Lemma 1.4

If \(R_1, \ldots , R_N\) are almost disjoint closed rectangles, \(Q_1, \ldots , Q_M\) are some closed rectangles and \(\bigcup _{k=1}^N R_k \subset \bigcup _{k=1}^M Q_k\), then \( \sum _{k=1}^N{{\,\mathrm{vol}\,}}(R_k)\le \sum _{k=1}^M{{\,\mathrm{vol}\,}}(Q_k)\).

Proof

Because \(\displaystyle \bigcup _{k=1}^N R_k \subset \bigcup _{k=1}^M Q_k\) and \(R_1, \ldots , R_N\) are almost disjoint we have:

\(\displaystyle R_i \subset \bigcup _{j=1}^M R_i\cap Q_j\) for \(i=1,2,\ldots N\) and

\(\displaystyle Q_j \supset \bigcup _{i=1}^N R_i\cap Q_j\) for \(j=1,2,\ldots M\).

By Lemma 1.2 we have:

$$\begin{aligned} {{\,\mathrm{vol}\,}}(R_i) \le \sum _{j=1}^M {{\,\mathrm{vol}\,}}(R_i\cap Q_j) \; \text {for}\; i=1,2,\ldots N. \end{aligned}$$
(1.1)

We see that for each \(j=1,2,\ldots M\) the set \(\displaystyle \{R_i\cap Q_j: i=1,2,\ldots n\}\) is collection of almost disjoint rectangles so by Lemma 1.3 we have:

$$\begin{aligned} {{\,\mathrm{vol}\,}}(Q_j) \ge \sum _{i=1}^N {{\,\mathrm{vol}\,}}(R_i\cap Q_j)\; \text {for}\; j=1,2,\ldots M. \end{aligned}$$
(1.2)

Finally from Eqs. 1.1 and 1.2 we have:

$$\begin{aligned} \displaystyle \sum _{i=1}^N{{\,\mathrm{vol}\,}}(R_i) \le \sum _{i=1}^N\sum _{j=1}^M {{\,\mathrm{vol}\,}}(R_i\cap Q_j)= \sum _{j=1}^M\sum _{i=1}^N {{\,\mathrm{vol}\,}}(R_i\cap Q_j) \le \sum _{j=1}^M{{\,\mathrm{vol}\,}}(Q_j) \end{aligned}$$

\(\square \)

In the last proof instead of Lemma 1.3 we could use simpler lemma: If a closed rectangle R contains the almost disjoint union of finitely many other closed rectangles, say \(\bigcup _{k=1}^N R_k\subset R\), then \(\sum _{k=1}^N{{\,\mathrm{vol}\,}}(R_k)\le {{\,\mathrm{vol}\,}}{(R)}\) which can be proved by modifying the proof of the Lemma 1.1 from [9] or its proof can be found in [10]. The Lemma 1.4 could also be proved directly by modifying the proof of the Lemma 1.3 from [5].

Applying the previous Lemma 1.4 we can prove (see [9]):

Lemma 1.5

If \(R_1, \ldots , R_N\) are almost disjoint closed rectangles, \(Q_k\), \(k=1, 2, \ldots \) are some closed rectangles and \(\bigcup _{k=1}^N R_k \subset \bigcup _{k=1}^\infty Q_k\), then \( \sum _{k=1}^N{{\,\mathrm{vol}\,}}(R_k)\le \sum _{k=1}^\infty {{\,\mathrm{vol}\,}}(Q_k)\).

Proof

Let \(A=\bigcup _{k=1}^N R_k\). For a fixed \(\varepsilon > 0\) we choose for each k an open rectangle \(P_k\) which contains \(Q_k\) (\(\displaystyle Q_k\subset P_k\)), and such that \({{\,\mathrm{vol}\,}}(P_k) \le (1 + \varepsilon ){{\,\mathrm{vol}\,}}(Q_k)\). From the open covering \(\bigcup _{k=1}^\infty P_k\) of the compact set A, we may select a finite subcovering which, after possibly renumbering the rectangles, we may write as \(A\subset \bigcup _{k=1}^M P_k\). Taking the closure of the rectangles \(P_k\), we may apply Lemma 1.4 to conclude that for any \(\varepsilon \) we have:

\(\sum _{k=1}^N {{\,\mathrm{vol}\,}}(R_k)\le \sum _{k=1}^M {{\,\mathrm{vol}\,}}(P_k) \le (1+\varepsilon )\sum _{k=1}^M {{\,\mathrm{vol}\,}}(Q_k)\le (1+\varepsilon )\sum _{k=1}^\infty {{\,\mathrm{vol}\,}}(Q_k)\). Since \(\varepsilon \) is arbitrary, we find that \(\sum _{k=1}^N {{\,\mathrm{vol}\,}}(R_k) \le \sum _{k=1}^\infty {{\,\mathrm{vol}\,}}(Q_k)\). \(\square \)

Definition 1

(Lebesgue outer measure) (see [1, 2, 4, 6, 8, 9]) The outer measure \(m^*\) for any \(A\subset \mathbb {R}^d\) is defined by the following formula:

$$\begin{aligned} m^*(A) = \inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}{(R_j)}: A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^d, j\in \mathbb {N}\Big \}. \end{aligned}$$
(1.3)

Definition 2

(Lebesgue measure) (see [1, 2, 4, 6, 8, 9]) Let \((\mathbb {R}^d, \mathfrak {M}, m)\) be measure space, where \(\mathfrak {M}\) is \(\sigma \)-algebra of Lebesgue measurable subsets in \(\mathbb {R}^d\), and m-Lebesgue measure on \(\mathbb {R}^d\). The measure m for any \(A\in \mathfrak {M}\) is defined by the formula 1.3 (\(\displaystyle m(A)=m^*(A)\)).

2 Example 1: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le x^2, 0\le x \le 1\big \} \)

Let A be the set in \(\mathbb {R}^2\) bounded by curves: \(y=x^2\), \(y=0\), \(x=1\), which means that \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le x^2, 0\le x \le 1\big \} \). Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1 and Lemma 1.5.

For \(n \in \mathbb {N}\) define: \(\bar{R}_j^n=[\frac{j-1}{n}, \frac{j}{n}]\times [0,\frac{j^2}{n^2}]\), \(j=1,2,\ldots n\) and \(\underline{R}_j^n=[\frac{j-1}{n}, \frac{j}{n}]\times [0,\frac{(j-1)^2}{n^2}]\), \(j=1,2,\ldots n\).

Step 1.\(\displaystyle \sum _{j=1}^n {{\,\mathrm{vol}\,}}(\bar{R}_j^n) = \sum _{j=1}^n \frac{1}{n} \frac{j^2}{n^2} =\frac{1}{n^3} \sum _{j=1}^n j^2 =\frac{1}{n^3}\frac{n(n+1)(2n+1)}{6} \displaystyle =\frac{1}{n^2}\frac{(n+1)(2n+1)}{6} \rightarrow \frac{1}{3}\).

We can check our hand calculation using Wolfram Mathematica (see [7, 12]) :

figure a

Hence because \( A\subset \bigcup _{j=1}^n \bar{R}_j^n\), we have:

$$\begin{aligned} \begin{aligned} m^*(A) =&\inf \left\{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\right\} \\ \le&\inf \Big \{ \sum _{j=1}^{n} {{\,\mathrm{vol}\,}}(\bar{R}_j^n): n\in \mathbb {N}\Big \} \le \frac{1}{3}. \end{aligned} \end{aligned}$$
(2.1)

Step 2. Note that:

$$\begin{aligned} \begin{aligned} \sum _{j=1}^n {{\,\mathrm{vol}\,}}(\underline{R}_j^n)&= \sum _{j=1}^n \frac{1}{n} \frac{(j-1)^2}{n^2} = \frac{1}{n^3} \sum _{j=1}^{n-1} j^2 \\&=\frac{1}{n^3}\frac{(n-1)n(2n-1)}{6}= \frac{1}{n^2}\frac{(n-1)(2n-1)}{6}\rightarrow \frac{1}{3}. \end{aligned} \end{aligned}$$
(2.2)

We can check our hand calculation using Wolfram Mathematica:

figure b
Fig. 1
figure 1

Approximation of Lebesgue outer measure of A by rectangles \(\bigcup _{j=1}^n\underline{R}_j^n\) for Example 1

Fig. 2
figure 2

Approximation of Lebesgue outer measure of A by rectangles \(\bigcup _{j=1}^n\bar{R}_j^n\) for Example 1

The dynamic versions of the Figs. 1 and 2 can be found in the Electronic supplementary material.

We consider an arbitrary countable covering \(A\subset \bigcup _{j=1}^\infty R_j\) by closed rectangles.

Hence because \( \bigcup _{j=1}^n \underline{R}_j^n \subset A \subset \bigcup _{j=1}^\infty R_j\) from Lemma 1.5 we have that for any n:

\(\sum _{j=1}^n {{\,\mathrm{vol}\,}}(\underline{R}_j^n)\le \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j)\).

Applying the formula 2.2 we have: \(\sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j) \ge \lim _{n\rightarrow \infty } \sum _{j=1}^n {{\,\mathrm{vol}\,}}(\underline{R}_j^n) =\frac{1}{3}\). Consequently,

$$\begin{aligned} \begin{aligned} m^*(A) = \inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \ge \frac{1}{3}. \end{aligned} \end{aligned}$$
(2.3)

From inequalities (2.1) and (2.3) we have \(m^*(A) = \frac{1}{3}\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because A is closed, so \(m(A) = \frac{1}{3}\).

3 Example 2: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le \exp (-x), x\ge 0\big \} \)

Let A be the set in \(\mathbb {R}^2\) bounded by curves: \(y=\exp (-x)\), \(y=0\) for \(x\in [0, \infty )\), which means that \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le \exp (-x), x\ge 0\big \} \). Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1 and Lemma 1.5.

For \(n \in \mathbb {N}\) define: \(\bar{R}_{jk}^{n}=[k+\frac{j}{2^n}, k+\frac{j+1}{2^n}]\times [0,\exp (-k-\frac{j}{2^n})]\), \(j=0, 1, 2, \ldots , 2^n-1\), \(k=0, 1, 2, \ldots \infty \), and \(\underline{R}_j^n=[\frac{j}{2^n}, \frac{j+1}{2^n}]\times [0,\exp (-\frac{j+1}{2^n})]\), \(j=0,1,2,\ldots n2^n-1\).

Step 1. Using Wolfram Mathematica:

figure c

we get:

$$\begin{aligned} \begin{aligned} \sum _{j=0}^{2^n-1} \sum _{k=0}^{\infty } {{\,\mathrm{vol}\,}}(\bar{R}_{jk}^{n}) = \sum _{j=0}^{2^n-1} \sum _{k=0}^{\infty } \frac{1}{2^n} \exp \left( -k-\frac{j}{2^n}\right) = \frac{2^{-n}e^{2^{-n}}}{e^{2^{-n}}-1} \rightarrow 1. \end{aligned} \end{aligned}$$
(3.1)

Hence because \( A\subset \bigcup _{j=0}^{2^n-1}\bigcup _{k=0}^{\infty }\bar{R}_{jk}^{n}\), we have:

$$\begin{aligned} \begin{aligned} m^*(A) =&\inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \\ \le&\inf \Big \{ \sum _{j=0}^{2^n-1} \sum _{k=0}^{\infty } {{\,\mathrm{vol}\,}}(\bar{R}_{jk}^{n}): n\in \mathbb {N}\Big \} \le 1. \end{aligned} \end{aligned}$$
(3.2)

Step 2. Using Wolfram Mathematica:

figure d

We get that:

$$\begin{aligned} \begin{aligned} \sum _{j=0}^{n2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) = \sum _{j=0}^{n2^n-1} \frac{1}{2^n} \exp \left( -\frac{j+1}{2^n}\right) = \frac{(2e)^{-n}(e^n-1)}{e^{2^{-n}}-1} \rightarrow 1. \end{aligned} \end{aligned}$$
(3.3)

Of course, we could use the following formulae: \(\displaystyle \sum _{k=0}^n q^k=\frac{1-q^{n+1}}{1-q}\) (\(q\ne 1\)) and \(\displaystyle \lim _{x\rightarrow 0}\frac{\exp x - 1}{x}=1\) instead of the code in Listings 3 and 4 to get the results in formulae (3.1) and (3.3).

We consider an arbitrary countable covering \(A\subset \bigcup _{j=1}^\infty R_j\) by closed rectangles.

Hence because \(\displaystyle \bigcup _{j=0}^{n2^n-1} \underline{R}_j^n \subset A\subset \bigcup _{j=1}^{\infty }R_j\) from Lemma 1.5 we have that for any n:

\(\sum _{j=0}^{n2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n)\le \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j)\).

Applying the formula 3.3 we have: \(\sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j) \ge \lim _{n\rightarrow \infty } \sum _{j=0}^{n2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) =1\). Consequently,

$$\begin{aligned} \begin{aligned} m^*(A) = \inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \ge 1. \end{aligned} \end{aligned}$$
(3.4)

From inequalities (3.2) and (3.4) we have \(m^*(A) = 1\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because A is closed, so \(m(A) = 1\).

Fig. 3
figure 3

Approximation of Lebesgue outer measure of A by rectangles \(\bigcup _{j=0}^{n2^n-1}\underline{R}_j^n\) for Example 2

Fig. 4
figure 4

Approximation of Lebesgue outer measure of A by rectangles \(\bigcup _{j=0}^{2^n-1}\bigcup _{k=0}^{\infty }\bar{R}_{jk}^{n}\) for Example 2

The dynamic versions of the Figs. 3 and 4 can be found in the Electronic supplementary material.

4 Example 3: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: \ln x \le y \le 0, x\in (0, 1]\big \} \)

Let A be the set in \(\mathbb {R}^2\) bounded by curves: \(y=\ln x\), \(y=0\) for \(x\in (0, 1]\), which means that \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: \ln x \le y \le 0, x\in (0, 1]\big \}\). Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1 and Lemma 1.5.

For \(n \in \mathbb {N}\) define: \(\bar{R}_{j}^{n}=[\frac{j}{2^n}, \frac{j+1}{2^n}]\times [\ln \frac{j}{2^n}, 0]\), \(j= 1, 2, \ldots , 2^n-1\), \(\bar{Q}_{k}^{n}=[\frac{1}{2^{k+1}}, \frac{1}{2^{k}}]\times [\ln \frac{1}{2^{k+1}}, 0]\), \(k= n, n+1, \ldots ,\infty \), and \(\underline{R}_j^n=[\frac{j}{n}, \frac{j+1}{n}]\times [\ln \frac{j+1}{n}, 0]\), \(j= 1, 2, \ldots , n-1\).

Step 1.

We can see that

$$\begin{aligned}&\begin{aligned} \sum _{k=n}^{\infty } {{\,\mathrm{vol}\,}}(\bar{Q}_{k}^{n}) = -\sum _{k=n}^{\infty } \frac{1}{2^{k+1}} \ln \left( \frac{1}{2^{k+1}}\right) =\frac{(n+2)}{2^{n}}\ln 2 \rightarrow 0. \end{aligned} \end{aligned}$$
(4.1)
$$\begin{aligned}&\begin{aligned} \sum _{j=1}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_{j}^{n}) = -\frac{1}{2^n}\sum _{j=1}^{2^n-1} \ln \left( \frac{j}{2^n}\right) =-\ln \frac{\root 2^n \of {(2^n)!}}{2^n}+\ln \root 2^n \of {2^n} \rightarrow 1, \end{aligned} \end{aligned}$$
(4.2)

because from calculus we know that \(\frac{\root n \of {n!}}{n}\rightarrow 1/e\). Hence, because \( A\subset \bigcup _{k=n}^{\infty }\bar{Q}_{k}^{n}\cup \bigcup _{j=1}^{2^n-1}\bar{R}_{j}^{n}\), we have:

$$\begin{aligned} \begin{aligned} m^*(A) =&\inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \\ \le&\inf \Big \{ \sum _{k=n}^{\infty }\bar{Q}_{k}^{n}+\sum _{j=1}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_{j}^{n}): n\in \mathbb {N}\Big \} \le 1. \end{aligned} \end{aligned}$$
(4.3)

Step 2.

We get that:

$$\begin{aligned} \begin{aligned} \sum _{j=1}^{n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) = -\frac{1}{n}\sum _{j=1}^{n-1} \ln \left( \frac{j+1}{n}\right) =-\ln \frac{\root n \of {n!}}{n} \rightarrow 1. \end{aligned} \end{aligned}$$
(4.4)

We consider an arbitrary covering \(A\subset \bigcup _{j=1}^\infty R_j\) by closed rectangles.

Hence, because \(\displaystyle \bigcup _{j=1}^{n-1} \underline{R}_j^n \subset A\subset \bigcup _{j=1}^{\infty }R_j\) from Lemma 1.5 we have that for any n:

\(\sum _{j=1}^{n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n)\le \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j)\).

Applying the formula 4.4 we have: \(\sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j) \ge \lim _{n\rightarrow \infty } \sum _{j=1}^{n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) =1\). Consequently,

$$\begin{aligned} \begin{aligned} m^*(A) = \inf \Bigg \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Bigg \} \ge 1. \end{aligned} \end{aligned}$$
(4.5)

From inequalities (4.3) and (4.5) we have \(m^*(A) = 1\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because A is Borel set, so \(m(A) = 1\).

Of course, we could use almost the same \(\bar{R}_{jk}^n\) and \(\underline{R}_j^n\) like in example 2 in Sect. 3.

5 Example 4: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le 1/x, x\ge 1\big \} \)

Let A be the set in \(\mathbb {R}^2\) bounded by curves: \(y=1/x\), \(y=0\) for \(x\in [1, \infty )\), which means that \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le 1/x, x\ge 1\big \} \). Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1 and Lemma 1.5.

For \(n \in \mathbb {N}\) define:

\(\underline{R}_k^n=[k, k+1]\times [0, \frac{1}{k+1}]\), \(k=1,2,\ldots n\).

We can see that

$$\begin{aligned} \begin{aligned} \sum _{k=1}^{n} {{\,\mathrm{vol}\,}}(\underline{R}_{k}^{n}) = \sum _{k=1}^{n} \frac{1}{k+1} \rightarrow \infty . \end{aligned} \end{aligned}$$
(5.1)

We consider an arbitrary covering \(A\subset \bigcup _{j=1}^\infty R_j\) by closed rectangles.

Hence, because \(\displaystyle \bigcup _{k=1}^{n} \underline{R}_k^n \subset A\subset \bigcup _{j=1}^\infty R_j\) from Lemma 1.5 we have that for any n:

\(\sum _{k=1}^{n} {{\,\mathrm{vol}\,}}(\underline{R}_k^n)\le \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j)\).

Applying the formula 5.1 we have: \(\sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j) \ge \lim _{n\rightarrow \infty } \sum _{k=1}^{n} {{\,\mathrm{vol}\,}}(\underline{R}_k^n) =\infty \). Consequently,

$$\begin{aligned} \begin{aligned} m^*(A) = \inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \ge \infty . \end{aligned} \end{aligned}$$
(5.2)

From inequality (5.2) we have \(m^*(A) = \infty \) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because A is closed, so \(m(A) = \infty \).

Similarly, we can prove directly from formula (1.3) from Definition 1 that \(\displaystyle m^*(\big \{ (x,y) \in \mathbb {R}^2: 0\le y \le 1/x, x\in (0, 1]\big \})=\infty \).

6 Example 5: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le f(x), 0\le x \le 1\}\), where f(x) is Function Defined in (6.1)

$$\begin{aligned} f(x)= x\chi _{[0, 1]\cap \mathbb {Q}}(x) ={\left\{ \begin{array}{ll} x &{} \text {if } x\in [0, 1]\cap \mathbb {Q},\\ 0 &{} \text {if } x\in [0, 1]{\setminus } \mathbb {Q}. \end{array}\right. } \end{aligned}$$
(6.1)

Let \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le f(x), 0\le x \le 1\}\), where f(x) is function defined in (6.1). Let us calculate Lebesgue outer measure of A using only formula (1.3) from definition 1.

Let \(r_i\), \(i=1, 2, 3, \ldots \) be a sequence of all rational numbers from the interval [0, 1].

For \(n \in \mathbb {N}\) define:

\(\displaystyle R_0=[0, 1]\times \{0\}, R_i= \big [r_i-\frac{1}{2^{n+i+1}}, r_i+\frac{1}{2^{n+i+1}}\big ]\times [0, 1]\; \text { for } i=1, 2, 3, \ldots \)

One can see that for \(n \in \mathbb {N}\) we have:

$$\begin{aligned}&A\subset R_0 \cup \bigcup _{i=1}^\infty R_i, \end{aligned}$$
(6.2)
$$\begin{aligned}&{{\,\mathrm{vol}\,}}(R_0)+\sum _{i=1}^\infty {{\,\mathrm{vol}\,}}(R_i)\le 0+\sum _{i=1}^\infty \frac{1}{2^{n+i}} = \frac{1}{2^n}\rightarrow 0 \quad \text { as } n\rightarrow \infty . \end{aligned}$$
(6.3)

From (6.2), (6.3) and properties of the greatest lower bound we have \(m^*(A) = 0\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because \(m^*(A)=0\), so \(m(A) =0\).

Similarly we can calculate Lebesgue outer measure of \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le g(x), 0\le x \le 1\}\), where g(x) is function defined in (6.4), using only formula (1.3) from Definition 1.

$$\begin{aligned} g(x)={\left\{ \begin{array}{ll} 1 &{} \text {if } x=0,\\ \frac{1}{q} &{} \text {if } x=\frac{p}{q}\in [0,1]\cap \mathbb {Q}, \frac{p}{q} \text { is in the lowest terms},\\ 0 &{} \text {if } x\in [0, 1]{\setminus } \mathbb {Q}. \end{array}\right. } \end{aligned}$$
(6.4)

7 Example 6: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le f(x), x\in [0, \infty )\}\), where f(x) is Function Defined in (7.1)

$$\begin{aligned} f(x)= e^x\chi _{[0, \infty )\cap \mathbb {Q}}(x) ={\left\{ \begin{array}{ll} e^x &{} \text {if } x\in [0, \infty )\cap \mathbb {Q},\\ 0 &{} \text {if } x\in [0, \infty ){\setminus } \mathbb {Q}. \end{array}\right. } \end{aligned}$$
(7.1)

Let \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le f(x), x\in [0, \infty )\}\), where f(x) is function defined in (7.1). Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1.

Let \(r_i\), \(i=0, 1, 2, 3, \ldots \) be a sequence of all rational numbers from the interval \([0, \infty )\).

For \(n \in \mathbb {N}\) define:

\(\displaystyle R_i^{n}= \big [r_i-\frac{1}{e^{r_i}2^{n+3+i}}, r_i+\frac{1}{e^{r_i}2^{n+3+i}}\big ]\times [0, e^{r_i}]\; \text { for } i=0, 1, 2, 3, \ldots \) and

\(Q_k^{n}=[k, k+1]\times [0, \frac{1}{2^{n+k+2}}]\), \(k=0, 1, 2, \ldots \)

One can see that for \(n \in \mathbb {N}\) we have:

$$\begin{aligned}&A\subset \bigcup _{k=0}^\infty Q_k^n \cup \bigcup _{i=0}^\infty R_i^n \end{aligned}$$
(7.2)
$$\begin{aligned}&\sum _{k=0}^\infty {{\,\mathrm{vol}\,}}(Q_k^n) + \sum _{i=0}^\infty {{\,\mathrm{vol}\,}}(R_i^n)= \sum _{k=0}^\infty \frac{1}{2^{n+k+2}} + \sum _{i=0}^\infty \frac{1}{2^{n+i+2}}=\frac{1}{2^n} \rightarrow 0 \quad \text { as } n\rightarrow \infty . \end{aligned}$$
(7.3)

From (7.2), (7.3) and properties of the greatest lower bound we have \(m^*(A) = 0\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because \(m^*(A)=0\), so \(m(A) =0\).

8 Example 7: \(\displaystyle A = [0, 1]\times [0, 1]{\setminus } \mathbb {Q}\times \mathbb {Q}\)

Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1.

Let \(r_i=(p_i, q_i)\in A\), \(i = 1, 2, 3, \ldots \) be a sequence of all points of A with both rational coordinates.

Because \(A\subset [0, 1]\times [0, 1]\) and \({{\,\mathrm{vol}\,}}( [0, 1]\times [0, 1])=1\) we have that \(m^*(A)\le 1\).

Suppose there exist rectangles \(R_i\subset \mathbb {R}^2\) such that \(\displaystyle A\subset \bigcup _{i=1}^\infty R_i\) and \(\displaystyle \sum _{i=1}^\infty {{\,\mathrm{vol}\,}}(R_i)=1-\varepsilon \) for some \(\varepsilon >0\).

Let \(\displaystyle Q_i=[p_i-\frac{\sqrt{\varepsilon }}{2^{(i+1)/2+1}}, p_i+\frac{\sqrt{\varepsilon }}{2^{(i+1)/2+1}}]\times [q_i-\frac{\sqrt{\varepsilon }}{2^{(i+1)/2+1}}, q_i+\frac{\sqrt{\varepsilon }}{2^{(i+1)/2+1}}]\) for \(i=1, 2, 3, \ldots \).

One can see that

$$\begin{aligned}{}[0, 1]\times [0, 1] \subset \bigcup _{i=1}^\infty Q_i \cup \bigcup _{i=1}^\infty R_i \end{aligned}$$
(8.1)

and

$$\begin{aligned} \sum _{i=1}^\infty {{\,\mathrm{vol}\,}}(Q_i) + \sum _{i=1}^\infty {{\,\mathrm{vol}\,}}(R_i)= \varepsilon \sum _{i=1}^\infty \frac{1}{2^{i+1}}+ 1-\varepsilon =1-\varepsilon /2<1 \end{aligned}$$
(8.2)

but \({{\,\mathrm{vol}\,}}( [0, 1]\times [0, 1])=1\) which contradicts Lemma 1.5 so \(m^*(A)=1\).

The set A is Lebesgue measurable because A is Borel set, so \(m(A) = 1\).

Similarly consider set \(\displaystyle B=[0, 1]^d {\setminus } \mathbb {Q}^d\). Because \(B\subset [0, 1]^d\) and \({{\,\mathrm{vol}\,}}( [0, 1]^d)=1\) we have that \(m^*(B)\le 1\).

Let \(t_i\in [0, 1]^d\cap \mathbb {Q}^n\), \(i = 1, 2, 3, \ldots \) be a sequence of all points of B with all rational coordinates.

Suppose there exist rectangles \(R_i\subset \mathbb {R}^d\) such that \(\displaystyle B\subset \bigcup _{i=1}^\infty R_i\) and \(\displaystyle \sum _{i=1}^\infty {{\,\mathrm{vol}\,}}(R_i)=1-\varepsilon \) for some \(\varepsilon >0\).

For a fixed \(\varepsilon > 0\) we choose for each \(i=1, 2, \ldots \) a rectangle \(P_i\) such that \(t_i \in P_i\) and that \({{\,\mathrm{vol}\,}}(P_i)=\frac{\varepsilon }{2^{i+1}} \).

One can see that

$$\begin{aligned} {[}0, 1]^d \subset \bigcup _{i=1}^\infty P_i \cup \bigcup _{i=1}^\infty R_i \end{aligned}$$
(8.3)

and

$$\begin{aligned} \sum _{i=1}^\infty {{\,\mathrm{vol}\,}}(P_i) + \sum _{i=1}^\infty {{\,\mathrm{vol}\,}}(R_i)= \varepsilon \sum _{i=1}^\infty \frac{1}{2^{i+1}}+ 1-\varepsilon =1-\varepsilon /2<1 \end{aligned}$$
(8.4)

but \({{\,\mathrm{vol}\,}}( [0, 1]^d])=1\) which contradicts Lemma 1.5 so \(m^*(B)=1\).

The set B is Lebesgue measurable because B is Borel set, so \(m(B) = 1\).

9 Example 8: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le \sin x, 0\le x \le \pi /2\big \} \)

Let A be the set in \(\mathbb {R}^2\) bounded by curves: \(y=\sin x\), \(y=0\) for \(x\in [0, \pi /2]\), which means that \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le \sin x, 0\le x \le \pi /2\big \} \). Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1 and Lemma 1.5.

For \(n \in \mathbb {N}\) define: \(\bar{R}_j^n=[\frac{j\pi }{2 \cdot 2^n}, \frac{(j+1)\pi }{2\cdot 2^n}]\times [0,\sin \frac{(j+1)\pi }{2\cdot 2^n}]\), \(j=0,1,2,\ldots 2^n-1\) and \(\underline{R}_j^n=[\frac{j\pi }{2\cdot 2^n}, \frac{(j+1)\pi }{2\cdot 2^n}]\times [0,\sin \frac{j\pi }{2\cdot 2^n}]\), \(j=0,1,2,\ldots 2^n-1\).

Step 1. Using Wolfram Mathematica:

figure e

we get:

$$\begin{aligned} \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_j^n) = \frac{\pi }{2^{n+1}} \sum _{j=0}^{2^n-1} \sin \left[ \frac{(j+1)\pi }{2^{n+1}}\right] = 2^{-2-n} \pi \left( 1+\cot \left[ 2^{-2-n} \pi \right] \right) \rightarrow 1. \end{aligned}$$
(9.1)

Hence, because \( A\subset \bigcup _{j=0}^{2^n-1} \bar{R}_j^n\), we have:

$$\begin{aligned} \begin{aligned} m^*(A) =&\inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \\ \le&\inf \Big \{ \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_j^n): n\in \mathbb {N}\Big \} \le 1. \end{aligned} \end{aligned}$$
(9.2)

Step 2.

Using Wolfram Mathematica:

figure f

We get that:

$$\begin{aligned} \begin{aligned} \sum _{j=0}^{2^n -1}{{\,\mathrm{vol}\,}}(\underline{R}_j^n) =\frac{\pi }{2^{n+1}}\sum _{j=1}^{2^n-1} \sin \Big [\frac{j\pi }{2^{n+1}}\Big ]= 2^{-2-n} \pi \left( -1+\cot \left[ 2^{-2-n} \pi \right] \right) \rightarrow 1. \end{aligned} \end{aligned}$$
(9.3)

Of course, we could use the following formulae: \(\displaystyle \sum _{k=1}^n\sin (kx)=\frac{\sin \frac{n+1}{2}x\sin \frac{n}{2}x}{\sin \frac{x}{2}}\) and \(\displaystyle \lim _{x\rightarrow 0}\frac{\sin x}{x}=1\) instead of the code in Listings 5 and 6 to get the results in formulae (9.1) and (9.3).

We consider an arbitrary covering \(A\subset \bigcup _{j=1}^\infty R_j\) by closed rectangles.

Hence, because \( \bigcup _{j=0}^{2^n-1} \underline{R}_j^n \subset A \subset \bigcup _{j=1}^\infty R_j\) from Lemma 1.5 we have that for any n:

\(\sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n)\le \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j)\).

Applying the formula 9.3 we have: \(\sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j) \ge \lim _{n\rightarrow \infty } \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) =1\). Consequently,

$$\begin{aligned} \begin{aligned} m^*(A) = \inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \ge 1. \end{aligned} \end{aligned}$$
(9.4)

From inequalities (9.2) and (9.4) we have \(m^*(A) = 1\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because A is closed, so \(m(A) =1\).

10 Example 9: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le \exp x, 0\le x \le 1\big \} \)

Let A be the set in \(\mathbb {R}^2\) bounded by curves: \(y=\exp x\), \(y=0\) for \(x\in [0, 1]\), which means that \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le \exp x, 0\le x \le 1\big \} \). Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1 and Lemma 1.5.

For \(n \in \mathbb {N}\) define: \(\bar{R}_j^n=[\frac{j}{2^n}, \frac{j+1}{2^n}]\times [0,\exp \frac{j+1}{2^n}]\), \(j=0,1,2,\ldots 2^n-1\) and \(\underline{R}_j^n=[\frac{j}{2^n}, \frac{j+1}{2^n}]\times [0,\exp \frac{j}{2^n}]\), \(j=0,1, 2,\ldots 2^n-1\).

Step 1. Using Wolfram Mathematica:

figure g

we get:

$$\begin{aligned} \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_j^n) = \sum _{j=0}^{2^n-1}\exp \frac{(j+1)}{2^{n}}\cdot \frac{1}{2^{n}} = 2^{-n}(1-e)e^{-2^{-n}}/(-1+e^{2^{-n}})\rightarrow e-1 \end{aligned}$$
(10.1)

Hence, because \( A\subset \bigcup _{j=0}^{2^n-1} \bar{R}_j^n\), we have:

$$\begin{aligned} \begin{aligned} m^*(A) =&\inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \\ \le&\inf \Big \{ \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_j^n): n\in \mathbb {N}\Big \} \le e-1. \end{aligned} \end{aligned}$$
(10.2)

Step 2. Using Wolfram Mathematica:

figure h

We get that:

$$\begin{aligned} \begin{aligned} \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n)=\frac{1}{2^n}\sum _{j=0}^{2^n-1}\exp \Big [\frac{j}{2^n}\Big ] = \frac{2^{-n} (-1+e)}{-1+e^{2^{-n}}}\rightarrow e-1. \end{aligned} \end{aligned}$$
(10.3)

Of course, we could use the following formulae: \(\displaystyle \sum _{k=0}^n q^k=\frac{1-q^{n+1}}{1-q}\) (\(q\ne 1\)) and \(\displaystyle \lim _{x\rightarrow 0}\frac{\exp x - 1}{x}=1\) instead of the code in Listings 7 and 8 to get the results in formulae (10.1) and (10.3).

We consider an arbitrary covering \(A\subset \bigcup _{j=1}^\infty R_j\) by closed rectangles.

Hence, because \( \bigcup _{j=0}^{2^n-1} \underline{R}_j^n \subset A \subset \bigcup _{j=1}^\infty R_j\) from Lemma 1.5 we have that for any n:

\(\sum _{j=1}^n {{\,\mathrm{vol}\,}}(\underline{R}_j^n)\le \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j)\).

Applying the formula 10.3 we have: \(\sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j) \ge \lim _{n\rightarrow \infty } \sum _{j=1}^n {{\,\mathrm{vol}\,}}(\underline{R}_j^n) =1\). Consequently,

$$\begin{aligned} \begin{aligned} m^*(A) = \inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \ge e-1. \end{aligned} \end{aligned}$$
(10.4)

From inequalities (10.2) and (10.4) we have \(m^*(A) = e-1\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because A is closed, so \(m(A) =e-1\).

11 Example 10: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le \ln (1-2r\cos x+r^2), 0 \le x \le \pi \big \}\; (r>1)\)

Let A be the set in \(\mathbb {R}^2\) bounded by curves: \(y= \ln (1-2r\cos x+r^2)\), \(y=0\) for \(x\in [0, \pi ]\), which means that \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le \ln (1-2r\cos x+r^2), 0\le x \le \pi \big \} (r > 1)\).

Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1 and Lemma 1.5.

Let \(\displaystyle f(x)= \ln (1-2r\cos x+r^2)\).

For \(n \in \mathbb {N}\) define: \(\bar{R}_j^n=[\frac{j\pi }{2^n}, \frac{(j+1)\pi }{2^n}]\times [0,f\big ( \frac{(j+1)\pi }{2^n}\big )]\), \(j=0,1,2,\ldots , 2^n-1\) and \(\underline{R}_j^n=[\frac{j\pi }{2^n}, \frac{(j+1)\pi }{2^n}]\times [0,f\big ( \frac{j\pi }{2^n}\big )]\), \(j=0,1,2, \ldots , 2^n-1\).

Step 1.

In the Mathematica code below we use the fact that if \(s_k\) is a sequence of positive values with convergent sum, then we have \(\displaystyle \sum _k s_k =\ln \big (\exp (\sum _k s_k )\big )=\ln \big (\prod _k \exp (s_k)\big )\).

Using Wolfram Mathematica we get:

figure i

we get:

$$\begin{aligned} \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_j^n) = \sum _{j=0}^{2^n-1}f\left( \frac{(j+1)\pi }{2^{n+1}}\right) \cdot \frac{1}{2^{n}}\pi \rightarrow 2\pi \ln (r). \end{aligned}$$
(11.1)

Hence, because \( A\subset \bigcup _{j=0}^{2^n-1} \bar{R}_j^n\), we have:

$$\begin{aligned} \begin{aligned} m^*(A) =&\inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \\ \le&\inf \Big \{ \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_j^n): n\in \mathbb {N}\Big \} \le 2\pi \ln (r). \end{aligned} \end{aligned}$$
(11.2)

Step 2. Using Wolfram Mathematica:

figure j

We get that:

$$\begin{aligned} \begin{aligned} \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) =\sum _{j=0}^{2^n-1}f\Big (\frac{j\pi }{2^{n+1}}\Big )\cdot \frac{1}{2^{n}}\pi \rightarrow 2\pi \ln (r). \end{aligned} \end{aligned}$$
(11.3)

In Listings 9, 10 we used the substitution rule (\(n\rightarrow 2^n\)) because when we used directly \(2^n\) instead n, Mathematica could not simplify the expression. We cannot calculate these limits in one step using Mathematica. But using other CAS (wxMaxima, MuPAD) we cannot calculate these limits even in two steps in any way.

Of course, we could use the following formulae (see [3]:

$$\begin{aligned} \displaystyle z^{2n}-1=(z^2-1)\prod _{k=1}^{n-1}\Big (1-2z\cos (k\pi /n)+z^2\Big ) \end{aligned}$$

instead of the code in Listings 9 and 10 to get the results in formulae (11.1) and (11.3).

We consider an arbitrary covering \(A\subset \bigcup _{j=1}^\infty R_j\) by closed rectangles.

Hence, because \( \bigcup _{j=0}^{2^n-1} \underline{R}_j^n \subset A \subset \bigcup _{j=1}^\infty R_j\) from Lemma 1.5 we have that for any n:

\(\sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n)\le \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j)\).

Applying the formula 11.3 we have: \(\sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j) \ge \lim _{n\rightarrow \infty } \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) = 2\pi \ln (r)\). Consequently,

$$\begin{aligned} \begin{aligned} m^*(A) = \inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \ge 2\pi \ln (r). \end{aligned} \end{aligned}$$
(11.4)

From inequalities (11.2) and (11.4) we have \(m^*(A) = 2\pi \ln (r)\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because A is closed, so \(m(A) =2\pi \ln (r)\).

12 Example 11: \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le x^m, 0\le x \le 1\big \}\; (m\in \mathbb {N})\)

Let A be the set in \(\mathbb {R}^2\) bounded by curve and lines: \(y=x^m\), \(y=0\), \(x=1\) for \(x\in [0, 1]\), which means that \(\displaystyle A = \big \{ (x,y) \in \mathbb {R}^2: 0\le y \le x^m, 0\le x \le 1\big \} \). Let us calculate Lebesgue outer measure of A using only formula (1.3) from Definition 1 and Lemma 1.5.

For \(n \in \mathbb {N}\) define: \(\bar{R}_j^n=[\frac{j}{2^n}, \frac{j+1}{2^n}]\times [0,\Big (\frac{j+1}{2^n}\Big )^m]\), \(j=0, 1,2,\ldots 2^n-1\) and \(\underline{R}_j^n=[\frac{j}{2^n}, \frac{j+1}{2^n}]\times [0,\Big (\frac{j}{2^n}\Big )^m]\), \(j=0, 1,2,\ldots 2^n-1\).

Step 1. Using Wolfram Mathematica:

figure k

we get: \(\displaystyle \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_j^n) = \sum _{j=0}^{2^n-1} \Big (\frac{j+1}{2^{n}}\Big )^m\cdot \frac{1}{2^{n}}\rightarrow \frac{1}{m+1}\).

Hence, because \( A\subset \bigcup _{j=0}^{2^n-1} \bar{R}_j^n\), we have:

$$\begin{aligned} \begin{aligned} m^*(A) =&\inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \\ \le&\inf \Big \{ \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\bar{R}_j^n): n\in \mathbb {N}\Big \} \le \frac{1}{m+1}. \end{aligned} \end{aligned}$$
(12.1)

Step 2.

Using Wolfram Mathematica:

figure l

We get that:

$$\begin{aligned} \begin{aligned} \sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) =\sum _{j=0}^{2^n-1}\Big (\frac{j}{2^{n}}\Big )^m\cdot \frac{1}{2^{n}} \rightarrow \frac{1}{m+1}. \end{aligned} \end{aligned}$$
(12.2)

Of course, we could use the Stolz and binomial theorems instead of the code in Listings 11 and 12 to get the results in formulae (12.1) and (12.2).

We consider an arbitrary covering \(A\subset \bigcup _{j=1}^\infty R_j\) by closed rectangles.

Hence, because \( \bigcup _{j=0}^{2^n-1} \underline{R}_j^n \subset A \subset \bigcup _{j=1}^\infty R_j\) from Lemma 1.5 we have that for any n:

\(\sum _{j=0}^{2^n-1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n)\le \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j)\).

Applying the formula 12.2 we have: \(\sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j) \ge \lim _{n\rightarrow \infty } \sum _{j=0}^{2^n=1} {{\,\mathrm{vol}\,}}(\underline{R}_j^n) =\frac{1}{m+1}\). Consequently,

$$\begin{aligned} \begin{aligned} m^*(A) = \inf \Big \{ \sum _{j=1}^\infty {{\,\mathrm{vol}\,}}(R_j): A\subset \bigcup _{j=1}^\infty R_j,\;\; R_j\ \ \text {is closed rectangle in } \mathbb {R}^2, j\in \mathbb {N}\Big \} \ge \frac{1}{m+1}. \end{aligned} \end{aligned}$$
(12.3)

From inequalities (12.1) and (12.3) we have \(m^*(A) = \frac{1}{m+1}\) directly from formula (1.3) from Definition 1. The set A is Lebesgue measurable because A is closed, so \(m(A) =\frac{1}{m+1}\).

13 Conclusions

In this paper the authors presented several examples of Lebesgue outer measure calculated directly from its definition using Mathematica.

We could not find any analogical examples in available literature, so this paper is an attempt to fill this gap.

Using Mathematica or other CAS programs for calculation Lebesgue outer measure directly from its definitions, seems to be didactically useful for students because of the possibility of symbolic calculation of sums, limits and plot graphs—checking our hand calculations. Moreover, we get students used not only to definition of Lebesgue outer measure but also to CAS applications generally.