I am trying to draw a particular maximum plot within a simplex. I have functions based on two variables:
Write p,q for the two variables where p,q \geq 0 and p + q \leq 1. This defines the simplex I am interested in. (Think of, say, p on the x-axis and q on the y-axis.)
The functions are then of the following form:
f(p,q) = 22.5p + 10(1-p)
g(p,q) = 40(1-p-q) + 15(p+q)
h(p,q) = 10(1-q) + 22.5q.
(I am giving examples of functions---there are several I want to look at.)
I am interested in which function is "highest" for any given (p,q). So, for any given (p,q) in the simplex, I want to look at the max {f, g, h}. (The functions are such that almost always the maximum will be unique.) I then want it plot the point (p,q) as, say, red if f is the maximum function, blue if g is the maximum function, and green if h is the maximum function.
Does anyone have any idea how this can be done within mathematica?