The GATE Grind

GATE 2023 XL — all source sections – Question 9

General Aptitude · Quantitative Aptitude: Algebra, Geometry and Mensuration · 2 marks · Multiple choice

Which of the figures P, Q, R, S represents $f(x)=\bigl||x+2|-|x-1|\bigr|$?

Diagram for GATE 2023 XL — all source sections question 9
  1. P
  2. Q
  3. R
  4. S

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) P

Explanation

Split at the inner absolute-value breakpoints −2 and 1, then at the outer zero −1/2:
$$f(x)=\begin{cases}
3,&x\le-2,\\
-2x-1,&-2\le x\le-1/2,\\
2x+1,&-1/2\le x\le1,\\
3,&x\ge1.
\end{cases}$$
Thus f(−2)=3, f(−1/2)=0 and f(1)=3. Outside that interval the graph is horizontal at height 3, and the middle is a V with slopes −2 and +2.

This is **P, A**. Omitting the outer absolute value would instead give a negative left plateau, as in a different option.

More Quantitative Aptitude: Algebra, Geometry and Mensuration questions

All Quantitative Aptitude: Algebra, Geometry and Mensuration questions →