I am looking for a function $f\,:\,\mathbb{R}^n\to\mathbb{R}$ which is separately convex and increasing but not convex.


That is to say, the function is convex and increasing in each coordinate while the others variables are fixed but (globally) the function is not convex on $\mathbb{R}^n$. 


A example in $\mathbb{R}^n$ would be nice but $\mathbb{R}^2$ will be ok. 


Edit : the monotonicity assumption has been replaced by the fact that $f$ need to be increasing.



Monotone function which is separately convex but not convex
Let $f(x)$ be as follow 
$$
f(x)=\left\{
\begin{array}{ll}
x+1 \quad \text{when}\quad x\geq 0,\\
e^x\quad \text{otherwise}.\\
\end{array}
\right.
$$


Then, set $g(x,y)=f(x)^2+22f(x)f(y)+f(y)^2$. It is a simple matter to check that $g$ satisfy the wanted properties. Besides, $g$ is not convex on $\mathbb{R}^2$ since ${\rm Det}\big({\rm Hess}\, g(x,y)\big)<0$ on $\mathbb{R}\_+^2$.


This example as been found by P. Monmarché.


