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

(Solution)
m (consistent formatting of answer choices)
 
(40 intermediate revisions by 18 users not shown)
Line 1: Line 1:
==Problem==
+
== Problem ==
 +
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 1 ==
 +
There are four cases we need to consider here.
 +
 
 +
'''Case 1''': <math>x</math> is a positive integer. Without loss of generality, assume <math>x=1</math>. Then <math>f(1) = 1 - 1 = 0</math>.
 +
 
 +
'''Case 2''': <math>x</math> is a positive fraction. Without loss of generality, assume <math>x=\frac{1}{2}</math>. Then <math>f\left(\frac{1}{2}\right) = 0 - 0 = 0</math>.
 +
 
 +
'''Case 3''': <math>x</math> is a negative integer. Without loss of generality, assume <math>x=-1</math>. Then <math>f(-1) = 1 - 1 = 0</math>.
  
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>?
+
'''Case 4''': <math>x</math> is a negative fraction. Without loss of generality, assume <math>x=-\frac{1}{2}</math>. Then <math>f\left(-\frac{1}{2}\right) = 0 - 1 = -1</math>.
 +
 
 +
Thus the range of the function <math>f</math> is <math>\boxed{\textbf{(A) } \{-1, 0\}}</math>.
 +
 
 +
~IronicNinja
 +
 
 +
== Solution 2 ==
 +
It is easily verified that when <math>x</math> is an integer, <math>f(x)</math> is zero. We therefore need only to consider the case when <math>x</math> is not an integer.
 +
 
 +
When <math>x</math> is positive, <math>\lfloor x\rfloor \geq 0</math>, so
 +
<cmath>\begin{split}f(x)&=\lfloor|x|\rfloor-|\lfloor x\rfloor| \\
 +
&=\lfloor x\rfloor-\lfloor x\rfloor \\
 +
&=0\end{split}</cmath>
 +
 
 +
When <math>x</math> is negative, let <math>x=-a-b</math> be composed of integer part <math>a</math> and fractional part <math>b</math> (both <math>\geq 0</math>):
 +
<cmath>\begin{split}f(x)&=\lfloor|-a-b|\rfloor-|\lfloor -a-b\rfloor| \\
 +
&=\lfloor a+b\rfloor-|-a-1| \\
 +
&=a-(a+1)=-1\end{split}</cmath>
 +
 
 +
Thus, the range of x is <math>\boxed{\textbf{(A) } \{-1, 0\}}</math>.
 +
 
 +
''Note'': One could solve the case of <math>x</math> as a negative non-integer in this way:
 +
<cmath>\begin{split}f(x)&=\lfloor|x|\rfloor-|\lfloor x\rfloor| \\
 +
&=\lfloor -x\rfloor-|-\lfloor -x\rfloor-1| \\
 +
&=\lfloor -x\rfloor-(\lfloor -x\rfloor+1) = -1\end{split}</cmath>
 +
 
 +
== Solution 3 (Formal) ==
 +
Let {<math>x</math>} denote the fractional part of <math>x</math>; for example, {<math>2.7</math>}<math>= 0.7</math>, and {<math>-1.3</math>}<math>= 0.3</math>.
 +
Then for <math> x \geq 0</math>, <math> x = \lfloor x \rfloor +</math> {<math>x</math>} and for <math> x < 0</math>, <math> x = \lfloor x \rfloor + 1 - </math>{<math>x</math>}.
 +
 
 +
Now we can rewrite <math>\lfloor |x| \rfloor - |\lfloor x \rfloor|</math>, breaking the expression up based on whether <math> x \geq 0 </math> or <math> x < 0</math>.
 +
 
 +
For <math>x \geq 0</math>, the above expression is equal to <math> \lfloor |\lfloor x \rfloor + </math>{<math>x</math>}<math>| \rfloor - | \lfloor \lfloor x \rfloor + </math> {<math>x</math>}<math> \rfloor | \implies \lfloor \lfloor x \rfloor + </math>{<math>x</math>}<math> \rfloor - | \lfloor x \rfloor | </math>
 +
 
 +
<math> \implies \lfloor x \rfloor - \lfloor x \rfloor = \mathbf{0} </math>.
 +
 
 +
For <math> x < 0</math>, the expression is equal to <math> \lfloor |\lfloor x \rfloor + 1 - </math>{<math>x</math>}<math>| \rfloor - | \lfloor \lfloor x \rfloor + 1 - </math> {<math>x</math>}<math> \rfloor |</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>
+
<math> \implies \lfloor - \lfloor x \rfloor - 1 + </math>{<math>x</math>}<math> \rfloor - | \lfloor x \rfloor | \implies - \lfloor x \rfloor  - 1 - (- \lfloor x \rfloor) = \mathbf{-1}</math>.
  
