[Math] Extrema Where the Derivative is Undefined

calculusderivativesoptimization

Say we are given the derivative of a function say,
$$f'(x)=\begin{cases}
5 & x<3 \\
-5 & x>3
\end{cases}$$
Notice that the derivative has opposite signs on either side of $x=3$, so you would expect an extrema to occur in $f$ at $x=3$ (specifically a maximum in this case), however the derivative is undefined at $x=3$, so is there still an extrema?

This is just an example of the general case: if the derivative of a function is opposite signs on either side of $x=\rho$, but the derivative is undefined at $x=\rho$, does the function still have an extrema?

Best Answer

At any local maximum $x$, $\lim_{t \to 0^+} \frac{f(x+t)-f(x)}{t}\leq 0$ and $\lim_{t \to 0^-} \frac{f(x+t)-f(x)}{t}\geq 0$ (if these exist, you can further generalize this using the $\lim\sup$ and $\lim\inf$ in place of the respective limits), and the reverse holds for a minimum.

This is easy to verify, as we approach a maximum from the right $f(x+t)-f(x)\leq 0$, $t\geq 0$ so the inequality must hold. The other inequality holds by similar logic.