Difference between revisions of "2019 AMC 10B Problems/Problem 9"

Line 1: Line 1:
Ooh, ooh. And nobody knows it
+
The function <math>f</math> is defined by <cmath>f(x) = \lfloor|x|\rfloor - |\lfloor x \rfloor|</cmath>for all real numbers <math>x</math>, where <math>\lfloor r \rfloor</math> denotes the greatest integer less than or equal to the real number <math>r</math>. What is the range of <math>f</math>?
 +
 
 +
<math>\textbf{(A) } \{-1, 0\} \qquad\textbf{(B) } \text{The set of nonpositive integers} \qquad\textbf{(C) } \{-1, 0, 1\} \qquad\textbf{(D) } \{0\} \qquad\textbf{(E) } \text{The set of nonnegative integers} </math>
 +
 
 +
==Solution==
 +
There are 4 cases we need to test here:
 +
 
 +
Case 1: x is a positive integer. WLOG, assume x=1. Then f(1) = 1 - 1 = <math>0</math>.
 +
 
 +
Case 2: x is a positive fraction. WLOG, assume x=0.5. Then f(0.5) = 0 - 0 = <math>0</math>.
 +
 
 +
Case 3: x is a negative integer. WLOG, assume x=-1. Then f(-1) = 1 - 1 = <math>0</math>.
 +
 
 +
Case 4: x is a negative fraction. WLOG, assume x=-0.5. Then f(-0.5) = 0 - 1 = <math>-1</math>.
 +
 
 +
Thus the range of function f is <math>\boxed{A) {-1,0}}</math>
 +
 
 +
iron

Revision as of 13:55, 14 February 2019

The function $f$ is defined by \[f(x) = \lfloor|x|\rfloor - |\lfloor x \rfloor|\]for all real numbers $x$, where $\lfloor r \rfloor$ denotes the greatest integer less than or equal to the real number $r$. What is the range of $f$?

$\textbf{(A) } \{-1, 0\} \qquad\textbf{(B) } \text{The set of nonpositive integers} \qquad\textbf{(C) } \{-1, 0, 1\} \qquad\textbf{(D) } \{0\} \qquad\textbf{(E) } \text{The set of nonnegative integers}$

Solution

There are 4 cases we need to test here:

Case 1: x is a positive integer. WLOG, assume x=1. Then f(1) = 1 - 1 = $0$.

Case 2: x is a positive fraction. WLOG, assume x=0.5. Then f(0.5) = 0 - 0 = $0$.

Case 3: x is a negative integer. WLOG, assume x=-1. Then f(-1) = 1 - 1 = $0$.

Case 4: x is a negative fraction. WLOG, assume x=-0.5. Then f(-0.5) = 0 - 1 = $-1$.

Thus the range of function f is $\boxed{A) {-1,0}}$

iron