f\left(x\right) = 2\left|x\right| + \left|x + 2\right| - \left|\left|x + 2\right| - 2\left|x\right|\right|</p><p><u>CASE1:</u></p><p>Forx \le - 2,</p><p>∣x∣=−x and \left|x + 2\right| = - \left(x + 2\right)(∵x,x+2<0)
⇒f(x)=−3x−2−∣x−2∣
=−3x−2+(x−2)(∵x−2<0)
=−2x−4...(1)
CASE 2:
For −2<x≤0,
\left|x\right| = - x\left(∵ x 0 )</p><p>⇒ f ( x ) = - 2x + ( x + 2 ) - \left|( x + 2 ) + 2x\right| = - x + 2 - \left|3x + 2\right|</p><p>= \left\{−x+2+(3x+2),−2<x≤3−2−x+2−(3x+2),3−2<x≤0\right\}</p><p>= \left\{2x+4,−2<x≤3−2−4x,3−2<x≤0\right\} . . . ( 2 )</p><p><u>CASE3:</u></p><p>Forx > 0,</p><p>∣x∣=x and ∣x+2∣=(x+2)
⇒f(x)=2x+(x+2)−∣(x+2)−2x∣=3x+2−∣−x+2∣
= \left\{3x+2−(−x+2),0<x≤23x+2+(−x+2),2<x\right\}
= \left\{4x,0<x≤22x+4,2<x\right\} . . . ( 3 )
From (1),(2) and (3), we get
\text{f}\text{(}\text{x}\text{)=}\left\{\begin{cases}- 2x - 4, & x \le - 2 \\ 2x + 4, & - 2 2\end{cases}\right\}

From graph, y=f(x) has local minima at x=−2,0 and local maxima at x=3−2.