Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a function defined by $f(x)=||x+2|-2|x||$. If $m$ is the number of points of local minima and $n$ is the number of points of local maxima of $f$, then $m+n$ is
- (1) 5
- (2) 3
- (3) 2
- (4) 4
Solution:
$$f(x)=||x+2|-2|x||$$
$$f(x) = \begin{cases} |-(x+2) – (-2x)|, & x < -2 \\ |(x+2) – (-2x)|, & -2 \le x < 0 \\ |(x+2) – 2x|, & x \ge 0 \end{cases}$$
$$f(x) = \begin{cases} |-x – 2 + 2x|, & x < -2 \\ |x + 2 + 2x|, & -2 \le x < 0 \\ |x + 2 – 2x|, & x \ge 0 \end{cases}$$
$$f(x) = \begin{cases} |x – 2|, & x < -2 \\ |3x + 2|, & -2 \le x < 0 \\ |-x + 2|, & x \ge 0 \end{cases}$$
Critical points occur where the expression inside the modulus is zero or where the piece-wise definition changes.
$$3x + 2 = 0 \Rightarrow x = -\frac{2}{3}$$
$$-x + 2 = 0 \Rightarrow x = 2$$
$$x = 0$$

Number of points of local minima ($m$) = $2$ (at $x = -\frac{2}{3}$ and $x = 2$)
Number of points of local maxima ($n$) = $1$ (at $x = 0$)
$$m + n = 2 + 1$$
$$m + n = 3$$
Ans. (2)