what is the difference between a piecewise function and a step function?
A step function (or staircase function) is a piecewise function containing all constant "pieces". The constant pieces are observed across the adjacent intervals of the function, as they change value from one interval to the next. A step function is discontinuous (not continuous).