# Why do the solutions to the derivatives of polynomials have the same x value as their peaks and valleys?

calculusderivativesmaxima-minimapolynomials

I was graphing polynomials and their derivatives, and I noticed that the local maximums and minimums of of polynomials have the same x value as it's derivative's solutions. Is this just a coincidence?

For example, the polynomial, $$3x^{5}+x^{4}+0.4x^{3}+x^{2}+2$$, has a peak at, $$-0.555$$. The derivative of that polynomial is, $$15x^4+4x^3+1.2x^2+2x$$. It has the solution, $$x = -0.555$$

Note: The question has been changed. The following answers the new question: "Why do local extremas of a differentiable function $$f(x)$$ occur precisely where $$f'(x)=0$$?"
Suppose we have a differentiable function $$f(x)$$, and further suppose that $$f(x)$$ has a local max (or local min) at $$x=c$$. Then it must be that the slope of the tangent line to $$f(x)$$ at $$x=c$$ is $$0$$; that is, $$f(x)$$ has a horizontal tangent at $$x=c$$.
The derivative $$f'(x)$$ tells us the slope of the tangent line to $$f(x)$$ at any $$x$$-value we want. Therefore, it must be that $$f'(c)=0$$, since the we know that $$f(x)$$ has a tangent slope of $$0$$ at $$x=c$$.
In summary, if $$f(x)$$ has a local extrema at $$x=c$$, then $$f'(c)=0$$.
(However, if $$f'(c)=0$$, this does not necessarily mean that $$f(x)$$ has a local extrema at $$x=c$$; for example, $$f(x)=x^3$$ at $$x=0$$)