The range of the function f(x)=|x−1|+|x−2| , −1≤x≤3, is
[1,3]
[1,5]
[3,5]
none of these
Clearly, from the graph, the range is [1,f(−1)]≡[1,5] .
If x<1,f(x)=−(x−1)−(x−2)=−2x+3
In this interval, f(x) is decreasing.
If 1≤x<2,f(x)=x−1−(x−2)=1
In this interval, f(x) is constant.
If 2≤x≤3,f(x)=x−1+x−2=2x−3 .
In this interval, f(x) is increasing.
∴maxf(x)= the greatest among f(−1) and f(3)=5
minf(x)=f(1)=1
So, range =[1,5]