Let y=f(x) be differentiable and suppose that the graph of f does not pass through the origin. The distance D from the origin to a point P(x,f(x)) of the graph is given by

$\displaystyle D=\sqrt{x^2 + [f(x)]^2}$

Show that if D has a local extreme value at c, then the line through (0,0) and (c,f(c)) is perpendicular to the line tangent to the graph of f at (c,f(c))

Thanks