Department of Fundamentals of Computer Science
The tangent line to a differentiable function $f:\mathbb{R} \to \mathbb{R}$ at the point $(a,f(a))$ has equation $$y = f'(a) (x-a)+f(a)~.$$
The following applet contains the graph of $f(x) = x(x-\frac12)(x-1)$ and the graph of tangent line to $f$ at the point $(a, f(a))$. Drag the black circle to change the position of the point $(a,f(a))$.
Check for which points the tangent line is parallel to the x-axis.
Check that $f'(x) = 3 x ^ 2-3 x + \frac{1}{2}$ and then find local extremes of the function $f$.