Let $f: R \rightarrow R$ be defined as $f(x)=|x|+\left|x^{2}-1\right|$. The total number of points at which…
Let $f: R \rightarrow R$ be defined as $f(x)=|x|+\left|x^{2}-1\right|$. The total number of points at which $f$ attains either a local maximum or a local minimum is
Solution
$f(x)=|x|+\left|x^{2}-1\right|=\left\{\begin{array}{c}-x+x^{2}-1, x < -1 \\ -x-x^{2}+1,-1 \leq x \leq 0 \\ x-x^{2}+1,0 < x < 1 \\ x^{2}+x-1, \quad x \geq 1\end{array}\right.$
$\therefore \quad f^{\prime}(x)=\left[\begin{array}{ccc}
2 x-1 & , & x < -1 \\
-2 x-1 & , & -1 \leq x \leq 0 \\
-2 x+1 & , & 0 < x < 1 \\
2 x+1 & , & x>1
\end{array}\right.$
Critical points are $\frac{1}{2}, \frac{-1}{2},-1,0$ and 1 .
We observe at five points $f^{\prime}(x)$ changes its sign $\therefore$ There are 5 points at which either local maximum or local minimum.