Question: how can i plot optimal values of a function respect to it's parameter?

Hello everybody!

I have Z which is a function of (b,p)! and two parameters g and d :

Z=p*b*d+2*g^p^2*b^2-2*sqrt(p*g*(b-1)*(b*g*p-b*p-g*p-4*d+p))

I want to plot Z vs. g (1<g<4) and explore with d, note that in plot i want Z to be maximum (it is obvious that we must find b and p optimal and then find Z optimal). in maximization consider we have this constraints: {b <= 1, 1-2*d/(p*(sqrt(g)+1)) <= b}

thank you in advance for your help!

Please Wait...