Integer Function - Floor, Ceiling, Sawtooth
An integer function maps a real number to an integer value. In this wiki, we're going to discuss threeinteger functionsthat are widely applied in number theory—thefloor function, ceiling function, sawtooth function.
Contents
Summary
For a real number \(x\),
- the floor function returns the largest integer less than or equal to \(x\), denoted as \(\lfloor x \rfloor ;\)
- the ceiling function returns the smallest integer larger than or equal to \(x\), denoted as \(\lceil x \rceil ;\)
- the sawtooth function returns the fractional part of \(x\), denoted as \(\{x\}\).
Properties
Note: The variable \(n\) in this section is assumed to be an integer.
地板函数具有以下属性:
- \(\lfloor x \rfloor + \{x\} = x\)
- \(\lfloor x+y \rfloor \geq \lfloor x \rfloor + \lfloor y \rfloor\)
- \(\{x\} + \{y\} \geq \{x+y\}\)
- \(\lfloor x + n \rfloor = \lfloor x \rfloor + n\)
- \(\{x+n\}=\{x\}\)
- \(\lfloor xy\rfloor \geq \lfloor x \rfloor \lfloor y\rfloor \quad \mathrm{for} \quad x, y \ge 0 \)
- \(\displaystyle \lfloor \sqrt[n]{x} \rfloor ^n \leq \lfloor x \rfloor\)
- \(\displaystyle \bigg \lfloor \frac{nx}{y} \bigg \rfloor = n\bigg \lfloor \frac{x}{y} \bigg \rfloor\)
Problem Solving
Solve the following equation for a non-zero solution:
\[x+2\{x\}=3\lfloor x \rfloor .\]
We have
\[\begin{aligned} x+2\{x\}&=3\lfloor x \rfloor \\ \lfloor x \rfloor + \{x\} + 2\{x\} &= 3\lfloor x \rfloor \\ 3\{x\} &= 2\lfloor x \rfloor \\ \{x\} &= \frac{2}{3}\lfloor x \rfloor. \end{aligned}\]
Since \(0 \leq \{x\} < 1 \), we have \(0 \leq \lfloor x \rfloor < 1\frac{1}{2}\). Substituting \(\lfloor x \rfloor = 1\), we have \(\{x\} = \frac{2}{3}\). Then we finally have
\[x = \lfloor x \rfloor + \{x\} = 1 + \frac{2}{3} = 1\frac{2}{3}.\ _\square\]