# Optimization with non continuous derivative

I want to minimize the following function

$$f(x) = \max_k (\ g_k(x)\ )$$

I intend to compute the minimum by means of numerical methods, such as the Newton-Raphson method.

Newton-Raphson requires you to compute the derivative of $f$. The problem is that it is assumed that the derivative is also continuous, which is indeed not the case when you deal with the $\max$ function : discontinuity occurs in $f'$ at points when you go from one $g_i$ to another in $f$.

Still, I want to compute the minimum of $f$ ! So my question is : what do to when I'm required to compute $f'$ on a point $x_a$, while it is undifined ? Should I take the derivative value on the right ? On the left ? The mean ?

-