Let us state several things about function's extrema to summarise all known up till this moment:

  1. The extremum is locally greatest (or lowest value). The definition itself does not call for any differentiability.

  2. If the function is differentiable in the extremum point, then $$f'(a)=0$$.

  3. The inverse is not necessarily true: if the function has $$f'(a)=0$$ it does not imply the extremum at this very point; example $$f(x)=x^3$$

  4. Similar thing applies for the differentiability: the differentiability is not a necessity for the extremum, example: $$f(x)=|x|$$

  5. You can come up with a workaround for the latter case: assume that you find an extremum not via the value of the derivative in the point, but via changing the sign of the derivative as argument passes through given point (thus monotonic behaviour changes )

  6. It is still not enough: one can come up with a function with no certain monotonicity in either left or right neighbourhoods (any). Think of the function exploiting $$\sin 1/x$$.