Q.9 Which one of the given figures P, Q, R and S represents the graph of the following
function?
𝑓(𝑥) = | |𝑥 + 2| − |𝑥 − 1| |
(A) P
(B) Q
(C) R
(D) S
The graph of f(x)=||x+2|-|x-1|| is a classic exam question on modulus (absolute value) functions, testing understanding of symmetry, piecewise definition and constant segments. It is especially important for students preparing for competitive exams where questions on graphs of absolute value functions are frequently asked.
Step‑by‑step solution for f(x)=||x+2|-|x-1||
Critical points for the absolute values occur at x = -2 and x = 1, because these make the inner expressions of the moduli zero.
1. Interval x ≤ -2
For x ≤ -2:
- |x+2| = -(x+2) = -x – 2
- |x-1| = -(x-1) = -x + 1
Then,
|x+2| − |x−1| = (−x−2) − (−x+1) = −3
Taking absolute value,
f(x) = |−3| = 3.
So, for all x ≤ −2, the graph is a horizontal line at 3.
2. Interval −2 ≤ x ≤ 1
For −2 ≤ x ≤ 1:
- |x+2| = x + 2
- |x−1| = −(x−1) = −x + 1
Then,
|x+2| − |x−1| = (x+2) − (−x+1) = 2x + 1
Therefore f(x) = |2x + 1|.
The zero of 2x + 1 is at x = −1/2, so this part of the graph is a V‑shape with vertex at (−0.5, 0) and slopes ±2.
3. Interval x ≥ 1
For x ≥ 1:
- |x+2| = x + 2
- |x−1| = x − 1
Then,
|x+2| − |x−1| = (x+2) − (x−1) = 3
Thus, f(x) = |3| = 3.
For all x ≥ 1, the graph is again a horizontal line at 3.
4. Overall shape of the graph
Combining the three intervals, the function behaves as follows:
- Constant value 3 for x ≤ −2.
- A V‑shaped piece f(x) = |2x + 1| between −2 and 1, touching the x‑axis at x = −0.5.
- Constant value 3 for x ≥ 1.
The function is always non‑negative and equals 3 outside the central interval.
Checking each option P, Q, R and S
Option P
- Shows a V‑shape reaching down to 0 at x = 0 and constant around 3 for large |x|.
- Our analysis gives the minimum at x = −0.5, not at 0, so the vertex position is incorrect.
Hence, figure P cannot represent f(x)=||x+2|-|x-1||.
Option Q
- Depicts a straight line increasing from negative values to a positive constant, without reflecting the outer absolute value.
- The true graph never takes negative values because of the outer modulus.
Therefore, figure Q is incorrect.
Option R
- Starts high, decreases linearly to a minimum above 0, then increases to a smaller constant value (roughly between 3 and 4).
- The middle section is not symmetric as required by f(x) = |2x + 1|, and the minimum is not at 0, which contradicts the derived form on −2 ≤ x ≤ 1.
So, figure R does not match the function.
Option S
- Shows a graph starting at a high positive value, decreasing linearly to 0, then remaining constant at about 3 for larger x.
- This matches the behavior of the function: non‑negative values everywhere, a central V‑like descent to 0, and a flat segment at constant positive value for x ≥ 1.
Among the given options, figure S uniquely fits the derived piecewise behavior, so S is the correct graph.
Final Answer
The graph of f(x)=||x+2|-|x-1|| is correctly represented by figure S.


