# Math Help - max function derivative

1. ## max function derivative

How can I/Is it possible to derive a function which contains a max function built in?

Example:

y=10+2*max(10z+2 , 0)

Thank you very much for your attention

2. Rewrite it as a piecewise function first, i.e.,

$
y = \left\{ \begin{array}{ll}
20z+14, & \mbox{ if } z > -1/5 \\
10, & \mbox{ if } z \le -1/5
\end{array} \right.
$