Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store
seo-qna
SearchIcon
banner

Find the domain and range of the function $f\left( x \right) = 2 - \left| {x - 5} \right|$
$
  (a){\text{ Domain = }}{{\text{R}}^ + },{\text{ Range = ( - }}\infty {\text{,1]}} \\
  (b){\text{ Domain = }}{{\text{R}}^ + },{\text{ Range = ( - }}\infty {\text{,2]}} \\
  (c){\text{ Domain = }}{{\text{R}}^ + },{\text{ Range = ( - }}\infty {\text{,2)}} \\
  (d){\text{ Domain = }}{{\text{R}}^ + },{\text{ Range = ( - }}\infty {\text{,2]}} \\
 $

Answer
VerifiedVerified
613.2k+ views
Hint – In this question use the concept that modulus of any quantity is greater than 0, hence using this find the inequality for which $f\left( x \right) = 2 - \left| {x - 5} \right|$hold true. This will be the range of the function. Domain will be the set of values of x for which the function is defined.

Complete step by step answer:
Given function
$f\left( x \right) = 2 - \left| {x - 5} \right|$
As we know that modulus of anything is always greater than zero.
$ \Rightarrow \left| {x - 5} \right| \geqslant 0$
Now as we know that if we multiply by (-1) in above equation the inequality sign reversed
$ \Rightarrow - \left| {x - 5} \right| \leqslant 0\left( { - 1} \right)$
$ \Rightarrow - \left| {x - 5} \right| \leqslant 0$
Now add 2 on both sides we have,
$ \Rightarrow 2 - \left| {x - 5} \right| \leqslant 0 + 2$
$ \Rightarrow 2 - \left| {x - 5} \right| \leqslant 2$
$ \Rightarrow f\left( x \right) \leqslant 2$
So the range of the function is$\left( { - \infty ,2} \right]$, (as the inequality is less than or equal to 2 so one 2 side it is a closed interval and on infinity side it is an open interval).
$ \Rightarrow {\text{Range}} = \left( { - \infty ,2} \right]$
Now the domain of a function is the set of all possible inputs for the function.
So the domain of the function is defined for all real values of x.
$ \Rightarrow {\text{Domain}} = R$, where R is the set of all real values.
So this is the required answer.
Hence option (B) is correct.

Note – The basic definition of modulus function is $f(x) = |x| = \left\{ \begin{gathered}
  x,{\text{ if }}x \geqslant 0 \\
   - x,{\text{ if }}x < 0 \\
\end{gathered} \right\}$, thus it basically depicts a pair of straight lines passing through origin, one with a positive slope that is y=x, and the other with a negative slope that is y=-x. Using this any generalized modulus function can too be evaluated.