In this demonstration, the function
f(x)
and its domain are defined in the control panel. The graph of the function is colored gray where it is decreasing and red where it is increasing.