Question:easy

If \[ f(x)=|x-2|+|x+1|, \] then the minimum value of \(f(x)\) is:

Show Hint

For expressions of the form \[ |x-a|+|x-b|, \] the minimum value is always \[ |a-b|. \] This fact can save considerable time in competitive examinations.
Updated On: Jun 10, 2026
  • \(1\)
  • \(2\)
  • \(3\)
  • \(4\)
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Read the function carefully.
We are given $f(x)=|x-2|+|x+1|$. This is a sum of two absolute value terms. We want the smallest value this sum can take.

Step 2: Think of distances.
The term $|x-2|$ is the distance of the point $x$ from $2$ on the number line. The term $|x+1|$ is the distance of $x$ from $-1$. So $f(x)$ is just the total distance of $x$ from the two fixed points $2$ and $-1$.

Step 3: Find the gap between the two fixed points.
The two points are $-1$ and $2$. The gap between them is $2-(-1)=3$.

Step 4: Use the simple distance idea.
If $x$ sits anywhere between $-1$ and $2$, the two distances add up to exactly the gap, which is $3$. If $x$ goes outside this range, you walk extra distance, so the total only grows. So the smallest total is the gap itself.

Step 5: Check with a sample point.
Take $x=0$, which lies between $-1$ and $2$. Then $f(0)=|0-2|+|0+1|=2+1=3$. This matches the gap.

Step 6: Check an outside point to be sure.
Take $x=5$. Then $f(5)=|5-2|+|5+1|=3+6=9$, which is bigger than $3$. So going outside really does increase the value.

Step 7: Conclude.
The minimum value of $f(x)$ is the distance between the two points. \[ \boxed{3} \]
Was this answer helpful?
0