Given: f(x) = 2–|x −5|
To find: the domain and range of function
Explanation: So the domain of a function consists of all the first elements of all the ordered pairs, i.e., x, so we have to find the values of x to get the required domain
Given,
f(x) = 2–|x −5|
Now x is defined for all real numbers
Hence the domain of f is R
And the range of a function consists of all the second elements of all the ordered pairs, i.e., f(x), so we have to find the values of f(x) to get the required range
Now we know
|x-5|≥0
or
-|x-5|≤0
Adding 2 we get
2-|x-5|≤2
⇒ f(x)≤2
Hence the range of f = (-∞, 2]
Hence the correct answer is option (B)