myHeaviside[x_] := Which[x < 0, 0, x == 0, 1/2, x > 0, 1] Note that the derivative is properly calculated:
D[myHeaviside[x], x] (*
Which[x < 0, 0, x == 0, 0, x > 0, 0]
*)
and Simplify[%]
(*
0
*)
myHeaviside[x_] := Which[x < 0, 0, x == 0, 1/2, x > 0, 1] Note that the derivative is properly calculated:
D[myHeaviside[x], x] (*
Which[x < 0, 0, x == 0, 0, x > 0, 0]
*)
and Simplify[%]
(*
0
*)