
The range of the function $f\left( x \right)=\left| x-1 \right|+\left| x-2 \right|$, $-1\le x\le 3$, is?
(a) $\left[ 2,5 \right]$
(b) $\left[ 1,5 \right]$
(c) $\left[ 3,5 \right]$
(d) None of these
Answer
493.2k+ views
Hint: Substitute all the expressions inside the modulus sign and find the values of x. Consider different intervals of values of x and find the functions by removing the modulus sign. Use the formulas: - if a > 0 then $\left| a \right|=a$ and if a < 0 then $\left| a \right|=\left( -a \right)$. Draw the graph of the function for different intervals and check the range of the function.
Complete step-by-step solution:
Here we have been provided with the function $f\left( x \right)=\left| x-1 \right|+\left| x-2 \right|$, where $-1\le x\le 3$. We are asked to find the range of $f\left( x \right)$. First we need to remove the modulus function for different intervals of values of x.
Now, substituting each of the expressions inside the modulus sign equal to 0 we get,
\[\Rightarrow \left( x-1 \right)=0\] and $\left( x-2 \right)=0$
\[\Rightarrow x=1\] and $x=2$
Therefore, we can create three intervals as per the given interval $-1\le x\le 3$ and the values x = 1 and 2. Let us find the function $f\left( x \right)$ for all the intervals one by one.
(i) When we have $-1\le x<1$ then the values of $\left( x-1 \right)$ and $\left( x-2 \right)$ inside the modulus sign will be negative and we know that if a < 0 then $\left| a \right|=\left( -a \right)$. So we get,
$\begin{align}
& \Rightarrow f\left( x \right)=-\left( x-1 \right)+\left( -\left( x-2 \right) \right) \\
& \Rightarrow f\left( x \right)=-2x+3 \\
\end{align}$
(ii) When we have $1\le x<2$ then the value of $\left( x-1 \right)$ will be positive and $\left( x-2 \right)$ will be negative inside the modulus sign and we know that if a > 0 then $\left| a \right|=a$. So we get,
$\begin{align}
& \Rightarrow f\left( x \right)=\left( x-1 \right)+\left( -\left( x-2 \right) \right) \\
& \Rightarrow f\left( x \right)=1 \\
\end{align}$
(iii) When we have $2\le x\le 3$ then the values of $\left( x-1 \right)$ and $\left( x-2 \right)$ inside the modulus sign will be positive. So we get,
$\begin{align}
& \Rightarrow f\left( x \right)=\left( x-1 \right)+\left( x-2 \right) \\
& \Rightarrow f\left( x \right)=2x-3 \\
\end{align}$
Drawing the graph of $f\left( x \right)$ for the above three intervals of values of x we have,
Clearly we can see that the minimum value of the function is 1, which is for the interval $1\le x<2$, and the maximum value of the function is 5 which is at x = -1. Also, the function is continuous in the interval $-1\le x\le 3$, therefore the range of the function will be $f\left( x \right)=\left[ 1,5 \right]$.
Hence, option (b) is the correct answer.
Note: We can also solve the question without using the graphical approach because the functions are only linear for different intervals of values of x. To find the maximum and minimum values we will check the values at the end-points of the functions because either the function will be increasing (for positive slope), decreasing (for negative slope) or constant (for slope = 0).
Complete step-by-step solution:
Here we have been provided with the function $f\left( x \right)=\left| x-1 \right|+\left| x-2 \right|$, where $-1\le x\le 3$. We are asked to find the range of $f\left( x \right)$. First we need to remove the modulus function for different intervals of values of x.
Now, substituting each of the expressions inside the modulus sign equal to 0 we get,
\[\Rightarrow \left( x-1 \right)=0\] and $\left( x-2 \right)=0$
\[\Rightarrow x=1\] and $x=2$
Therefore, we can create three intervals as per the given interval $-1\le x\le 3$ and the values x = 1 and 2. Let us find the function $f\left( x \right)$ for all the intervals one by one.
(i) When we have $-1\le x<1$ then the values of $\left( x-1 \right)$ and $\left( x-2 \right)$ inside the modulus sign will be negative and we know that if a < 0 then $\left| a \right|=\left( -a \right)$. So we get,
$\begin{align}
& \Rightarrow f\left( x \right)=-\left( x-1 \right)+\left( -\left( x-2 \right) \right) \\
& \Rightarrow f\left( x \right)=-2x+3 \\
\end{align}$
(ii) When we have $1\le x<2$ then the value of $\left( x-1 \right)$ will be positive and $\left( x-2 \right)$ will be negative inside the modulus sign and we know that if a > 0 then $\left| a \right|=a$. So we get,
$\begin{align}
& \Rightarrow f\left( x \right)=\left( x-1 \right)+\left( -\left( x-2 \right) \right) \\
& \Rightarrow f\left( x \right)=1 \\
\end{align}$
(iii) When we have $2\le x\le 3$ then the values of $\left( x-1 \right)$ and $\left( x-2 \right)$ inside the modulus sign will be positive. So we get,
$\begin{align}
& \Rightarrow f\left( x \right)=\left( x-1 \right)+\left( x-2 \right) \\
& \Rightarrow f\left( x \right)=2x-3 \\
\end{align}$
Drawing the graph of $f\left( x \right)$ for the above three intervals of values of x we have,
Clearly we can see that the minimum value of the function is 1, which is for the interval $1\le x<2$, and the maximum value of the function is 5 which is at x = -1. Also, the function is continuous in the interval $-1\le x\le 3$, therefore the range of the function will be $f\left( x \right)=\left[ 1,5 \right]$.
Hence, option (b) is the correct answer.
Note: We can also solve the question without using the graphical approach because the functions are only linear for different intervals of values of x. To find the maximum and minimum values we will check the values at the end-points of the functions because either the function will be increasing (for positive slope), decreasing (for negative slope) or constant (for slope = 0).
Recently Updated Pages
Master Class 12 Economics: Engaging Questions & Answers for Success

Master Class 12 Physics: Engaging Questions & Answers for Success

Master Class 12 English: Engaging Questions & Answers for Success

Master Class 12 Social Science: Engaging Questions & Answers for Success

Master Class 12 Maths: Engaging Questions & Answers for Success

Master Class 12 Business Studies: Engaging Questions & Answers for Success

Trending doubts
Which are the Top 10 Largest Countries of the World?

What are the major means of transport Explain each class 12 social science CBSE

Draw a labelled sketch of the human eye class 12 physics CBSE

Why cannot DNA pass through cell membranes class 12 biology CBSE

Differentiate between insitu conservation and exsitu class 12 biology CBSE

Draw a neat and well labeled diagram of TS of ovary class 12 biology CBSE

