Interior Extremum Theorem. Let $f$ be differentiable on an open interval $(a,b)$. If $f$ attains a maximum value at some point $c \in (a,b)$ ($f(c) \ge f(x)$ for all $x \in(a,b)$), then $f'(c) = 0$.
The theorem makes clear sense and I had no trouble following the proof for it. Then to absolutely convince myself, I made up some function as an example. But my example is not working and I was hoping someone could clarify what I am doing wrong.
Ex. Let $f(x)=x^2+2x$ and let the domain be $(0,2)$. For the sake of simplicity, let $c=1.99 $ be the greatest value such that we have $f(1.99)\ge f(x)$ for all $x\in(0,2)$. We have $f'(x)=2x+2$ which implies $f'(1.99)=0 $.
$\endgroup$ 51 Answer
$\begingroup$But just momentarily, can we assume that $f(1.99)$ is greater than every $f(x)$?
Yes, we can assume whatever we want. As long we don't forget to state the assumptions next to conclusions we derive, there is no problem.
So, let's assume that the function $f(x)=x^2+2x$ satisfies $f(1.99)\ge f(x)$ for all $x\in (0,2)$. It follows that $f'(1.99)=0$. Evaluation of derivative shows that $2\cdot 1.99+2=0$. We thus conclude that $5.98=0$.
Since the obtained conclusion is evidently false, our assumption "$f(1.99)\ge f(x)$ for all $x\in (0,2)$" has been shown to be false as well. This is how the method of proof by contradiction works.
$\endgroup$