Suppose $f: \mathbf{R} \rightarrow \mathbf{R}$ is continuous, and suppose $f$ is differentiable at $d$ distinct reals $r_{1}, \ldots, r_{d} .$ Show that $r_{1}, r_{2}, \ldots, r_{d}$ are roots of $f$ iff $f(x)=$ $\left(x-r_{1}\right)\left(x-r_{2}\right) \ldots\left(x-r_{d}\right) g(x)$ for some continuous function $g: \mathbf{R} \rightarrow \mathbf{R}$.
As in the previous exercise, set $g(x)=f(x) /\left(x-r_{1}\right) \ldots\left(x-r_{d}\right)$. Then $g$ is continuous away from $r_{1}, \ldots, r_{d} .$ If $f\left(r_{j}\right)=0$, then $\lim _{x \rightarrow r_{j}} g(x)=$
$f^{\prime}\left(r_{j}\right) /\left(r_{j}-r_{1}\right) \ldots\left(r_{j}-r_{j-1}\right)\left(r_{j}-r_{j+1}\right) \ldots\left(r_{j}-r_{d}\right) .$ Since $g$ has remov-
able singularities at $r_{j}, g$ can be extended to be continuous there. With this extension, we have $f(x)=\left(x-r_{1}\right) \ldots\left(x-r_{d}\right) g(x)$. Conversely, if $f(x)=\left(x-r_{1}\right) \ldots\left(x-r_{d}\right) g(x)$, then $f\left(r_{j}\right)=0$