hi Stefy,

Haven't 'spoken' to you in a while. Hope you are well.

Derivatives have to be 'well defined'. Specifically, this breaks down where the left limit isn't the same as the right limit.

So neither have a defined value at x = 0.

For |x| the deriv = 1 for x > 0 and -1 for x < 0.

How are you defining sgn(x) ?

If you mean 1 when x > 0 and -1 when X < 0, then zero is correct.

As this function is discontinuous at x = 0, I think you must exclude x = 0 from this derivative even though the value is the same either side of zero.

Bob