The floor function is defined to be the greatest integer less than or equal to the real number . The fractional part function is defined to be the difference between these two:
Let be a real number. Then the fractional part of is
For nonnegative real numbers, the fractional part is just the "part of the number after the decimal," e.g.
But for negative real numbers, this is no longer this case:
Note that in both cases is nonnegative.
The following are some examples of how fractional part functions work:
- , and if and only if is an integer.
- If and are integers and , then , where is the remainder from dividing by .
, but . The fractional part is always nonnegative.
Since , it follows that .
For problems involving the floor function and the fractional part function, it often helps (for ease of notation) to write where and . Then is an integer and .
Let be a positive real number such that
Write as suggested. Now note that , so . So . Then
so by the quadratic formula.
Find the smallest real number such that for all positive real numbers ,
If , we can write and So we may assume . Then . Writing , with a positive integer, the left side becomes
For fixed , this is maximized when the denominator is minimized, i.e. .
Now, is an increasing function for , its derivative being . As , the sum goes to . So the answer is .
Exercise: If is allowed to be negative, the answer is
There are many interesting integrals involving the fractional part function. A good way to evaluate definite integrals of this type is to break up the interval of integration into intervals on which the greatest integer function is constant; then the original integral is a sum of integrals which are easier to evaluate.
On the interval , . So the integral on that interval becomes
So the integral is
and the partial sum telescopes to . The limit is , where is the famous Euler-Mascheroni constant.