# The Maximum and Minimum Functions of Two Functions

Suppose I have two functions f(x,y)=1 + 2*x +3*y^3 and g(x,y)=y + x^2. I want to have maximum function of {f(x,y)+g(x,y), f(x,y)*g(x,y)} on 0<=x<=1. For example to two functions of one variable: I need criterion of green function in the following picture:

I want to create a new function, such as h[x_,y_]:=Max[f[x,y]+g[x,y],f[x,y]*g[x,y]]

• Neither your functions nor your goals are clear. What is t? What does "have maximum function" mean? Do you want to create a new function, such as h[x_,y_]:=Max[f[x,y]+g[x,y],f[x,y]*g[x,y]]? Or do you want a function of y given constrained maximization over x? Or do you just need to graph something? – Alan Nov 6 '19 at 17:33

I think you are asking for something like the following. Define the functions f and g

f[x_, y_] := 1 + 2*x + 3*y^3
g[x_, y_] := y + x^2


Define a function that finds the maximum as a function of y. I can't see an easy way to do this for symbolic values of y, so I define a function that evaluates only when given a numerical value.

h[y_?NumericQ] :=
MaxValue[{Max[f[x, y] + g[x, y], f[x, y] g[x, y]], 0 <= x <= 1}, x]


As a check, compute a table of values

Table[{y, h[y]}, {y, 0, 1, 1/4}]
(* {{0, 4}, {1/4, 275/64}, {1/2, 81/16}, {3/4, 1911/256}, {1,
12}} *)