Roots, powers, logarithms and modular arithmetic¶
Part 1 · Numbers and logic · Chapter 6 · lecture notes by Fabio Furini · Chapter PDF
1. Roots, powers, logarithms¶
- As a consequence of property \(R_4\) we can perform, in the real field, operations that are only occasionally possible in the rational field, such as extracting roots or raising to a power.
1.1 Arithmetic \(n\)-th roots¶
Theorem 1
For every \(y \in \R\), \(y > 0\) and \(n \in \N\), \(n \ge 1\), there exists one and only one \(x \in \R, x >0\), such that \(x^n = y\).
-
This number is called the arithmetic \(n\)-th root of \(y\) and is denoted by one of the symbols
\[ \sqrt[n]{y} {\rm ~~or~~} y^{\frac{1}{n}}. \]
Proof
The proof of this Theorem will be given using the properties of continuous functions. □
The arithmetic \(n\)-th root is non-negative.
Example 1: arithmetic \(n\)-th root
For example:
Moreover, we have:
Construction of the decimal representation of the \(n\)-th root.
-
We look for the decimal expansion of
\[ \sqrt{2} \approx 1.41421356237 \]this number, not being rational, will be represented by an infinite (non-periodic) expansion.
-
We proceed as follows: we build a class of rational numbers of the form:
\[\begin{align*} 0 & < a_0 \\[1ex] & < a_0,a_1 \\[1ex] & < a_0,a_1a_2 \\[1ex] & < a_0,a_1a_2a_3 \\[1ex] & < \cdots\cdots\cdots\cdots \\[1ex] & < a_0,a_1a_2a_3\cdots a_n \\[1ex] & < \cdots\cdots\cdots\cdots \end{align*}\]The rule is: each of these numbers is the largest among those with the same number of digits after the decimal point whose square is less than \(2\). The first of these numbers are:
\(1\) \(1^2\) \(=1\) \(1,4\) \((1,4)^2\) \(=1,96\) \(1,41\) \((1,41)^2\) \(=1,9881\) \(1,414\) \((1,414)^2\) \(=1,999396\) \(1,4142\) \((1,4142)^2\) \(=1,99996164\) … -
This set of numbers, which we call \(E_{-}\), is bounded above (each one is \(< 2\)); by property \(R_4\) it has a supremum, and this is used to define \(\sqrt{2}\).
The number \(\sqrt{2}\) is defined precisely as \(\sup E_{-}\)
-
We could also have built a class of numbers \(E_{+}\) like the previous one, with the rule that each of them is the smallest among those with the same number of digits after the decimal point whose square is greater than \(2\); we would have obtained:
\(2\) \(2^2\) \(=4\) \(1,5\) \((1,5)^2\) \(=2, 25\) \(1,42\) \((1,42)^2\) \(=2,0164\) \(1,415\) \((1,415)^2\) \(=2,002225\) \(1,4143\) \((1,4143)^2\) \(=2,00024449\) … This set \(E_{+}\) is bounded below (every element is \(> 1\)), therefore it has an infimum; one proves that:
\[ \sqrt{2} = \inf E_{+} = \sup E_{-} \]The numbers of the class \(E_{-}\) approximate \(\sqrt{2}\) from below, those of the class \(E_{+}\) from above.
1.2 Powers with real exponent¶
Extracting the \(n\)-th root is the inverse operation of raising to an integer power.
Rational exponent
-
The operation of raising to a power can be extended to every rational exponent if the base is positive (using the previous theorem).
\[ {\rm If~~} r = \frac{m}{n} ~~~~{\rm and}~~~~ a > 0 ~~~~{\rm then}~~~~ a^r = (a^m)^{\frac{1}{n}} = \sqrt[n]{a^m} \](we assume \(m \in \Z\) and \(n \in \Z\) positive)
Real exponent
-
If the exponent is real, \(b=b_0,b_1b_2b_3\dots b_n \dots\), the number \(a^b\) (\(a > 0\)) will be determined by the class of numbers
\[ a^{b_0} \qquad a^{b_0,b_1} \qquad a^{b_0,b_1b_2} \qquad \dots \]in a way similar to the case of the root.
If the base \(a\) is negative, the operation of raising to a power \(a^b\) is defined only in certain cases:
-
if the exponent \(b\) is an integer, or
-
if the exponent \(b=\frac{n}{m}\) is rational, provided that it is not the case that \(n\) is odd and \(m\) is even.
If \(c < 0\) and \(m\) is odd, we define
Example 2: negative base
For example:
- When we say “does not exist in \(\R\)” we mean that it is not possible to define this operation in such a way that the usual rules of computation remain valid.
Example 3: non-existence of a power with real exponent
For example:
does not exist in the real field!
Let
and
the main properties of raising to a power are:
1.3 Logarithms¶
-
Consider the equation
\[ a^x = y, \qquad a> 0 \]with \(y\) given and \(x\) unknown. First of all, if \(a= 1\), it is solvable only if \(y = 1\) (and in that case every real number \(x\) is a solution). So let \(a \neq 1\).
If \(y \le 0\) it has no solution, see property \(\eqref{FFFFF}\).
The following theorem tells us that it has exactly one solution for every \(y > 0\):
Theorem 2
Let \(a > 0\), \(a\neq 1\), \(y >0\). There exists a unique real number \(x\) such that \(a^x=y\).
-
This number is called the logarithm to base a of \(y\) and is denoted by the symbol:
\[ \log_a y \] -
The logarithm is the inverse operation of raising to a power.
-
the logarithm of a number to a given base is the exponent to which the base must be raised to obtain the number itself.
Let
the main properties of logarithms are (they follow from those of exponentials):
Notation:
-
\(\lg n = \log_2 n\) \(\quad \rightarrow\) binary logarithm
-
\(\ln n = \log_{e}n\) \(\quad \rightarrow\) natural logarithm (where \(\red{ e \approx 2.718}\) is Euler's number (Napier's constant)) (sometimes the natural logarithm \(\ln\) is also denoted by \(\log\))
-
\(\lg^k n = (\lg n)^k\) \(\quad \rightarrow\) power
-
\(\lg \lg n = \lg(\lg n)\) \(\quad \rightarrow\) composition
1.4 Approximations¶
-
a rational number can always be expressed with absolute precision, using either the fractional or the decimal notation (possibly with repeating digits).
-
On the other hand, it is of course not possible to write all the decimal digits of an irrational number, since there are infinitely many of them and they follow one another without periodicity.
-
What does it mean, then, to “know” or “specify” an irrational number? It means knowing some algorithm that allows us (at least in theory) to write as many exact decimal digits as we wish.
Example 4: irrational numbers
-
In the (already considered) example of the irrational number:
\[ 0,101001000100001\dots \]built according to the rule: write one digit 1, one digit 0, one digit 1, two digits 0, one digit 1, three digits 0, and so on) it is clear that we could write as many digits as we wish.
-
In other cases, such as
\[ \sqrt{2} {\rm ~~or~~} \log_2 3, \]things are more laborious and require iterative computations to determine each successive decimal digit; nevertheless, these computations can actually be carried out.
-
-
At other times, in Mathematical Analysis, a number is specified in a non-constructive way, by denoting it as the unique number that solves a given problem (once it has been proved that such a solution exists and is unique). This is a less satisfactory approach from an operational point of view, but theoretically flawless.
Practical aspects of computing irrational numbers
-
Whenever we perform computations with a pocket calculator, it will only display numbers with a fixed number of decimal digits after the decimal point (typically 9). This means that we are working only with rational numbers, indeed with a finite subset of the set \(\Q\).
-
Working with a computer things improve somewhat, but we still remain within finite subsets of \(\Q\). Of course, one needs to be aware of this.
-
Besides the approximation produced by computing tools, sometimes we ourselves are not interested in too many decimal digits; we then deliberately introduce approximations, writing for example
\[ \sqrt{2} \approx 1,414 \]Rounding rule: the last digit written is rounded down (up) if the first digit discarded is from 0 to 4 (respectively, from 5 to 9).
Example 5: Rounding
For example:
\[ 2,4138 \approx 2,41 \]\[ 2,4152 \approx 2,42 \]
2. Modular arithmetic¶
Definition 1: of integer part
Given a real number \(a \in \mathbb{R}\), we denote by \([a]\) or \(\lfloor a \rfloor\) the integer part (or “floor”) of \(a\):
Example 6: Integer part
- While for positive numbers the integer part is obtained simply by “throwing away the digits after the decimal point”, for negative numbers one must take the largest integer \(\le a\), which is different from what is obtained by throwing away the digits after the decimal point (except when \(a\) is already an integer)
Definition 2: of fractional part
Given a real number \(a \in \mathbb{R}\), we denote by \((a)\) the fractional part (or decimal part, in Italian “mantissa”) of \(a\):
Example 7: Fractional part
-
The fractional part is therefore not an integer but a real number, lying in \([0, 1)\).
-
For positive numbers, it is obtained simply by “throwing away the digits before the decimal point”; for negative numbers the fractional part is the one's complement of the number obtained by throwing away the digits before the decimal point.
Definition 3: of upper integer part
Given a real number \(a \in \mathbb{R}\), we denote by \(\lceil a \rceil\) the upper integer part (or “ceil”) of \(a\):
Example 8: of ceil
Some properties:
Given a real number \(a \in \mathbb{R}\), we have
Given an integer \(n \in \mathbb{Z}\), we have
Given two positive integers \(r,s \in \mathbb{Z}\), \(r, s > 0\), we have
Given, in addition, a non-negative real number \(p \in \mathbb{R},p \ge 0\), we have
Definition 4: Divisor
A divisor of an integer \({n} \in \mathbb{Z}\), also called a factor of \({n}\), is an integer \({m} \in \mathbb{Z}\) that can be multiplied by some integer \({q} \in \mathbb{Z}\) to obtain \({n}\), i.e., if \({n}={q} \cdot {m}\).
-
If \({m}\) is a divisor of \({n}\), \({n}\) is a multiple of \({m}\).
-
An integer \({n}\) is divisible by another integer \({m}\) if \({m}\) is a divisor of \({n}\).
-
For an integer \({a} \in \mathbb{Z}\) and a positive integer \({n} \in \mathbb{Z}, {n}>0\), the value \({a} \mod {n}\) is the remainder of the division \(\frac{{a}}{{n}}\).
Definition 5: of modulo (remainder)
Given \({a} \in \mathbb{Z}\) and \({n} \in \mathbb{Z}, {n} >0\),
- It follows that \(0 \le {a} \mod {n} < {n}\)
If \(({a} \mod {n}) = ({b} \mod {n})\), we write
and we say that \({a}\) is equivalent to \({b}\), modulo \({n}\).
Example 9
For example, \(23\) and \(13\) are equivalent modulo \(5\) and we write \(23 \equiv 13 \:(\mod 5)\)
-
Equivalently, \({a} \equiv {b} \:(\mod {n})\) if \({a}\) and \({b}\) have the same remainder when divided by \({n}\).
-
Equivalently, \({a} \equiv {b} \:(\mod {n})\) if and only if \({n}\) is a divisor of \(|{b} - {a}|\).