Here is my code:
N1 = 1;
N2 = 1;
X1 = N2/(1 - \[Sigma]);
c = 1
surpluspayoff10011010 = (N1 + x + y)/((N1 + x + y) + N2)* X1 -
c y - (((N1 + x)/((N1 + x) + N2))*X1);
yargmax10011010 = Simplify[y /. NSolve[\!\(
\*SubscriptBox[\(\[PartialD]\), \(y\)]\((surpluspayoff10011010)\)\) ==
0, y]][[2]];
yargmax10011010 =
Simplify[Piecewise[{{0,
Simplify@
Reduce[{Rationalize@yargmax10011010 < 0 && 0 <= \[Sigma] < 1 &&
ymax > 1}, x]}, {yargmax10011010,
Simplify@
Reduce[{Rationalize@yargmax10011010 <= ymax &&
0 <= \[Sigma] < 1 && ymax > 1}, x]}, {ymax,
Simplify@
Reduce[{Rationalize@yargmax10011010 > ymax &&
0 <= \[Sigma] < 1 && ymax > 1}, x] }}]];
surpluspayoff10011010 =
Simplify[(N1 + yargmax10011010 +
x)/((N2) + (N1 + x + yargmax10011010))* X1 -
yargmax10011010 - (((N1 + x)/((N1 + x) + N2))*X1) ];
yargmax10011010 =
Simplify[Piecewise[{{0,
Simplify@
Reduce[{Rationalize@surpluspayoff10011010 < 0 &&
0 <= \[Sigma] < 1 && ymax > 1}, x]}, {yargmax10011010,
Simplify@
Reduce[{Rationalize@surpluspayoff10011010 >= 0 &&
0 <= \[Sigma] < 1 && ymax > 1}, x]}}]];
I cannot put the result here, since it will look very ugly here. But the thing is I already gave the condition for 0<\sigma<1 , 1< ymax, but the result for yargmax10011010 is something that violated these conditions. Basicly,look at the result of yargmax10011010 when y=0, we have conditions such as ymax =<1, and such
Simplify
. If you want to set global assumptions, so you don't have to specify them every time you runSimplify
, look into$Assumptions
. You may also be interested in this tutorial: Using assumptions. $\endgroup$Simplify
or 5Rationalize
are accomplishing anything for you. With or without those I get the resultPiecewise[{{0, ymax<=1 || 2+x+Sqrt[1/(1-σ)]!=0 || σ>=1 || σ<0}, {(2+x+Sqrt[1-σ]-2*σ-x*σ)/(σ-1), 2+x+Sqrt[1/(1-σ)]>=0 && 2+x+ymax+Sqrt[1/(1-σ)]>=0 && 0<=σ<1] && ymax>1}}, ymax]
$\endgroup$