# Extrema Where the Derivative is Undefined

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?

• My guess would be yes because the function $f=|x|$ experiences this, but I would like conformation. – wfish454 Tutorials May 22 '16 at 1:43
• When you said "extrema", do you mean local extrema or global extrema? – BigbearZzz May 22 '16 at 2:01
• Local extrema, my bad – wfish454 Tutorials May 22 '16 at 2:23
• It's possible that $\lim_{x \nearrow 3} f(x) < f(3) < \lim_{x \searrow 3} f(x)$. In this case $f$ does not have a local extremum at $x = 3$. – littleO May 22 '16 at 2:49
• We say that because $\ f \ ' ( x ) \$ is not defined at $\ x \ = \ 3 \$ , this value of $\ x \$ is a critical point for the function, which does not automatically imply that it is an extremum. The whole question of extrema has to be handled with some care in any event: we also know that a critical point with $\ f \ ' (x) \ = \ 0 \$ is not necessarily an extremum, as with $\ x \ = \ 0 \$ for $\ f ( x ) \ = \ x^3 \$ . The anti-derivative for your function might not be continuous (as Graham Kemp's reply discusses), so some caution in analysis is always advisable. – colormegone May 22 '16 at 3:55

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.
• This, while correct, doesn't seem to answer the question. The question is, I believe, "If the derivative of a function is opposite signs on either side of a point $x=\rho$ but the derivative is undefined there, does the function necessary have an extrema?". – BigbearZzz May 22 '16 at 1:59
If $f'(x)= \begin{cases} -5 & : x< 3\\ +5&: x>3 \\ \textsf{undef} & : x=3\end{cases}$ , then all we know about $f$ is that: $$f(x)=5\lvert x-3\rvert +\begin{cases} c_1 & : x < 3 \\ c_2 & : x>3 \\ c_3 & : x=3\end{cases}$$
Where $c_1,c_2,c_3$ are arbitrary constants, but while $c_1,c_2$ will be definite (though not necessarily equal), $c_3$ need not be.
So there could be a local extrema at the point $x=3$, but there need not be one.