f(x)=|2x+1|−3|x+2|+|x2+x−2|
f(x)=⎧⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪⎨⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪⎩x2−7;x≥1−x2−2x−3;−12≤x<1−x2−6x−5;−2<x<−12x2+2x+3;x≤−2
∴f′(x)=⎧⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪⎨⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪⎩2x;x>1−2x−2;−12<x<1−2x−6;−2<x<−122x+2;x<−2
Check at 1,−2 and −12
Differentiable at x=−2 but not differentiable at x=1 and −12.