Question: Maximization of a function over a given range

I am having difficulty getting Maple to find the optimal solution over a specified range. That is, I want to limit the possible range of my maximizers. For my problem I am maximizing the expression "payoff" with respect to p and s and want to tell Maple to search for all solutions where s<pa.

I have the following expression for variable x

x:=-1/4*(s^2-pa^2+4*pa-4*s-4*p)/(s-pa);

where x is an input to the function payoff that I wish to maximize:

payoff:=p*x + s*subs(Q=x,y) + m*(1-subs(Q=x,y)));

and

y:=int((d-s/2),d=s/2..Q+s/2)+int(Q,d=Q+s/2..1));

Now, defining the FOC of payoff as

FOC_p:=diff(payoff,p)
FOC_s:=diff(payoff,s)

and then using

solve({FOC_p,FOC_s},{p,s});

Maple does not find a viable solution since it finds an s>pa. (The function x has an asymptote at s=pa and the optimal s must be s<pa for my problem.)

How do I find the solution (p,s) over the restricted range s<pa?


Please Wait...