Identify increasing and decreasing functions (#906)