I would like to build a function that returns true if there exists even one value of xg1 such that having as inputs Mtot, PL, xg2, mac, xga, and defining
xgtot = (xg1 PL + xg2 Mtot)/(Mtot + PL);
stab = (xga - xgtot)/mac;
the following conditions are satisfied:
0.1<stab<0.4
xgtot<0.2;
I would like such a function to return only True or False.
I tried using AnyTrue, but it doesn't seam to work as I wanted:
tests = {0.1<#1 < 0.4 &, #2 < 0.2 &};
AnyTrue[{stab, xg1} , TrueQ[tests] ]
Any suggestions?
{}
(False) or something else (True). The following would work:FindInstance[(*tests*), {(*variables*)}] =!= {}
You may also want to know that=!=
is a short forUnsameQ
. $\endgroup$