Thanks, actually I had tried to plot f(x1,x2) in the first place but with no success, mainly due to the fact that f involves both x1 and x2. I know, however, how to plot f when it involves only x1 (or x2), for example f(x1)=max(2x1,-x1).
Btw, I've just given it another try after seeing your...