Find the Domain and Range of the Function
The domain and range of the function
\[ f(x)=2-|x-5| \]
are
(a) Domain \(=R^+\), Range \(=(-\infty,1]\)
(b) Domain \(=R\), Range \(=(-\infty,2]\)
(c) Domain \(=R\), Range \(=(-\infty,2)\)
(d) Domain \(=R^+\), Range \(=(-\infty,2]\)
Since modulus function is defined for all real \(x\),
Domain:
\[ R \]
Also,
\[ |x-5|\ge0 \]
Therefore,
\[ 2-|x-5|\le2 \]
Maximum value occurs at
\[ x=5 \]
\[ f(5)=2 \]
There is no lower bound.
Hence, range is
\[ (-\infty,2] \]
Therefore,
\[ \boxed{\text{Correct Answer: (b)}} \]