So, I want to, say, find a maximum value of $|x_1x_3+x_1x_4+x_2x_3-x_2x_4|$ in a unit cube in 4D; how do I do that?
I've tried
NMaximize[Abs[a*c + a*d + b*c - b*d], {a, b, c, d } in Cuboid[{0, 0, 0, 0}]]
,
but it said that
a in Cuboid[{0,0,0,0}] is not a valid variable
;
I also tried doing
Maximize[Abs[a* c + b* c + a *d - b* d], {{a, 0, 1}, {b, 0, 1}, {c, 0, 1}, {d, 0, 1}} ]
,
but did not prevail as well.
What is the correct syntax for this?