Derivative of mod x is
Step-1: Simplify the given data.
Let y=x
⇒y=x,ifx>0-x,ifx<0
mod of xcan also write as x=x2
⇒y=x212
Step-2: Differentiate with respect to x.
⇒dydx=12x2-12×2x⇒dydx=xx2⇒dydx=xxx≠0⇒dydx=-1,x<01,x>0x≠0
Therefore, derivative of mod x is -1 when x<0 and 1 when x>0 and not differentiable at x=0.