approximating a maximum function by a differentiable function Is it possible to approximate the $max\{x,y\}$ by a differentiable function?
$f(x,y)=max \{x,y\} ;\ x,y>0$

Another possibility is given by:
\begin{equation}
\max (x,y) \approx \ln(e^x+e^y)
\end{equation}
This approximation doesn't work well for similar values of $x$ and $y$. We can however, remedy this by introducing a scaling parameter $N$:
\begin{equation}
\max (x,y) \approx \frac1N\ln(e^{N x}+e^{N y})
\end{equation}
for large values of $N$.
A general definition is given by:
\begin{equation}
\max\limits_{x \in S} \approx \frac1N\ln(\sum\limits_{x\in S} e^{N x})
\end{equation}
Note that in practice $e^{Nx}$ will give unworkably large answers for large $N$.
