This demo displays three curves. The first, in gray, is a graph of the function f(x). The second graphs f '(x) and is red when f(x) is increasing and green when f(x) is decreasing. The third graphs f ''(x) and is magenta when f(x) is concave downward and yellow when f ''(x) when f(x) is concave upward. Notice what happens to each of these functions at maxima, minima, and inflection points.