1
$\begingroup$

I have 6 functions of four variables $ f_i: \mathbb{R}^4 \rightarrow \mathbb{R},\, i \in 1..6$

For each function $f_j$ I want to find the subset of $ \mathbb{R}^4 $, called $S_j$, for which it is less than all the other functions

i.e.

$f_j(w,x,y,z) \le f_i(w,x,y,z) \; \forall i \in 1..6 \; \forall (w,x,y,z) \in S_j$

In particular the functions I'm working with are as follows:

{
1/2 (-x - y + Sqrt[4 w^2 + x^2 - 2 x y + y^2]), 
1/2 (-x - y - Sqrt[4 w^2 + x^2 - 2 x y + y^2]), 
-z, 
x + y - Sqrt[4 w^2 + x^2 - 2 x y + y^2], 
x + y + Sqrt[4 w^2 + x^2 - 2 x y + y^2], 
2 z
}

Your help is appreciated,

Reid

$\endgroup$

1 Answer 1

2
$\begingroup$

Try this

$Assumptions = {w, x, y, z} \[Element] Reals;
f = {1/2 (-x - y + Sqrt[4 w^2 + x^2 - 2 x y + y^2]), 
  1/2 (-x - y - Sqrt[4 w^2 + x^2 - 2 x y + y^2]), -z,
  x + y - Sqrt[4 w^2 + x^2 - 2 x y + y^2],
  x + y + Sqrt[4 w^2 + x^2 - 2 x y + y^2], 2 z};
Table[c = f[[i]]; d = Drop[f, {i}]; 
  Simplify[Reduce[And@@Map[c<=#&, d], {w, x, y, z}]], {i, 1, 6}]

That extracts each of your six expressions, uses those to construct the inequalities with the remaining five and gives that to Reduce to find your solutions.

$\endgroup$
1
  • $\begingroup$ Thank you @Bill! I was trying to construct a piece-wise function of 5 arguments (index $ i \in 1..6$ and the other four), and use Minimize on that to no avail. This is much better. $\endgroup$
    – Reid Hayes
    Jul 13, 2016 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.