GATE 2026 CS (CS1) – Question 46
Let $f:\mathbb{R} \to \mathbb{R}$ be defined as follows:
$$f(x) = \left(\frac{|x|}{2} - x\right)\left(x - \frac{|x|}{2}\right)$$
Which of the following statements is/are true?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) $f$ has a local maximum; (C) $f'$ is continuous over $\mathbb{R}$; (D) $f'$ is not differentiable over $\mathbb{R}$
Explanation
Notice that $\left(\frac{|x|}{2} - x\right) = -\left(x - \frac{|x|}{2}\right)$, so:
$$f(x) = -\left(x - \frac{|x|}{2}\right)^2$$
Analyze $f(x)$ piecewise:
1. For $x \ge 0$, $|x| = x \implies x - \frac{x}{2} = \frac{x}{2}$, so:
$$f(x) = -\left(\frac{x}{2}\right)^2 = -\frac{x^2}{4}$$
2. For $x < 0$, $|x| = -x \implies x - \left(-\frac{x}{2}\right) = \frac{3x}{2}$, so:
$$f(x) = -\left(\frac{3x}{2}\right)^2 = -\frac{9x^2}{4}$$
- Notice $f(x) \le 0$ for all $x \in \mathbb{R}$ and $f(0) = 0$. Hence $x = 0$ is a global (and local) maximum. Statement (A) is true.
- As $x \to \pm\infty$, $f(x) \to -\infty$; $f$ has no local minimum anywhere on $\mathbb{R}$. Statement (B) is false.
- First derivative $f'(x)$:
- For $x > 0$: $f'(x) = -\frac{x}{2} \to 0$ as $x \to 0^+$.
- For $x < 0$: $f'(x) = -\frac{9x}{2} \to 0$ as $x \to 0^-$.
- At $x = 0$: $f'(0) = 0$. Since $\lim_{x \to 0} f'(x) = f'(0) = 0$, $f'$ is continuous over $\mathbb{R}$. Statement (C) is true.
- Differentiability of $f'$ at $x = 0$:
- Right derivative: $\lim_{x \to 0^+} \frac{f'(x) - 0}{x} = -\frac{1}{2}$.
- Left derivative: $\lim_{x \to 0^-} \frac{f'(x) - 0}{x} = -\frac{9}{2}$.
- Since $-1/2 \ne -9/2$, $f'$ is not differentiable at $x = 0$. Statement (D) is true.
Therefore, statements (A), (C), and (D) are true.