I found myself stuck at such basic problem. If you're to calculate local maximum and minimum on closed interval, $\langle a, b\rangle$, the $a$ and $b$ may as well be the maximum and minimum points of the function (on that interval). Think $x^3 + 10x^2 + x$, it already has 1 local minimum and maximum. If you try to find local maximum and minimum on $<-10, 1>$ do the border points of the interval count? How do I find which ones are maximums or minimums?
And what if two potentially maximum (or minumum) points do have the same value? (Let say the function value was 0 in -10 and 0. What then?
Yes, the border points count. You need to check the value at the border points as well as at the points where the derivative is zero. Then report the highest of these as the maximum and the lowest as the minimum. In your example we find the four points of interest $$\begin {array} {c | l} x&f(x)\\ \hline -10 & -10 \\ -\frac {10+\sqrt{97}}3\approx -6.616 &\frac 2{27}(97\sqrt{97}+955)\approx 141.5 \\ -\frac {10-\sqrt{97}}3\approx -0.0504 &\frac 2{27}(97\sqrt{97}-955)\approx -0.025 \\1&12 \end {array}$$ So the maximum is at the zero of the derivative and the minimum is at $(-10,-10)$ If there is a tie, you can report both points