2019 AMC 10 B

Complete problem set with solutions and individual problem pages

Problem 9 Easy

The function f is defined by f(x)=\left\lfloor{|x|}\right\rfloor-|\left\lfloor{x}\right\rfloor| for all real numbers x, where \left\lfloor{r}\right\rfloor denotes the greatest integer less than or equal to the real number r. What is the range of f? (2019 AMC 10B Problem, Question#9)

  • A.

    \{-1,0\}

  • B.

    the set of nonpositive integers

  • C.

    \{-1,0,1\}

  • D.

    \{0\}

  • E.

    the set of nonnegative integers

Answer:A

There are four cases we need to consider here.

Case 1: x is a positive integer. Without loss of generality, assume x=1.Then f(1)= 1- 1= 0.

Case 2: x is a positive fraction. Wihout loss of generality, asume x= \frac{1}{2}.

Then f( \frac{1}{2})=0-0=0.

Case 3: x is a negative integer. Without loss of generality, assume x=-1.

Then f(-1)=1-1=0.

x=- \frac{1}{2}

Case 4: x is a negative fraction. Without loss of generality, assume x=-\frac{1}{2}.

Then f(- \frac{1}{2})=0-1=-1

Thus the range of the function f is \text {(A)}\{-1,0\}.

It is easily verifed that when x is an integer, f(x) is zero. We therefore need only to consider the case when x is not an integer.

When x is postive, \left\lfloor{r}\right\rfloor\geqslant 0, so

f(x)=\left\lfloor{|x|}\right\rfloor-|\left\lfloor{x}\right\rfloor|

=\left\lfloor{x}\right\rfloor-\left\lfloor{x}\right\rfloor

=0.

When x is negative, let x=-a-b be composed of integer part a and fractional part b (both \geqslant 0):

f(x)=\left\lfloor{|-a-b|}\right\rfloor-|\left\lfloor{-a-b}\right\rfloor|

=\left\lfloor{a+b}\right\rfloor-|-a-1|

=a-(a+1)

=-1.

Thus,the range of f is \text {(A)}\{-1,0\}.

Note: One could solve the case of x as a negative non-integer in this way:

f(x)=\left\lfloor{|x|}\right\rfloor-|\left\lfloor{x}\right\rfloor|

=\left\lfloor{-x}\right\rfloor-|-\left\lfloor{-x}\right\rfloor-1|

=\left\lfloor{-x}\right\rfloor-(\left\lfloor{-x}\right\rfloor+1)

=-1.