Skip to main content
added 6 characters in body
Source Link
OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40

I tried something but not sure the result is right

n = 2;
varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ (a < # < b & /@ varx);
constYcontsY = And @@ (c < # < d & /@ vary);
u = 0.4; a = 0; b = 1; c = 0; d = 1;
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
NMaximize[{func,  Sum[x[i], {i, n}] == 1 && Sum[y[i], {i, n}] == 1 && contsX &&    constYcontsY}, Join[varx, vary]]

EDITED:

varx = Array[x, n];
vary = Array[y, n];
contsXconstX = And @@ MapThread[#1 <= #2 <= #3 &, {a, varx, b}];
constY = And @@ MapThread[#1 <= #2 <= #3 &, {c, vary, d}];
func = Sum[y[i]^uTotal[y[#]^u x[i]^x[#]^(1 - u), {i,& n}];/@ Range@n]
FindMaximum[{func,   Total@varx == 1 && Total@vary == 1 && contsX && constYcontsY},  Join[varx, vary]]

I tried something but not sure the result is right

n = 2;
varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ (a < # < b & /@ varx);
constY = And @@ (c < # < d & /@ vary);
u = 0.4; a = 0; b = 1; c = 0; d = 1;
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
NMaximize[{func,  Sum[x[i], {i, n}] == 1 && Sum[y[i], {i, n}] == 1 && contsX &&    constY}, Join[varx, vary]]

EDITED:

varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ MapThread[#1 <= #2 <= #3 &, {a, varx, b}];
constY = And @@ MapThread[#1 <= #2 <= #3 &, {c, vary, d}];
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
FindMaximum[{func,   Total@varx == 1 && Total@vary == 1 && contsX && constY},  Join[varx, vary]]

I tried something but not sure the result is right

n = 2;
varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ (a < # < b & /@ varx);
contsY = And @@ (c < # < d & /@ vary);
u = 0.4; a = 0; b = 1; c = 0; d = 1;
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
NMaximize[{func,  Sum[x[i], {i, n}] == 1 && Sum[y[i], {i, n}] == 1 && contsX &&    contsY}, Join[varx, vary]]

EDITED:

varx = Array[x, n];
vary = Array[y, n];
constX = And @@ MapThread[#1 <= #2 <= #3 &, {a, varx, b}];
constY = And @@ MapThread[#1 <= #2 <= #3 &, {c, vary, d}];
func = Total[y[#]^u x[#]^(1 - u) & /@ Range@n]
FindMaximum[{func,   Total@varx == 1 && Total@vary == 1 && contsX && contsY},  Join[varx, vary]]
added 287 characters in body
Source Link
OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40

I tried something but not sure the result is right

n = 2;
varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ (a < # < b & /@ varx);
constY = And @@ (c < # < d & /@ vary);
u = 0.4; a = 0; b = 1; c = 0; d = 1;
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
NMaximize[{func,  Sum[x[i], {i, n}] == 1 && Sum[y[i], {i, n}] == 1 && contsX &&    constY}, Join[varx, vary]]

EDITED:

varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ MapThread[#1 <= #2 <= #3 &, {a, varx, b}];
constY = And @@ MapThread[#1 <= #2 <= #3 &, {c, vary, d}];
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
FindMaximum[{func,   Total@varx == 1 && Total@vary == 1 && contsX && constY},  Join[varx, vary]]

I tried something but not sure the result is right

n = 2;
varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ (a < # < b & /@ varx);
constY = And @@ (c < # < d & /@ vary);
u = 0.4; a = 0; b = 1; c = 0; d = 1;
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
NMaximize[{func,  Sum[x[i], {i, n}] == 1 && Sum[y[i], {i, n}] == 1 && contsX &&    constY}, Join[varx, vary]]

I tried something but not sure the result is right

n = 2;
varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ (a < # < b & /@ varx);
constY = And @@ (c < # < d & /@ vary);
u = 0.4; a = 0; b = 1; c = 0; d = 1;
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
NMaximize[{func,  Sum[x[i], {i, n}] == 1 && Sum[y[i], {i, n}] == 1 && contsX &&    constY}, Join[varx, vary]]

EDITED:

varx = Array[x, n];
vary = Array[y, n];
contsX = And @@ MapThread[#1 <= #2 <= #3 &, {a, varx, b}];
constY = And @@ MapThread[#1 <= #2 <= #3 &, {c, vary, d}];
func = Sum[y[i]^u x[i]^(1 - u), {i, n}];
FindMaximum[{func,   Total@varx == 1 && Total@vary == 1 && contsX && constY},  Join[varx, vary]]
added 33 characters in body
Source Link
OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40

I tried something but not sure the result is right

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

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]]

I tried something but not sure the result is right

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