On Mon, 1 Mar 2021 at 13:43, Bruno Nicenboim <[email protected]> wrote: > > On Fri, Feb 26, 2021 at 9:01 PM Oscar Benjamin <[email protected]> > wrote: >> >> I don't think your constraints are enough to determine what the >> correct solution should be. For example if we have the values: >> {mu_1:1, mu_2:2, tau:2, psi:1, x:2} >> >> Then neither solution satisfies the constraint: > > yes, it's true. I realize that a missing piece of information is that psi < > min(mu_1,mu_2,x). Is there a way to include this to get only one solution > from solveset? > > And is changing the domain of solveset the right approach?
In principle yes, but I wouldn't be surprised if `solveset` is unable to handle a case like this. There isn't really a sympy function that handles this kind of case. The solve function can handle a mix of equations and inequalities but it doesn't treat them in the way that you want. The solveset function is only for a single equation so you would have to encode the inequality constraints in the domain somehow (which is not so easy for the last constraint you have shown). There has been discussion recently on this last about adding a solver for systems of inequalities. -- Oscar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxQgpaZZOCAefpBpXPfLE3PnuvDnfuaN%2BdU50d%2B244RZnQ%40mail.gmail.com.
