But just one more lttile suggestion: when only the graph of the first derivative is displayed, could the red tangent line on it be removed? i.e. only the moving dot along the graph should be shown. Of course, when the graphs of both the first and second derivatives are displayed, we need to show the moving red tangent line.

Thanks a lot again!