Finding intervals of increase or decrease.