The function is defined by for all real numbers , where denotes the greatest integer less than or equal to the real number . What is the range of ?
- A)
- B)
- C)
- D)
- E)
Answer
A
Key insight
Try a positive number, a negative whole number, and a negative number with a decimal part. Only the last kind gives something other than 0, and it always gives -1.
Solution
Floors and absolute values behave differently for negative numbers, so test a few kinds of numbers first.
The table suggests the only values are and . Now check that this is true for every .
- is or positive. Then and is or positive, so both parts equal . So .
- is a negative whole number, like . Both parts equal , the number without its sign. So .
- is negative with a decimal part, like . Then and its floor is . But the floor of is (the floor rounds down, and down means further from zero for negatives), and its absolute value is . So . The same thing happens for any such number: the first part is one less than the second.
Every real number falls in one of these three groups, so the range is exactly .
The answer is .
Why this works
Taking the absolute value first and then rounding down moves a negative number toward zero. Rounding down first moves it away from zero. The two orders disagree by exactly whenever the number is negative and not whole. Whenever a floor appears, test a positive number, a negative whole number and a negative number with a decimal part; the last one is where surprises happen.
The trap
Testing only positive numbers or negative whole numbers, getting 0 every time, and answering (D).
Concise solution
Split by the sign and integrality of .
Case 1: . Then and , so .
Case 2: is a negative integer. Then is an integer, so , and . Again .
Case 3: is negative and not an integer. Write with a nonnegative integer and . Then , so . But , whose absolute value is . Hence .
For example, , while .
The range is . The answer is .
Review in the AoPS books
- Introduction to Algebra, Chapter 16: Functions
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
- Introduction to Algebra, Chapter 17: Graphing Functions (§17.2)
Techniques
Split into exhaustive cases and handle each · Test small/specific values or special cases to find or verify the answer