==Solution==
+
Therefore the only two possible values for <math>f(x)</math>, and thus the range of the function, is <math>\boxed{\textbf{(A) } \{-1, 0\}}</math>.
  
There are 4 cases we need to test here:
+
~KingRavi
  
Case 1: x is a positive integer. WLOG, assume x=1. Then f(1) = 1 - 1 = <math>0</math>.
+
== Solution 4 ==
 +
We have 2 cases: either <math>x</math> is positive or <math>x</math> is negative.
  
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 1 - x is positive:'''
  
Case 4: x is a negative fraction. WLOG, assume x=-0.5. Then f(-0.5) = 0 - 1 = <math>-1</math>.
+
Let <math>x = n + f</math>, where <math>n</math> is a positive integer and <math>f</math> is a positive real number between 0 and 1. We have
 +
<cmath>\lfloor |x| \rfloor = \lfloor |n+f| \rfloor = \lfloor n+f \rfloor = n</cmath> and
 +
<cmath>|\lfloor x \rfloor| = |\lfloor n+f \rfloor| = |n| = n.</cmath>
 +
<math>n-n=0</math>, so the possible value of <math>f(x)</math> if <math>x</math> is positive is <math>0</math>.  
  
Thus the range of function f is <math>\boxed{\textbf{(A) } \{-1, 0\}}</math>
 
  
==Solution 2==
+
'''Case 2 - x is negative: '''
  
It is easily verified that when <math>x</math> is an integer, then <math>f(x)</math> is zero. We need only to consider the case when <math>x</math> is not.
+
Let <math>x = -n - f</math>, where <math>n</math> is a positive integer and <math>f</math> is a positive real number between 0 and 1. We have
 +
<cmath>\lfloor |x| \rfloor = \lfloor |-n-f| \rfloor = \lfloor n+f \rfloor = n</cmath> and
 +
<cmath>|\lfloor x \rfloor| = |\lfloor -n-f \rfloor| =|-n|\:or\: |-n-1|= n \:or\: n+1.</cmath>
  
When <math>x</math> is a positive number, <math>\lfloor x\rfloor \geq 0</math>, so  
+
<math>n-n=0</math> and <math>n-(n+1) = -1</math>, so the possible values of <math>f(x)</math> if <math>x</math> is negative are <math>0</math> and <math>-1.</math>  
<cmath>f(x)=\lfloor|x|\rfloor-|\lfloor x\rfloor|</cmath>
 
<cmath>=\lfloor x\rfloor-\lfloor x\rfloor</cmath>
 
<cmath>=\textbf{0}</cmath>
 
  
When <math>x</math> is a negative number, let <math>x=-a-b</math> be composed of integer part <math>a</math> and decimal part <math>b</math> (both <math>\geq 0</math>):
 
<cmath>f(x)=\lfloor|-a-b|\rfloor-|\lfloor -a-b\rfloor|</cmath>
 
<cmath>=\lfloor a+b\rfloor-|-a-1|</cmath>
 
<cmath>=a-(a+1)=\textbf{-1}</cmath>
 
  
Thus, the range of f is <math>\boxed{\textbf{(A) } \{-1, 0\}}</math>
+
Hence, the possible values of <math>f(x)</math> are <math>0</math> and <math>-1</math>, so the answer is <math>\boxed{\textbf{(A) } \{-1, 0\}}</math>. ~azc1027
  
>>> Intelligence_Inc
+
==Video Solution==
 +
https://youtu.be/LffjyNNqf14
  
 +
~Education, the Study of Everything
  
Note: One could solve the case of <math>x</math> as a negative non-integer this way:
+
== Video Solution ==
<cmath>f(x)=\lfloor|x|\rfloor-|\lfloor x\rfloor|</cmath>
+
https://youtu.be/PgqjsTkNYdc
<cmath>=\lfloor -x\rfloor-|-\lfloor -x\rfloor-1|</cmath>
 
<cmath>=\lfloor -x\rfloor-(\lfloor -x\rfloor+1) = \textbf{-1}</cmath>
 
  
==See Also==
+
~savannahsolver
  
 +
== See Also ==
 
{{AMC10 box|year=2019|ab=B|num-b=8|num-a=10}}
 
{{AMC10 box|year=2019|ab=B|num-b=8|num-a=10}}
 
{{MAA Notice}}
 
{{MAA Notice}}

Latest revision as of 16:07, 4 July 2023

Problem

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 1

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. Without loss of generality, assume $x=\frac{1}{2}$. Then $f\left(\frac{1}{2}\right) = 0 - 0 = 0$.

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

Case 4: $x$ is a negative fraction. Without loss of generality, assume $x=-\frac{1}{2}$. Then $f\left(-\frac{1}{2}\right) = 0 - 1 = -1$.

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

~IronicNinja

Solution 2

It is easily verified 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 positive, $\lfloor x\rfloor \geq 0$, so \[\begin{split}f(x)&=\lfloor|x|\rfloor-|\lfloor x\rfloor| \\ &=\lfloor x\rfloor-\lfloor x\rfloor \\ &=0\end{split}\]

When $x$ is negative, let $x=-a-b$ be composed of integer part $a$ and fractional part $b$ (both $\geq 0$): \[\begin{split}f(x)&=\lfloor|-a-b|\rfloor-|\lfloor -a-b\rfloor| \\ &=\lfloor a+b\rfloor-|-a-1| \\ &=a-(a+1)=-1\end{split}\]

Thus, the range of x is $\boxed{\textbf{(A) } \{-1, 0\}}$.

Note: One could solve the case of $x$ as a negative non-integer in this way: \[\begin{split}f(x)&=\lfloor|x|\rfloor-|\lfloor x\rfloor| \\ &=\lfloor -x\rfloor-|-\lfloor -x\rfloor-1| \\ &=\lfloor -x\rfloor-(\lfloor -x\rfloor+1) = -1\end{split}\]

Solution 3 (Formal)

Let {$x$} denote the fractional part of $x$; for example, {$2.7$}$= 0.7$, and {$-1.3$}$= 0.3$. Then for $x \geq 0$, $x = \lfloor x \rfloor +$ {$x$} and for $x < 0$, $x = \lfloor x \rfloor + 1 -${$x$}.

Now we can rewrite $\lfloor |x| \rfloor - |\lfloor x \rfloor|$, breaking the expression up based on whether $x \geq 0$ or $x < 0$.

For $x \geq 0$, the above expression is equal to $\lfloor |\lfloor x \rfloor +${$x$}$| \rfloor - | \lfloor \lfloor x \rfloor +$ {$x$}$\rfloor | \implies \lfloor \lfloor x \rfloor +${$x$}$\rfloor - | \lfloor x \rfloor |$

$\implies \lfloor x \rfloor - \lfloor x \rfloor = \mathbf{0}$.

For $x < 0$, the expression is equal to $\lfloor |\lfloor x \rfloor + 1 -${$x$}$| \rfloor - | \lfloor \lfloor x \rfloor + 1 -$ {$x$}$\rfloor |$

$\implies \lfloor - \lfloor x \rfloor - 1 +${$x$}$\rfloor - | \lfloor x \rfloor | \implies - \lfloor x \rfloor  - 1 - (- \lfloor x \rfloor) = \mathbf{-1}$.

Therefore the only two possible values for $f(x)$, and thus the range of the function, is $\boxed{\textbf{(A) } \{-1, 0\}}$.

~KingRavi

Solution 4

We have 2 cases: either $x$ is positive or $x$ is negative.


Case 1 - x is positive:

Let $x = n + f$, where $n$ is a positive integer and $f$ is a positive real number between 0 and 1. We have \[\lfloor |x| \rfloor = \lfloor |n+f| \rfloor = \lfloor n+f \rfloor = n\] and \[|\lfloor x \rfloor| = |\lfloor n+f \rfloor| = |n| = n.\] $n-n=0$, so the possible value of $f(x)$ if $x$ is positive is $0$.


Case 2 - x is negative:

Let $x = -n - f$, where $n$ is a positive integer and $f$ is a positive real number between 0 and 1. We have \[\lfloor |x| \rfloor = \lfloor |-n-f| \rfloor = \lfloor n+f \rfloor = n\] and \[|\lfloor x \rfloor| = |\lfloor -n-f \rfloor| =|-n|\:or\: |-n-1|= n \:or\: n+1.\]

$n-n=0$ and $n-(n+1) = -1$, so the possible values of $f(x)$ if $x$ is negative are $0$ and $-1.$


Hence, the possible values of $f(x)$ are $0$ and $-1$, so the answer is $\boxed{\textbf{(A) } \{-1, 0\}}$. ~azc1027

Video Solution

https://youtu.be/LffjyNNqf14

~Education, the Study of Everything

Video Solution

https://youtu.be/PgqjsTkNYdc

~savannahsolver

See Also

2019 AMC 10B (ProblemsAnswer KeyResources)
Preceded by
Problem 8
Followed by
Problem 10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
All AMC 10 Problems and Solutions

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. AMC logo.png