Skip to main content
1 of 4
OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40

I tried something but not sure the result is right

varx = Array[x, 4];
vary = Array[y, 4];
contsX = And @@ (a < # < b & /@ varx);
constY = And @@ (c < # < d & /@ vary);
u = 0.4; a = 0; b = 1; c = 0; d = 1;
NMaximize[{Sum[y[i]^u x[i]^(1 - u), {i, 4}],  Sum[x[i], {i, 4}] == 1 && Sum[y[i], {i, 4}] == 1 && contsX && constY}, Join[varx, vary]]
OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40