How can I maximize the following symbolic expression in Mathematica, assuming that $da, db \ge 0$?
$\delta(a,b,da,db) = ((a \pm da) (b \pm db)) (1 + y) - ab$
My problem on the first place is that I don't know how to represent a meaningful $\pm$ operator in Mathematica, since PlusMinus
is just an eye candy which performs formatting only:
\[Delta] = ((a + PlusMinus[da])(b + PlusMinus[db])) (1 + y) - ab;
I want something like
Subscript[\[Delta], 0] = ((a + da)*(b + db)) (1 + y) - (a*b);
Subscript[\[Delta], 1] = ((a - da)*(b + db)) (1 + y) - (a*b);
Subscript[\[Delta], 2] = ((a + da)*(b - db)) (1 + y) - (a*b);
Subscript[\[Delta], 3] = ((a - da)*(b - db)) (1 + y) - (a*b);
\[Delta] =
Max[Subscript[\[Delta], 0], Subscript[\[Delta], 1],
Subscript[\[Delta], 2], Subscript[\[Delta], 3]];
\[Delta][y]
or\[Delta][y,a,b]
? In addition it is not clear what the use ofPlusMinus
stands for. Do you want to maximize four variations of\[Delta]
? $\endgroup$Subscript
while defining symbols (variables).Subscript[x, 1]
is not a symbol, but a composite expression whereSubscript
is an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]
which is to assign a Downvalue to the opratorSubscript
and not an Ownvalue to an indexedx
as you may intend. Read how to properly define indexed variables here $\endgroup$