# How to implement this in Mathematica？y=argmax{max{f(x,y),g(x,y),h(x,y)}}

There are three bivariate functions with respect to x and y. Slice x into 100 pieces from 0 to 1. Starting from each slice, calculate the function with respect to y. Find the maximum value of each function on each slice. Compare the maximum values of all three functions on each slice, choose the maximum one, and store the corresponding y value that makes the function value true. Each slice corresponds to such a y value. Finally, plot the values with x-axis as horizontal axis and y-axis as vertical axis. How to implement this in Matlab or Mathematica?

• I have tried, but I cannot divide the piecewise function. Mar 14 at 18:13
• I suggest starting with a simpler problem and working your way up. For example, fix x at some value, say 1. Now find the max of one of the functions, say f[1,y]:=1+y^2. Once you can solve this, you can likely solve the rest... Mar 14 at 19:18
• I want get a line of these solutions. Mar 14 at 23:42
• I see you want to solve may such equations, but if you can't solve it once, how can you expect to solve it 100 times? Mar 14 at 23:57
• It's not that I don't want to solve, it's that I want to get 100 solutions by traversing and then connect these points into a line. Mar 15 at 0:09