If, write
As we need to differentiate
We know the property of mod function that
∴
Hence,
As
Note: f(x) is not differentiable at x = 0 because left hand derivative of f(x) is not equal to right hand derivative at x = 0