If your goal is to compute definite integrals, be careful:
(%i40) subst('unit_step = lambda([s], (s + abs(s))/(2*s)), unit_step(x));
(%o40) (abs(x)+x)/(2*x)
(%i41) pmint(%,x);
(%o41) (x^3*abs(x)+x^4)/(2*x^2*abs(x))
The expression (%o41) has a removable discontinuity at 0; otherwise it is
continuous on the reals.
Except for the troublemaker at zero, (%o41) valid on the reals.
(%i44) subst('unit_step = lambda([s], (s + abs(s))/(2*s)), unit_step
(1-x^2));
(%o44) (abs(x^2-1)-x^2+1)/(2*(1-x^2))
(%i45) pmint(%,x);
(%o45) (x^5*abs(x^2-1)-2*x^3*abs(x^2-1)+x*abs(x^2-1)-x^3*(x^2-1)^2
+x*(x^2-1)^2)/(2*(x^2-1)^2*abs(x^2-1))
The expression (%o45) has nonremovable discontinuities, so (%o45) isn't
valid on the reals (but
it is valid piecewise, I think).
Barton
-