Step function methods

Suppose we have a function a step function method uses step function to model this. Here we choose intervals of the domain to define different functions on each region.